Uh oh!
There was an error while loading. Please reload this page.
feat(storage): expose object_metadata on AsyncMultiRangeDownloader - #17411
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds tracking for object metadata in the AsyncMultiRangeDownloader class by initializing and copying object_metadata from the underlying stream. The reviewer suggests refactoring this attribute into a read-only property that dynamically delegates to the stream, which simplifies the code by removing the need for manual assignments in multiple places.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
chandra-siri
commented
Jun 17, 2026
Hi @yuxin00j Can you also add a system test for the same in packages/google-cloud-storage/tests/system/test_zonal.py since this PR is approved, you may do it in follow up PR |
Uh oh!
There was an error while loading. Please reload this page.
This PR exposes the
object_metadataattribute on theAsyncMultiRangeDownloaderclass.Context
In PR #17261,
object_metadatawas successfully exposed on theAsyncReadObjectStream. However, it was not surfaced on theAsyncMultiRangeDownloader(MRD), meaning high-level libraries relying on MRD (likefsspec/gcsfs) cannot access the underlying gRPC metadata.By inheriting and surfacing
self.object_metadata = self.read_obj_str.object_metadata, this allows downstream users to completely bypass redundantRESTinfo()API calls and extract fields likecrc32c,size, andgenerationdirectly from the MRD instance.cc @chandra-siri