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

pubsub: release v2 library #11368

Open
10 of 19 tasks
hongalex opened this issue Jan 3, 2025 · 0 comments
Open
10 of 19 tasks

pubsub: release v2 library #11368

hongalex opened this issue Jan 3, 2025 · 0 comments
Assignees
Labels
api: pubsub Issues related to the Pub/Sub API.

Comments

@hongalex
Copy link
Member

hongalex commented Jan 3, 2025

The Pub/Sub Go library is in progress to receive a v2 update. Details will be provided in the migration guide of the library but the key differences are

  1. The existing resource management API (admin operations) will be deprecated, and replaced with the gRPC autogenerated surface that the other packages in this repository use. This affects topic, subscription, and schema management and related API.
  2. The Topic and Subscription structs will be renamed to Publisher and Subscriber respectively
  3. Some settings fields will be removed (ReceiveSettings.Synchronous, PublishSettings.BufferedByteLimit, ReceiveSettings.UseLegacyFlowControl)
  4. Some settings fields will be renamed (e.g. MaxExtensionPeriod -> MaxDurationPerLeaseExtension)
  5. Some default settings will be changed (ReceiveSettings.NumGoroutines will now default to 1)

We plan to support the cloud.google.com/go/pubsub (henceforth known as the v1 library) for 1 year from when the v2 library is launched, to give developers proper time to migrate to the v2. We will prioritize new features in v2, but providing security and bug fixes in the v1.

The following steps will be done, and will roughly correspond to 1 PR each, with changes being staged in the pubsub-v2-trunk branch.

  • Create new v2 directory and copy existing v1 surface over
  • Rewrite the imports of v2 directory to point to cloud.google.com/go/pubsub/v2, including GAPIC code chore(pubsub): rewrite v2 files with new package #11292
  • Remove existing handwritten admin API and associated tests from v2 library chore(pubsub): remove handwritten layer from v2 #11367
    • Remove topic admin plane (Create, Delete, List, Update, Exists)
    • Remove subscription admin plane
    • Remove snapshot admin plane
    • Remove schema admin plane
  • Settings refactoring (removal, renaming, default settings changes) deprecate(pubsub/v2): remove and rename existing settings #11375
    • Remove data plane logic for synchronous mode
    • BufferedByteLimit should now only be configured by MaxOutstandingBytes
  • Refactor tests that use removed handwritten admin API to use the v2 GAPIC library
    • Expose autogenerated library (to be used for admin operations) in the Pub/Sub client
  • Rename Topic/Subscription to Publisher/Subscriber (no file name changes) feat(pubsub/v2): rename data plane clients #11376
    • Support referencing Publisher by either topicID or full topic path (projects/p/topics/my-topic)
    • Remove TopicInProject, SubscriptionInProject fields
  • Mark v1 package as deprecated, and all operations that will be removed
  • Configure GAPIC generator to start generating new v2 library
    • Remove temporary GAPIC library used for testing
  • Rename publisher.go and subscriber.go file names

Internal docs link: go/pubsub-admin-generate-go

@hongalex hongalex added the api: pubsub Issues related to the Pub/Sub API. label Jan 3, 2025
@hongalex hongalex self-assigned this Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API.
Projects
None yet
Development

No branches or pull requests

1 participant