Skip to content

Comments

feat: add SessionConfiguration with proxy, extensions, and profile support#274

Merged
sundargthb merged 1 commit intoaws:mainfrom
kevin-orellana:feat/proxy-configuration
Feb 24, 2026
Merged

feat: add SessionConfiguration with proxy, extensions, and profile support#274
sundargthb merged 1 commit intoaws:mainfrom
kevin-orellana:feat/proxy-configuration

Conversation

@kevin-orellana
Copy link
Contributor

@kevin-orellana kevin-orellana commented Feb 23, 2026

Summary

  • Add composable dataclasses for browser session configuration in config.py, following the established BrowserConfiguration pattern
  • ProxyCredentials, ExternalProxy, ProxyConfiguration for proxy routing
  • ExtensionS3Location, BrowserExtension for loading browser extensions
  • ProfileConfiguration for persisting browser state across sessions
  • SessionConfiguration composite that bundles viewport, proxy, extensions, and profile into start() kwargs
  • Add extensions and profile_configuration parameters to start() and browser_session()

Usage: client.start(**session_config.to_dict())

Test plan

  • All existing proxy tests still pass (plain dict passthrough)
  • New unit tests for all config dataclasses and browser_client parameters (96 unit tests pass)
  • 23/23 integration tests pass against live API (python3 tests_integ/tools/test_browser_proxy.py):
    • Proxy via plain dict and via ProxyConfiguration dataclass
    • SessionConfiguration with proxy, viewport, extensions, profile individually and combined
    • browser_session() context manager driven by SessionConfiguration
    • Failure modes: double stop() idempotency, context manager cleanup on exception, get_session() after stop
    • Error handling: invalid secret ARN, unreachable proxy server, malformed proxy config, multiple extensions

@codecov-commenter
Copy link

codecov-commenter commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@a637826). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #274   +/-   ##
=======================================
  Coverage        ?   91.20%           
=======================================
  Files           ?       35           
  Lines           ?     3580           
  Branches        ?      535           
=======================================
  Hits            ?     3265           
  Misses          ?      170           
  Partials        ?      145           
Flag Coverage Δ
unittests 91.20% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kevin-orellana kevin-orellana force-pushed the feat/proxy-configuration branch from 013d298 to 600028a Compare February 23, 2026 04:52
@kevin-orellana kevin-orellana force-pushed the feat/proxy-configuration branch from 600028a to 7b4af50 Compare February 23, 2026 05:07
@kevin-orellana kevin-orellana force-pushed the feat/proxy-configuration branch from 7b4af50 to 199f592 Compare February 23, 2026 05:25
@kevin-orellana kevin-orellana changed the title feat: Add proxy_configuration support to browser_session() and BrowserClient.start() feat: add SessionConfiguration with proxy, extensions, and profile support Feb 23, 2026
@kevin-orellana kevin-orellana force-pushed the feat/proxy-configuration branch from 199f592 to 0a58be9 Compare February 23, 2026 05:32
@kevin-orellana kevin-orellana force-pushed the feat/proxy-configuration branch from 0a58be9 to 6f408a3 Compare February 23, 2026 05:35
@kevin-orellana kevin-orellana force-pushed the feat/proxy-configuration branch from 6f408a3 to d61f381 Compare February 23, 2026 05:42
@kevin-orellana kevin-orellana force-pushed the feat/proxy-configuration branch from d61f381 to 7dc2149 Compare February 23, 2026 06:42
@kevin-orellana kevin-orellana force-pushed the feat/proxy-configuration branch from 7dc2149 to dfd9896 Compare February 23, 2026 07:21
@kevin-orellana kevin-orellana force-pushed the feat/proxy-configuration branch from dfd9896 to ac1277d Compare February 23, 2026 18:28
@kevin-orellana kevin-orellana force-pushed the feat/proxy-configuration branch from ac1277d to a59b187 Compare February 23, 2026 20:04
@kevin-orellana kevin-orellana marked this pull request as ready for review February 23, 2026 21:02
@kevin-orellana kevin-orellana requested a review from a team February 23, 2026 21:02
@kevin-orellana kevin-orellana force-pushed the feat/proxy-configuration branch from a59b187 to a94eac9 Compare February 23, 2026 21:09
…pport

Replace ad-hoc TypedDicts in browser_client.py with composable dataclasses
in config.py following the established BrowserConfiguration pattern:

- ProxyCredentials, ExternalProxy, ProxyConfiguration for proxy routing
- ExtensionS3Location, BrowserExtension for loading browser extensions
- SessionConfiguration composite that produces kwargs for start()
- Add extensions and profile_configuration params to start() and browser_session()

Usage: client.start(**session_config.to_dict())
@stevegmf
Copy link

LGTM

@sundargthb sundargthb merged commit ca3c322 into aws:main Feb 24, 2026
18 checks passed
@kevin-orellana kevin-orellana deleted the feat/proxy-configuration branch February 24, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants