Skip to content

feat(spanner): Adding Send and Ack Mutation Support for Cloud Spanner Queue#13616

Merged
sakthivelmanii merged 3 commits intogoogleapis:mainfrom
finn-the-coder:go_queue_mutation
Jan 30, 2026
Merged

feat(spanner): Adding Send and Ack Mutation Support for Cloud Spanner Queue#13616
sakthivelmanii merged 3 commits intogoogleapis:mainfrom
finn-the-coder:go_queue_mutation

Conversation

@finn-the-coder
Copy link
Copy Markdown
Contributor

feat: Adding Send and Ack Mutation Support for Cloud Spanner Queue
Added new mutation types Send and Ack for Cloud Spanner Queue. Updated Mutation Struct and all the relevant usages. Added Unit Tests and integration test coverage.

@finn-the-coder finn-the-coder requested review from a team January 15, 2026 08:04
@finn-the-coder finn-the-coder requested a review from a team as a code owner January 15, 2026 08:04
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @finn-the-coder, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the Cloud Spanner client library by introducing native support for Cloud Spanner Queues. It provides new mutation operations, Send and Ack, allowing developers to programmatically interact with Spanner Queues for message-based workflows. The changes include updates to the core mutation structure, new API functions for ease of use, and robust testing to ensure the reliability of these new features.

Highlights

  • New Queue Mutation Types: Introduced Send and Ack mutation types to support Cloud Spanner Queue operations, allowing messages to be sent to and acknowledged from queues.
  • Enhanced Mutation Struct: The Mutation struct has been extended with new fields (queue, key, payload, deliverTime, ignoreNotFound) to accommodate the specific requirements of queue mutations.
  • Mutation Helper Functions: Added Send and Ack helper functions, along with SendOption and AckOption types (e.g., WithDeliveryTime, WithIgnoreNotFound), to simplify the creation and configuration of queue-related mutations.
  • Integration Test Coverage: Comprehensive integration tests (TestIntegration_QueueMutations) have been added to validate the functionality of Send and Ack mutations, including verifying message persistence and deletion, and handling of non-existent messages.
  • Spanner Instance Configuration: Integration tests now provision Cloud Spanner instances with Edition: instancepb.Instance_ENTERPRISE_PLUS to ensure queue support is enabled during testing.
  • DDL Statement Additions: DDL statements for creating a TestQueue have been added for both Google Standard SQL and PostgreSQL dialects within the integration test setup.
  • Refactoring of Mutation Initialization: Existing test files (client_test.go, mutation_test.go, request_id_header_test.go) have been updated to use named fields when initializing Mutation structs, improving code readability and maintainability.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

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 introduces support for Send and Ack mutations for Cloud Spanner Queues. The changes are well-structured, including updates to the Mutation struct, new helper functions for creating queue-related mutations, and the necessary logic for protobuf serialization. The feature is supported by a comprehensive set of new unit and integration tests. A notable improvement across the codebase is the refactoring of Mutation struct instantiations to use named fields, which significantly enhances readability and maintainability. My review includes a couple of suggestions to further improve the code by simplifying some logic and adhering to common Go idioms.

@rahul2393
Copy link
Copy Markdown
Contributor

@finn-the-coder please fix the vet issues.

@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 20, 2026
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 20, 2026
@rahul2393 rahul2393 added kokoro:force-run Add this label to force Kokoro to re-run the tests. automerge Merge the pull request once unit tests and other checks pass. labels Jan 29, 2026
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 29, 2026
@sakthivelmanii sakthivelmanii merged commit 1cf600d into googleapis:main Jan 30, 2026
10 of 11 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jan 30, 2026
@rahul2393 rahul2393 changed the title feat: Adding Send and Ack Mutation Support for Cloud Spanner Queue feat(spanner): Adding Send and Ack Mutation Support for Cloud Spanner Queue Jan 30, 2026
rahul2393 added a commit that referenced this pull request Feb 11, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v1.0.0
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/librarian-go@sha256:19bb93e8f1f916c61b597db2bad65dc432f79baaabb210499d7d0e4ad1dffe29
<details><summary>spanner: 1.88.0</summary>

##
[1.88.0](spanner/v1.87.0...spanner/v1.88.0)
(2026-02-11)

### Features

* Adding Send and Ack Mutation Support for Cloud Spanner Queue (#13616)
([1cf600d](1cf600d6))

* include cache updates into the ResultSet response (PiperOrigin-RevId:
865546011)
([6f31019](6f310199))

* add a ClientContext field to Spanner requests (PiperOrigin-RevId:
853323071)
([80379ed](80379edb))

* add Secure Parameters to the ClientContext (PiperOrigin-RevId:
853323071)
([80379ed](80379edb))

* PGNumeric implements Scanner and Valuer (#13722)
([85bc9db](85bc9dbf))

* support struct literal (#13766)
([b4a6f4c](b4a6f4c5))

* Exposing total CPU related fields in AutoscalingConfig
(PiperOrigin-RevId: 845819318)
([db65e79](db65e792))

* add ClientContext support (#13775)
([e85d706](e85d7061))

### Bug Fixes

* disable config logging by default (#13478)
([ad19592](ad19592e))

* decode PG JSONB array to PGJsonB struct (#13602)
([d72d0f4](d72d0f45))

### Performance Improvements

* only create sessions if multiplexed sessions are disabled (#13477)
([e44e58f](e44e58f6))

### Documentation

* A comment for field `param_types` in message
`.google.spanner.v1.PartitionQueryRequest` is changed
(PiperOrigin-RevId: 865546011)
([6f31019](6f310199))

* A comment for field `transaction_tag` in message
`.google.spanner.v1.RequestOptions` is changed (PiperOrigin-RevId:
865546011)
([6f31019](6f310199))

* A comment for field `commit_timestamp` in message
`.google.spanner.v1.BatchWriteResponse` is changed (PiperOrigin-RevId:
865546011)
([6f31019](6f310199))

* A comment for field `params` in message
`.google.spanner.v1.PartitionQueryRequest` is changed
(PiperOrigin-RevId: 865546011)
([6f31019](6f310199))

* Update client side metrics and permission issues in README (#13491)
([ab56892](ab56892e))

* Update high_priority_cpu_utilization_percent in AutoscalingConfig to
be Optional and clarify its behavior when not specified
(PiperOrigin-RevId: 845819318)
([db65e79](db65e792))

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

4 participants