Commit a0171ae
feat(storage): expose object_metadata on AsyncMultiRangeDownloader (#17411)
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
---------
Co-authored-by: Anthonios Partheniou <partheniou@google.com>1 parent dfed785 commit a0171ae
2 files changed
Lines changed: 8 additions & 0 deletions
File tree
- packages/google-cloud-storage
- google/cloud/storage/asyncio
- tests/unit/asyncio
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
276 | 278 | | |
277 | 279 | | |
278 | 280 | | |
| 281 | + | |
279 | 282 | | |
280 | 283 | | |
281 | 284 | | |
| |||
0 commit comments