Skip to content

Commit c2a231d

Browse files
docs(api): clarify reuse/discard_all_idle pool config staleness
1 parent 64c7a33 commit c2a231d

2 files changed

Lines changed: 12 additions & 5 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: 125
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-ebbe079bb2542625826422afd876a3e8b499c579cf45efc5fd50e7982d34df7d.yml
3-
openapi_spec_hash: db850b61a0d71fe9f4b642df8782d7ae
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-83323f87ab825547b6cd11caa46e2643ebb0a68bbd326d4e07ccab970638fc03.yml
3+
openapi_spec_hash: 69ed04a66b4ef68e97f7bdc07dfe6df2
44
config_hash: 06186eb40e0058a2a87ac251fc07415d

browserpool.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,12 @@ func (r *BrowserPoolNewParamsProfile) UnmarshalJSON(data []byte) error {
495495
}
496496

497497
type BrowserPoolUpdateParams struct {
498-
// Whether to discard all idle browsers and rebuild the pool immediately. Defaults
499-
// to false.
498+
// Whether to discard all idle browsers and rebuild them immediately with the new
499+
// configuration. Defaults to false. Only browsers that are idle when the update
500+
// runs are rebuilt. A browser that is in use during the update keeps its original
501+
// configuration, and if it is later released with `reuse: true` it returns to the
502+
// pool with that stale configuration until it is discarded (by this flag on a
503+
// later update, or by flushing the pool).
500504
DiscardAllIdle param.Opt[bool] `json:"discard_all_idle,omitzero"`
501505
// Percentage of the pool to fill per minute. Defaults to 10. The cap is 25 for
502506
// most organizations but can be raised per-organization, so only the lower bound
@@ -655,7 +659,10 @@ type BrowserPoolReleaseParams struct {
655659
// Browser session ID to release back to the pool
656660
SessionID string `json:"session_id" api:"required"`
657661
// Whether to reuse the browser instance or destroy it and create a new one.
658-
// Defaults to true.
662+
// Defaults to true. A reused browser keeps the configuration it was created with,
663+
// so it does not pick up pool configuration changes made while it was in use.
664+
// Release with `reuse: false`, or flush the pool afterward, to rebuild it with the
665+
// current configuration.
659666
Reuse param.Opt[bool] `json:"reuse,omitzero"`
660667
paramObj
661668
}

0 commit comments

Comments
 (0)