Skip to content

feat: add fixed-key metadata support in AAOW#16817

Open
nidhiii-27 wants to merge 4 commits intomainfrom
add-fixed-key-metadata-aaow-11384837182247010380
Open

feat: add fixed-key metadata support in AAOW#16817
nidhiii-27 wants to merge 4 commits intomainfrom
add-fixed-key-metadata-aaow-11384837182247010380

Conversation

@nidhiii-27
Copy link
Copy Markdown
Contributor

Add fixed-key metadata support in AAOW by updating blob_to_proto conversion logic.

  • Updated _grpc_conversions.py with simple and complex field mappings.
  • Added unit tests in tests/unit/test__grpc_conversions.py.
  • Updated system tests in tests/system/test_zonal.py.
  • Fixed regression in tests/unit/asyncio/test_async_write_object_stream.py.

PR created automatically by Jules for task 11384837182247010380 started by @nidhiii-27

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>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copy link
Copy Markdown
Contributor

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

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 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.

@nidhiii-27 nidhiii-27 changed the title Add fixed-key metadata support in AAOW feat: add fixed-key metadata support in AAOW Apr 27, 2026
@nidhiii-27 nidhiii-27 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 29, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 29, 2026
@nidhiii-27 nidhiii-27 force-pushed the add-fixed-key-metadata-aaow-11384837182247010380 branch from f68a35f to baddf92 Compare April 29, 2026 09:27
@nidhiii-27 nidhiii-27 marked this pull request as ready for review April 29, 2026 10:22
@nidhiii-27 nidhiii-27 requested a review from a team as a code owner April 29, 2026 10:22
resource_params["custom_time"] = custom_time_proto

acl = getattr(blob, "acl", None)
if acl is not None and getattr(acl, "loaded", False):
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.

nit: what does this refer to ?

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.

3 participants