Skip to content

feat(storage): expose metadata parameter in asyncio gRPC calls#17634

Open
ankitaluthra1 wants to merge 5 commits into
googleapis:mainfrom
ankitaluthra1:main
Open

feat(storage): expose metadata parameter in asyncio gRPC calls#17634
ankitaluthra1 wants to merge 5 commits into
googleapis:mainfrom
ankitaluthra1:main

Conversation

@ankitaluthra1

Copy link
Copy Markdown

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #17633 🦕

@ankitaluthra1 ankitaluthra1 requested a review from a team as a code owner July 6, 2026 18:14
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@ankitaluthra1

Copy link
Copy Markdown
Author

/gemini review

@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 introduces metadata tracking and propagation across several asynchronous components in the Google Cloud Storage library, specifically updating AsyncAppendableObjectWriter, AsyncMultiRangeDownloader, and AsyncGRPCClient to support and persist custom metadata, timeouts, and retries. Corresponding unit tests have been added to verify these behaviors. The review feedback highlights a critical issue in both append() and download_ranges() where custom metadata passed directly to these methods is not persisted to the instance's self.metadata attribute, which would cause stream resumption and retry logic to incorrectly fall back to the older metadata.

await self._grpc_client.delete_object(request=request)
await self._grpc_client.delete_object(
request=request,
metadata=metadata,

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.

can you validate the inputs before passing here ? like it should be list/tuple with key, value pairs.

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.

we don't need changes in this file!

Because metadata is sent only once in grpc stream. ( ie only on the first message, subsequent messages cannot accept grpc metadata values)

http://shortn/_BSYTEc73mz

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done

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.

similar to mrd we don't need changes in this file as well.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done

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.

Feature Request: Expose metadata parameter in Storage asyncio gRPC client methods

2 participants