Repository navigation
feat(spanner): add send_message and ack_message to Commit - #262
Merged
Merged
Conversation
torreypayne
added this pull request to stack #266
October 12, 2026 19:55
This was referenced Oct 12, 2026
torreypayne
force-pushed
the
queues/2-commit
branch
from
October 13, 2026 20:11
1d694a2 to
b222ced
Compare
torreypayne
marked this pull request as ready for review
October 13, 2026 20:17
torreypayne
force-pushed
the
queues/2-commit
branch
from
October 14, 2026 15:34
b222ced to
54ec305
Compare
quartzmo
reviewed
Oct 16, 2026
quartzmo
left a comment
Member
There was a problem hiding this comment.
LGTM. The unit tests pass on Ruby 3.2 through 4.0 locally. Two small notes:
- The description says "Keys work like
Commit#delete", but for an Array they don't:delete "T", [1, 2]deletes two keys, whilesend_message "Q", [1, 2], ...sends one composite key(1, 2). The method docs are right; it's only the description, which does matter if it ends up in the squash commit. - FYI, the new doctest examples fail locally with
unmocked method :create_session, but so do 321 of 365 examples onmain: the doctest mocks still stubbatch_create_sessions. CI doesn't run doctest, so I think you can consider this out of scope for this PR. Just mentioning it.
torreypayne
force-pushed
the
queues/2-commit
branch
from
October 19, 2026 23:40
54ec305 to
0d04f4c
Compare
Member
Author
|
Thanks for the careful read. I fixed the description: |
quartzmo
approved these changes
Oct 20, 2026
quartzmo
left a comment
Member
There was a problem hiding this comment.
LGTM, pending fully green CI.
…arguments Replace the SendOptions and AckOptions classes with keyword arguments, as agreed on #262. Adding an optional keyword later doesn't break callers, and an unknown keyword still raises ArgumentError. Also fix the key_list_value doc: it converts one key, not a list of keys.
The examples wrapped text in a StringIO, which is only right for a queue with a BYTES payload column. On a STRING column the gem would send the Base64 text. Use a String and say the queue's payload column is STRING(MAX), and add a separate BYTES example that wraps binary data.
torreypayne
force-pushed
the
queues/2-commit
branch
from
October 20, 2026 23:21
8f3df87 to
5420d5e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
Commit#send_message(queue, key, payload, deliver_time: nil)andCommit#ack_message(queue, key, ignore_not_found: false). Each adds aSendorAckmutation and returns the key.keyis one message key: a scalar, or an array of the key's column values for a composite primary key. (Commit#deletereads an array as several keys instead.)StringIO.sendbecause that would overrideObject#send.Part 2 of 5, split out of #260.
Transactionsupport comes in part 3.