Skip to content

Commit 83fd84c

Browse files
docs(api): clarify reuse/discard_all_idle pool config staleness
1 parent 22fee9f commit 83fd84c

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

‎src/resources/browser-pools.ts‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,12 @@ export interface BrowserPoolUpdateParams {
581581
chrome_policy?: { [key: string]: unknown };
582582

583583
/**
584-
* Whether to discard all idle browsers and rebuild the pool immediately. Defaults
585-
* to false.
584+
* Whether to discard all idle browsers and rebuild them immediately with the new
585+
* configuration. Defaults to false. Only browsers that are idle when the update
586+
* runs are rebuilt. A browser that is in use during the update keeps its original
587+
* configuration, and if it is later released with `reuse: true` it returns to the
588+
* pool with that stale configuration until it is discarded (by this flag on a
589+
* later update, or by flushing the pool).
586590
*/
587591
discard_all_idle?: boolean;
588592

@@ -752,7 +756,10 @@ export interface BrowserPoolReleaseParams {
752756

753757
/**
754758
* Whether to reuse the browser instance or destroy it and create a new one.
755-
* Defaults to true.
759+
* Defaults to true. A reused browser keeps the configuration it was created with,
760+
* so it does not pick up pool configuration changes made while it was in use.
761+
* Release with `reuse: false`, or flush the pool afterward, to rebuild it with the
762+
* current configuration.
756763
*/
757764
reuse?: boolean;
758765
}

0 commit comments

Comments
 (0)