Skip to content

feat(storage): expose object_metadata on AsyncMultiRangeDownloader#17411

Open
yuxin00j wants to merge 3 commits into
googleapis:mainfrom
yuxin00j:expose-object-metadata
Open

feat(storage): expose object_metadata on AsyncMultiRangeDownloader#17411
yuxin00j wants to merge 3 commits into
googleapis:mainfrom
yuxin00j:expose-object-metadata

Conversation

@yuxin00j

Copy link
Copy Markdown

This PR exposes the object_metadata attribute on the AsyncMultiRangeDownloader class.

Context

In PR #17261, object_metadata was successfully exposed on the AsyncReadObjectStream. However, it was not surfaced on the AsyncMultiRangeDownloader (MRD), meaning high-level libraries relying on MRD (like fsspec/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 redundant REST info() API calls and extract fields like crc32c, size, and generation directly from the MRD instance.

cc @chandra-siri

@yuxin00j yuxin00j requested a review from a team as a code owner June 10, 2026 04:24

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@yuxin00j yuxin00j requested a review from chandra-siri June 10, 2026 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant