Skip to content

Commit 1c675a3

Browse files
feat: api: support per-acquire start_url override on browser pool acquire
1 parent 2c3e61e commit 1c675a3

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 122
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-7cde13c82c71b7a5fd64b592f853a7c999c0e0c02dce161e6126d0e99df3412b.yml
3-
openapi_spec_hash: 52cda226c70a248cbea3af6c52822b44
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-d9b82fc5346c9be1bf9c2b18792fdcdec6a80a86153ca765c9e93e597b46fa24.yml
3+
openapi_spec_hash: 9cbaab975acfa421b795d11aa635c57e
44
config_hash: 99b2b2a25e8067ad9c9214e38e01d64c

browserpool.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,10 @@ type BrowserPoolAcquireParams struct {
545545
// project. Applies to this lease only and is cleared when the browser is released
546546
// back to the pool.
547547
Name param.Opt[string] `json:"name,omitzero"`
548+
// Optional URL to navigate the acquired browser to. Overrides the pool's start_url
549+
// for this acquire only. Best-effort: failures to navigate do not fail the
550+
// acquire.
551+
StartURL param.Opt[string] `json:"start_url,omitzero"`
548552
// Optional user-defined key-value tags for the acquired browser session, used to
549553
// find and group sessions later. Applies to this lease only and are cleared when
550554
// the browser is released back to the pool. Up to 50 pairs.

browserpool_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ func TestBrowserPoolAcquireWithOptionalParams(t *testing.T) {
217217
kernel.BrowserPoolAcquireParams{
218218
AcquireTimeoutSeconds: kernel.Int(0),
219219
Name: kernel.String("checkout-flow-1"),
220+
StartURL: kernel.String("https://example.com"),
220221
Tags: kernel.Tags{
221222
"team": "backend",
222223
"env": "staging",

0 commit comments

Comments
 (0)