Repository navigation
Know a stale Google login on tensorstore 0.1.86 too (0.10.2) - #18
Merged
Merged
Conversation
0.10.1 told a failed token refresh by tensorstore's oauth2 source locations, which tensorstore 0.1.86 leaves out of its messages, so with the newest tensorstore (what a fresh install gets) a gs:// open with an expired gcloud login still raised. The token endpoint's own OAuth 2.0 error code (the string "error" of its body: invalid_grant and the rest; a store's error body holds an object there) is now matched as well. CI passed 0.10.1 on the lock's tensorstore 0.1.78, so CI now also runs the tests on the newest release of every dependency, weekly and on pull requests. Claude-Session: https://claude.ai/code/session_0141wgF8mkGbjGfBFKfKhp64
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.
0.10.1's fix for a stale Google login didn't work with the newest tensorstore. This PR makes it work there and adds CI coverage of the newest dependencies.
I found this while checking 0.10.1 after the release. In a fresh venv,
pip install worldarray==0.10.1pulls in tensorstore 0.1.86, and there ags://open with an expired gcloud login still raised:0.10.1 recognised the failed login by
tensorstore/internal/oauth2/among the error's source locations, and 0.1.86 leaves source locations out of its messages. CI passed because it runs the lock's tensorstore 0.1.78.Fix:
login_failedalso matches the token endpoint's own error code. That's an OAuth 2.0 code (RFC 6749 §5.2:invalid_grant,invalid_client,invalid_request,invalid_scope,unauthorized_clientorunsupported_grant_type), held as the string value of"error"in the response body. A store's own error body holds an object there (GCS:"error": {"code": 403, ...}), so a store error isn't mistaken for a login failure. The source-location check stays for tensorstore 0.1.85 and earlier.Limitation: on 0.1.86, an unreachable token endpoint carries no such mark, so it's raised the way any unreachable host is, instead of being passed over for the public URL. The spec says so.
CI: a new
newestjob (ubuntu and macOS, Python 3.12) runsuv sync --upgradeand the tests, so they run against what a fresh install gets. The workflow also runs weekly (Mondays 06:00 UTC), so a new tensorstore release is tested without waiting for a push.Checks: the full suite passes on tensorstore 0.1.68, 0.1.78 and 0.1.86 (206 passed, 1 skipped each). On 0.1.86 the end-to-end stale-login test fails on main and passes here. A new unit test covers 0.1.86's message form, and a store's own 400 isn't taken for a login. I also checked whether 0.1.86 changed how tensorstore reports retry exhaustion (
ABORTED: All N retry attempts failed); it reports it the same way as 0.1.68 and 0.1.78.This is a patch release (0.10.2), dated in the CHANGELOG, with the spec (Conventions 5 and its test line) updated. There's no placement change, no unit table change, and no default change.
https://claude.ai/code/session_0141wgF8mkGbjGfBFKfKhp64