Skip to content

feat: Stop serving destination protocol v0 and v1 - #2659

Merged
kodiakhq[bot] merged 5 commits into
mainfrom
stop-serving-destination-v0-v1
Nov 2, 2026
Merged

kodiakhq[bot] merged 5 commits into
mainfrom
stop-serving-destination-v0-v1

Conversation

@murarustefaan

@murarustefaan murarustefaan commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Plugins built on this SDK stop serving destination protocol v0 and v1, so their destinations no longer accept syncs from sources built on plugin-sdk v3 or older.

Discovery now advertises only protocol v3 for all plugins; WithDestinationV0V1Server is a deprecated no-op and can be removed.

Release note

Users of CLI v3.x to v6.49.2 who sync a source built on plugin-sdk v3 or older (plugin protocol v1 or v2) into a destination built on this SDK get errors such as:

destination plugin postgresql does not support CloudQuery SDK version 1. Please upgrade to a newer version of the postgresql destination plugin
failed to sync v1 source <source>: rpc error: code = Unimplemented desc = unknown service proto.Destination

The first error is misleading, because a newer destination does not help. Upgrade the source to a version built on plugin-sdk v4 or later, or pin the destination to a version released before this change. CLI v6.50.0 and later already reject these sources.

Merge order

Hold the releases until the maintainers ship this set together:

  1. CLI v6.50.0 (chore(main): Release cli v6.50.0 cloudquery#23623) releases first.
  2. This PR merges and plugin-sdk releases. It merges cleanly with feat: Remove unused deprecated APIs and internal scheduler packages #2645 in either order.
  3. feat: Drop support for source plugins on protocol v1 and v2 (plugin-sdk v3 and older) cloudquery#23705 merges only after Renovate bumps every destination it touches to this plugin-sdk release. The bump alone stops serving protocols v0 and v1. Merged earlier, a destination released before its bump advertises protocols v0 to v2 but does not serve them.
  4. feat: Deprecate legacy protocol packages plugin-pb-go#720 releases after this plugin-sdk release. .golangci.yml here already excludes the SA1019 finding it adds for pb/discovery/v0, which the SDK still serves for old CLIs.

Manual QA

  • go build ./... and go test ./serve/... pass. golangci-lint run reports 39 issues, all also on main (47 there).
  • With a replace to the plugin-pb-go branch from feat: Deprecate legacy protocol packages plugin-pb-go#720, golangci-lint run reports no SA1019 finding.
  • Merged with the feat: Remove unused deprecated APIs and internal scheduler packages #2645 branch: go build ./... and go test ./... pass.
  • 36 CloudQuery plugin modules build and pass go vet against the combined branch through a replace directive.
  • A postgresql destination built on the combined branch: discovery v1 returns [3], and calls to the proto.Destination and cloudquery.destination.v1.Destination services return Unimplemented.
  • CLI v3.29.2 syncs a plugin-sdk v4 source into that destination. A protocol v2 source fails with the first error above.

Use the following steps to ensure your PR is ready to be reviewed

  • Read the contribution guidelines 🧑‍🎓
  • Run go fmt to format your code 🖊
  • Lint your changes via golangci-lint run 🚨 (install golangci-lint here)
  • Update or add tests 🧪
  • Ensure the status checks below are successful ✅

@murarustefaan
murarustefaan marked this pull request as ready for review November 2, 2026 13:27
@murarustefaan
murarustefaan requested a review from a team as a code owner November 2, 2026 13:27
@murarustefaan
murarustefaan requested a review from disq November 2, 2026 13:27
@murarustefaan

Copy link
Copy Markdown
Member Author

/agent-reviewer

kodiakhq Bot pushed a commit to cloudquery/plugin-pb-go that referenced this pull request Nov 2, 2026
#### Summary

Marks the generated packages for the legacy plugin protocols, plus `specs` and `metrics`, as deprecated, and stops regenerating them.

| Package | Replacement |
| --- | --- |
| `pb/source/v0`, `pb/source/v1`, `pb/source/v2` | `pb/plugin/v3` |
| `pb/destination/v0`, `pb/destination/v1` | `pb/plugin/v3` |
| `pb/base/v0` | `pb/plugin/v3` |
| `pb/discovery/v0` | `pb/discovery/v1` |
| `pb/analytics/v0` | None |
| `specs` | None |
| `metrics` | None |

The packages stay in the module, so no import breaks. `managedplugin` still uses discovery v0 and the v0 base and source clients to support old plugins, so `.golangci.yml` excludes those SA1019 findings.

#### Merge order

Hold the release until the maintainers ship this set together. Release this only after both of these:

1. cloudquery/plugin-sdk#2659 merges and plugin-sdk releases, so the Renovate bump in plugin-sdk passes `staticcheck`.
2. Internal consumers that still import these packages drop those imports.

See also cloudquery/cloudquery#23705.

#### Manual QA

- [x] `go build ./...` and `golangci-lint run` pass.
- [x] plugin-sdk from cloudquery/plugin-sdk#2659, with a `replace` to this branch, reports no SA1019 finding in `golangci-lint run`.
- [x] `git grep` on `main` finds no import of these packages in CloudQuery plugin code.

---
…ion-v0-v1

# Conflicts:
#	examples/simple_plugin/go.mod
#	go.mod
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

⏱️ Benchmark results

  • Glob-8 ns/op: 102.9
  • Hash1K_New-8 ns/op: 2,661
  • Hash1K_Sum-8 ns/op: 2,812
  • Hash320Bytes_New-8 ns/op: 940.3
  • Hash320Bytes_Sum-8 ns/op: 911.7
  • Hash8Bytes_New-8 ns/op: 203.8
  • Hash8Bytes_Sum-8 ns/op: 192.1
  • Hash8K_New-8 ns/op: 20,227
  • Hash8K_Sum-8 ns/op: 21,156

@murarustefaan

Copy link
Copy Markdown
Member Author

Benchmark deltas are not from this PR: glob and internal/sha1 are unchanged vs the baseline, and the uniform 25-60% slowdown points to runner variance or the Go 1.27.2 bump in #2649.

@kodiakhq
kodiakhq Bot merged commit cd4bebf into main Nov 2, 2026
9 checks passed
@kodiakhq
kodiakhq Bot deleted the stop-serving-destination-v0-v1 branch November 2, 2026 15:31
kodiakhq Bot pushed a commit that referenced this pull request Nov 4, 2026
🤖 I have created a release *beep* *boop*
---


## [4.100.0](v4.99.1...v4.100.0) (2026-11-02)


### Features

* Remove unused deprecated APIs and internal scheduler packages ([#2645](#2645)) ([87ab7ae](87ab7ae))
* Stop serving destination protocol v0 and v1 ([#2659](#2659)) ([cd4bebf](cd4bebf))


### Bug Fixes

* **deps:** Update aws-sdk-go-v2 monorepo ([#2646](#2646)) ([2e59b0f](2e59b0f))
* **deps:** Update go module directive to v1.27.2 ([#2649](#2649)) ([ae7d766](ae7d766))
* **deps:** Update golang.org/x/exp digest to f0251eb ([#2648](#2648)) ([bb564ba](bb564ba))
* **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.28.3 ([#2643](#2643)) ([f92e877](f92e877))
* **deps:** Update module github.com/getsentry/sentry-go to v0.50.0 ([#2651](#2651)) ([b05e611](b05e611))
* **deps:** Update module github.com/goccy/go-json to v0.11.2 ([#2652](#2652)) ([b2137a9](b2137a9))
* **deps:** Update opentelemetry-go monorepo ([#2655](#2655)) ([68f7a35](68f7a35))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
kodiakhq Bot pushed a commit to cloudquery/cloudquery that referenced this pull request Nov 4, 2026
…dk v3 and older) (#23705)

#### Summary

Updates plugin-sdk to v4.100.0 in 20 destinations and removes `serve.WithDestinationV0V1Server()` from them, so they stop serving destination protocol v0 and v1.

#### Release note

Users of CLI v3.x to v6.49.2 who sync a source built on plugin-sdk v3 or older (plugin protocol v1 or v2) into these destinations get errors such as:

```
destination plugin postgresql does not support CloudQuery SDK version 1. Please upgrade to a newer version of the postgresql destination plugin
failed to sync v1 source <source>: rpc error: code = Unimplemented desc = unknown service proto.Destination
```

The first error is misleading, because a newer destination does not help. Upgrade the source to a version built on plugin-sdk v4 or later, or pin the destination to a version released before this change. CLI v6.50.0 and later already reject these sources.

#### Merge order

1. CLI v6.50.0 and plugin-sdk v4.100.0 are released.
2. This PR merges before Renovate's plugin-sdk v4.100.0 update in this repo. v4.100.0 marks `WithDestinationV0V1Server` deprecated, so that update fails lint in these destinations until this PR removes the call.
3. The destinations release after this PR. It updates plugin-sdk and removes the option in one change, so no release advertises protocols v0 to v2 without serving them.

See also cloudquery/plugin-pb-go#720.


#### Manual QA

- [x] All 20 destinations build and pass `go vet` and `golangci-lint run` on plugin-sdk v4.100.0.
- [x] All 20 destinations build and pass `go vet` against the plugin-sdk branch from cloudquery/plugin-sdk#2659 through a `replace` directive.
- [x] postgresql built on that branch: discovery v1 returns `[3]`, and calls to the `proto.Destination` and `cloudquery.destination.v1.Destination` services return `Unimplemented`.
- [x] CLI v3.29.2 syncs a plugin-sdk v4 source into that postgresql build. A protocol v2 source fails with the first error above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants