Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pubsublite): support seek subscription in AdminClient #4316

Merged
merged 12 commits into from Aug 9, 2021

Conversation

tmdiep
Copy link
Contributor

@tmdiep tmdiep commented Jun 24, 2021

SeekSubscription performs an out-of-band seek for a subscription to a specified target. Adds SeekSubscriptionOperation, which wraps the auto-generated gapic type for polling the seek operation.

@tmdiep tmdiep requested review from a team as code owners June 24, 2021 22:48
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 24, 2021
@product-auto-label product-auto-label bot added the api: pubsublite Issues related to the Pub/Sub Lite API. label Jun 24, 2021
@tmdiep tmdiep added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jun 24, 2021
@tmdiep tmdiep changed the title feat(pubsublite): add AdminClient.SeekSubscription feat(pubsublite): support seeks in AdminClient Jun 24, 2021
@tmdiep tmdiep added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 25, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 25, 2021
@tmdiep tmdiep changed the title feat(pubsublite): support seeks in AdminClient feat(pubsublite): support seek subscription in AdminClient Jul 2, 2021
@tmdiep tmdiep requested review from tbpg and codyoss July 27, 2021 03:24
@tmdiep
Copy link
Contributor Author

tmdiep commented Jul 27, 2021

@codyoss, @tbpg - please review this API change.

I couldn't find other examples of handwritten libraries exposing operation polling. We want to allow waiting for the operation to be optional, as users may want it to be asynchronous in most cases.

Notes:

  • pubsublite.SeekSubscriptionOperation basically just wraps the gapic generated operation, transforming Timestamp protos to time.Time.
  • SeekTarget implements the equivalent of a oneof.
  • SeekSubscriptionOption is a placeholder for future options (which we've deferred). It looks a little strange to define now. But I wanted to avoid introducing another variant of SeekSubscription.

Copy link
Member

@codyoss codyoss left a comment

Choose a reason for hiding this comment

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

A couple of comments, Looks good overall though!

pubsublite/operations.go Show resolved Hide resolved
pubsublite/operations.go Outdated Show resolved Hide resolved
pubsublite/operations.go Show resolved Hide resolved
@tmdiep tmdiep removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 8, 2021
@tmdiep tmdiep merged commit 2dea319 into googleapis:master Aug 9, 2021
@tmdiep tmdiep deleted the seek_subscription branch August 9, 2021 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsublite Issues related to the Pub/Sub Lite API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants