Skip to content

Know a stale Google login on tensorstore 0.1.86 too (0.10.2) - #18

Merged
davidackerman merged 1 commit into
mainfrom
gcs-stale-login-0.1.86
Nov 13, 2026
Merged

davidackerman merged 1 commit into
mainfrom
gcs-stale-login-0.1.86

Conversation

@davidackerman

Copy link
Copy Markdown
Member

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.1 pulls in tensorstore 0.1.86, and there a gs:// open with an expired gcloud login still raised:

ValueError: Bad Request [HTTP code 400] [http_response_body='{\"error\": \"invalid_grant\", ...}']

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_failed also 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_client or unsupported_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 newest job (ubuntu and macOS, Python 3.12) runs uv sync --upgrade and 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

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
@davidackerman
davidackerman merged commit 405baa2 into main Nov 13, 2026
6 checks passed
@davidackerman
davidackerman deleted the gcs-stale-login-0.1.86 branch November 13, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant