Skip to content

feat(storage): add support for object context#32902

Open
shubhangi-google wants to merge 2 commits intogoogleapis:mainfrom
shubhangi-google:set_object_context
Open

feat(storage): add support for object context#32902
shubhangi-google wants to merge 2 commits intogoogleapis:mainfrom
shubhangi-google:set_object_context

Conversation

@shubhangi-google
Copy link
Contributor

@shubhangi-google shubhangi-google commented Mar 18, 2026

This pull request introduces new functionality to the Google::Cloud::Storage::File class, enabling direct manipulation of an object's context. This enhancement provides greater control over file metadata, facilitating more nuanced data management within Google Cloud Storage.

Highlights

  • Object Contexts Support: Introduced comprehensive support for Google Cloud Storage Object Contexts, allowing users to attach custom key-value pairs to objects for enhanced metadata management.
  • Listing and Filtering: Added the ability to filter object listings based on Object Contexts, supporting queries for presence, absence, existence, and non-existence of specific context keys or key-value pairs.
  • Input Validation: Implemented validation to prevent the use of forbidden characters (double quotes) in Object Context keys and values, ensuring compatibility with GCS filter string syntax.
  • System and Unit Tests: Expanded test coverage with new system and unit tests to verify the functionality of Object Contexts across various scenarios, including creation, updates, copying, combining, and filtering.

@shubhangi-google shubhangi-google marked this pull request as ready for review March 18, 2026 07:55
@shubhangi-google shubhangi-google requested review from a team and yoshi-approver as code owners March 18, 2026 07:55
@snippet-bot
Copy link

snippet-bot bot commented Mar 18, 2026

Here is the summary of changes.

You are about to add 3 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@aandreassa aandreassa added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 19, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 19, 2026
@aandreassa aandreassa added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Mar 21, 2026
@aandreassa
Copy link
Contributor

Temporarily adding label. We can remove next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Indicates a pull request not ready for merge, due to either quality or timing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants