Repository navigation
REST: Keep vended storage credentials for staged tables - #4329
Open
Anurag-S1ngh wants to merge 1 commit into
Open
Anurag-S1ngh wants to merge 1 commit into
Anurag-S1ngh wants to merge 1 commit into
Conversation
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.
Rationale for this change
A staged REST create returns no
metadata-location, but_response_to_staged_tablematched the vendedstorage-credentialsagainst that missing location._resolve_storage_credentialsreturns{}for a falsy location, so the staged table'sFileIOnever received the credentials and writes fell back to ambient credentials or failed without them.create_tablewith the same response kept the credentials.The staged path now matches against the table location from
metadata.location, with a trailing slash so a credential prefix likegs://bucket/ns/t/matches, whilecreate_tableis unchanged.Are these changes tested?
Yes.
tests/catalog/test_rest.py::test_create_staged_table_with_storage_credentialsreturns a staged response withstorage-credentialsand nometadata-location, then asserts the vended token reaches the staged table'sFileIO. On main the test fails withKeyError: 'gcs.oauth2.token'.Full unit suite:
4532 passed, 5 skipped.prek run -apasses.Are there any user-facing changes?
Yes.
create_table_transactionnow keeps the vended storage credentials returned by the REST catalog for staged creates, matching the behavior ofcreate_table.Closes #4325