feat: add fixed-key metadata support in AAOW#16817
Conversation
This change extends `blob_to_proto` in `_grpc_conversions.py` to support additional fixed-key metadata fields when creating an object via the gRPC-based AsyncAppendableObjectWriter. Supported fields added: - Simple mappings: cache_control, content_disposition, content_encoding, content_language, temporary_hold, event_based_hold. - Complex mappings: custom_time (datetime), acl (ObjectAccessControl), contexts (ObjectContexts), and retention (Object.Retention). Also updated unit tests and system tests to verify these new fields. Co-authored-by: nidhiii-27 <224584462+nidhiii-27@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Code Review
This pull request expands the gRPC conversion logic for Blob objects to include additional metadata fields such as cache_control, custom_time, acl, and retention, supported by new unit and system tests. The review feedback identifies that the check for the loaded attribute on ACLs is too restrictive for upload operations and recommends a more concise implementation using a list comprehension.
f68a35f to
baddf92
Compare
| resource_params["custom_time"] = custom_time_proto | ||
|
|
||
| acl = getattr(blob, "acl", None) | ||
| if acl is not None and getattr(acl, "loaded", False): |
There was a problem hiding this comment.
nit: what does this refer to ?
Add fixed-key metadata support in AAOW by updating
blob_to_protoconversion logic._grpc_conversions.pywith simple and complex field mappings.tests/unit/test__grpc_conversions.py.tests/system/test_zonal.py.tests/unit/asyncio/test_async_write_object_stream.py.PR created automatically by Jules for task 11384837182247010380 started by @nidhiii-27