mchades commented on code in PR #13851:
URL: https://github.com/apache/gravitino/pull/13851#discussion_r4560180616
##########
clients/client-python/gravitino/filesystem/gvfs_base_operations.py:
##########
@@ -525,13 +525,26 @@ def _merge_fileset_properties(
:param actual_location: The actual storage location
:return: Merged properties dictionary
"""
+ metalake_name = fileset_ident.namespace().level(0)
catalog_name = fileset_ident.namespace().level(1)
schema_name = fileset_ident.namespace().level(2)
- catalog = self._get_gravitino_client().load_catalog(catalog_name)
- schema = catalog.as_schemas().load_schema(schema_name)
- fileset = catalog.as_fileset_catalog().load_fileset(
- NameIdentifier.of(schema_name, fileset_ident.name())
- )
+ if self._enable_fileset_metadata_cache:
+ # Go through the metadata cache so that an operation does not
reload the
+ # catalog, schema and fileset. Secrets are not cached and are still
+ # fetched on every call.
+ catalog = self._get_fileset_catalog(
+ NameIdentifier.of(metalake_name, catalog_name)
+ )
+ schema = self._get_fileset_schema(
+ NameIdentifier.of(metalake_name, catalog_name, schema_name)
+ )
+ fileset = self._get_fileset(fileset_ident)
Review Comment:
With the metadata cache enabled, removing a fileset-level
`s3_secret_access_key` override leaves `******` in the cached
`fileset.properties()`. On the next access, that placeholder overwrites the
freshly fetched catalog credential. `fileset.get_secrets()` no longer returns
the removed key, so the S3 client receives `******`.
Please skip masked values when merging metadata properties, as the Java
client does, and add a regression test that removes the override and verifies
the catalog credential reaches S3.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]