Repository navigation
Conversation
(cherry picked from commit 1c8d25e)
Signed-off-by: Hao Zhe <haozhe4547@gmail.com>
This was referenced Nov 4, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Owned adapter clients cannot select API-key authentication independently of ambient LDAP/OIDC settings. Store cleanup can also return while a cancelled initialization or safe-read retry later opens an owned transport. This change forwards an explicit auth_mode through owned sync/async clients, copies and safe-read recovery, and drains active Store requests during cleanup.
An API-key-only client keeps its configured mode after recovery. Store cleanup rejects new backend requests, drains active requests, and releases only owned transports. Cancelled initialization and safe-read recovery cannot leave a replacement transport open after context exit. Concurrent Store reads remain concurrent; injected clients remain caller-owned.
Cherry-picks #6614 with its original author identity, date and source SHA retained. The Store lifecycle API from #6968 has already merged into main as 02611de; its duplicate cherry-pick was dropped during rebase. The cancellation/drain repair and its two deterministic SDK regression cases remain a separate commit. Unset auth_mode retains existing SDK defaults. The SDK minimum is 0.1.7, the first version exposing the explicit mode.
Related to #6612 and #6964. Follows up merged #6968.
Validation against upstream f7b726f: 820 passed on Python 3.12/current frameworks; 818 passed with 2 expected skips on Python 3.10/framework 1.0.0. The combined three-branch candidate passes 916 tests on Python 3.12 and 914 with 2 skips on Python 3.10. Ruff lint/format, mypy on 15 source modules, git diff --check, wheel/sdist builds and Twine checks pass. The combined package and SDK source remain byte-identical to the prior candidate that passed clean installed-wheel checks with published SDKs 0.1.7 and 0.1.18.
Companion drafts: #7038 (Store contracts) and #7040 (archive queries). The combined candidate retains both the Store contract fixes and cleanup draining.
Cleanup drains active backend requests; a multi-request Store operation can be interrupted between requests. It adds no transaction or rollback mechanism.
Contributors: Xinmin Zeng for the auth-mode change and stefanielizeth73-art for the already merged Store lifecycle proposal. The #6614 commit keeps its original author identity and date. Hao Zhe authored the separate cleanup repair and is the committer of the cherry-pick.
Landing: preserve these commits through a merge/rebase merge. If squashing is required, retain all contributor credit explicitly in the squash commit. Original PRs should be marked covered after the accepted consolidated change lands.
Human Involvement
Type of Change
Checklist