Repository navigation
Read py-catalog-impl from the catalog configuration - #4301
Draft
chenjian2664 wants to merge 1 commit into
Draft
chenjian2664 wants to merge 1 commit into
chenjian2664 wants to merge 1 commit into
Conversation
load_catalog only looked for py-catalog-impl in its keyword arguments, so the documented .pyiceberg.yaml and PYICEBERG_CATALOG__* settings were ignored and loading failed with "URI missing". When the implementation was passed as an argument, the custom catalog also lost the properties from the configuration. Read it from the merged configuration and pass that configuration to the custom catalog. test_missing_uri patched the configuration with a MagicMock rather than a Config, so it now patches an empty Config again.
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
load_catalogonly readpy-catalog-implfrom its keyword arguments. A custom catalog configured in.pyiceberg.yaml, as the configuration docs show, or throughPYICEBERG_CATALOG__<NAME>__PY_CATALOG_IMPLwas ignored, so loading failed with "URI missing" or picked another catalog type. When the implementation was passed as an argument, the custom catalog also lost the properties from the configuration file.py-catalog-implis now read from the merged configuration, and that configuration is passed to the custom catalog.Are these changes tested?
Are there any user-facing changes?
Yes. A
py-catalog-implset in the configuration file or environment variables now takes effect.