Repository navigation
fix(python): refresh zero-lifetime OAuth tokens - #3971
Merged
Merged
Conversation
There was a problem hiding this comment.
✅ Gate recommendation: approve.
An explicit expires_in=0 now follows the documented lifetime semantics instead of being treated like an omitted expiry. The narrow condition change preserves the no-expiry behavior, and the regression test covers consecutive requests.
Xuanwo
approved these changes
Oct 22, 2026
Xuanwo
added a commit
that referenced
this pull request
Oct 22, 2026
…4632) ## Summary #3971 added `test_zero_lifetime_token_is_refreshed`, but its expected headers omit `x-lancedb-credential-type: oidc`, which `OAuthProvider.get_headers()` has emitted since #2631/#4070. The test fails against current main and breaks the PR CI matrix for every open PR. ## Changes - Align the two zap assertions in `test_zero_lifetime_token_is_refreshed` with the provider contract (see `test_token_refresh` and `test_sync_method`). ## Tests - `pytest python/tests/test_header_provider.py -q`
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.
Summary
expires_invalue of zero as an explicit immediate expirationTests
pytest python/tests/test_header_provider.py -q(16 passed)ruff format --check python/lancedb/remote/header.py python/tests/test_header_provider.pyruff check python/lancedb/remote/header.py python/tests/test_header_provider.py