fix(catalog-sql): forward catalog props to FileIO#2528
Open
kszucs wants to merge 1 commit into
Open
Conversation
Storage-backend keys set on SqlCatalog were not reaching the FileIO because SqlCatalog::new built it without forwarding props, causing 401s on authenticated writes. Matches the RestCatalog wiring.
4941490 to
65eb9b9
Compare
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.
Which issue does this PR close?
What changes are included in this PR?
Storage-backend keys set on
SqlCatalog(e.g. authentication tokens, region overrides) were not reaching theFileIO, becauseSqlCatalog::newbuilt theFileIOfrom theStorageFactoryalone, dropping the props on the floor. Authenticated storage backends then saw empty config and rejected writes with 401s.The fix forwards the catalog props into the
FileIO:This brings
SqlCataloginto parity with theRestCatalog, which already forwards props throughFileIOBuilder::with_props. Storage backends ignore keys they don't recognize, so catalog-only props (pool.*etc.) remain harmless.Are these changes tested?
Yes — added unit test
test_storage_props_propagate_to_file_ioincrates/catalog/sql/src/catalog.rswhich:SqlCatalogwith two storage-backend props (one S3-shaped, one HF-shaped) in the load map.catalog.fileio.config().props().The test fails on
main(the props lookup returnsNone) and passes with this change. Verified locally by reverting the one-line change in the source, observing the assertion failure, then restoring.