From e7476173ebf6c0103a07e005ab17befcfce2cc90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Muraru=20=C8=98tefan?= Date: Fri, 30 Oct 2026 17:50:20 +0200 Subject: [PATCH] feat: Deprecate legacy protocol packages --- .golangci.yml | 5 +++++ Makefile | 5 ----- metrics/metrics.go | 3 +++ pb/analytics/v0/doc.go | 4 ++++ pb/base/v0/doc.go | 4 ++++ pb/destination/v0/doc.go | 4 ++++ pb/destination/v1/doc.go | 4 ++++ pb/discovery/v0/doc.go | 4 ++++ pb/source/v0/doc.go | 4 ++++ pb/source/v1/doc.go | 4 ++++ pb/source/v2/doc.go | 4 ++++ specs/doc.go | 2 ++ 12 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 pb/analytics/v0/doc.go create mode 100644 pb/base/v0/doc.go create mode 100644 pb/destination/v0/doc.go create mode 100644 pb/destination/v1/doc.go create mode 100644 pb/discovery/v0/doc.go create mode 100644 pb/source/v0/doc.go create mode 100644 pb/source/v1/doc.go create mode 100644 pb/source/v2/doc.go diff --git a/.golangci.yml b/.golangci.yml index b3f7e401..20d16d3d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -82,6 +82,11 @@ linters: - third_party$ - builtin$ - examples$ + rules: + - path: managedplugin/plugin\.go + linters: + - staticcheck + text: "SA1019: github.com/cloudquery/plugin-pb-go/pb/(base|discovery|source)/v0 is deprecated" issues: max-issues-per-linter: 0 max-same-issues: 0 diff --git a/Makefile b/Makefile index 6b299509..b2ae6627 100644 --- a/Makefile +++ b/Makefile @@ -13,10 +13,5 @@ clone: .PHONY: gen-proto gen-proto: - protoc --proto_path=. --go_out . --go_opt=module="github.com/cloudquery/plugin-pb-go" --go-grpc_out=. --go-grpc_opt=module="github.com/cloudquery/plugin-pb-go" plugin-pb/discovery/v0/discovery.proto - protoc --proto_path=. --go_out . --go_opt=module="github.com/cloudquery/plugin-pb-go" --go-grpc_out=. --go-grpc_opt=module="github.com/cloudquery/plugin-pb-go" plugin-pb/base/v0/base.proto plugin-pb/destination/v0/destination.proto plugin-pb/source/v0/source.proto - protoc --proto_path=. --go_out . --go_opt=module="github.com/cloudquery/plugin-pb-go" --go-grpc_out=. --go-grpc_opt=module="github.com/cloudquery/plugin-pb-go" plugin-pb/source/v1/source.proto - protoc --proto_path=. --go_out . --go_opt=module="github.com/cloudquery/plugin-pb-go" --go-grpc_out=. --go-grpc_opt=module="github.com/cloudquery/plugin-pb-go" plugin-pb/source/v2/source.proto - protoc --proto_path=. --go_out . --go_opt=module="github.com/cloudquery/plugin-pb-go" --go-grpc_out=. --go-grpc_opt=module="github.com/cloudquery/plugin-pb-go" plugin-pb/destination/v1/destination.proto protoc --proto_path=. --go_out . --go_opt=module="github.com/cloudquery/plugin-pb-go" --go-grpc_out=. --go-grpc_opt=module="github.com/cloudquery/plugin-pb-go" plugin-pb/discovery/v1/discovery.proto protoc --proto_path=. --go_out . --go_opt=module="github.com/cloudquery/plugin-pb-go" --go-grpc_out=. --go-grpc_opt=module="github.com/cloudquery/plugin-pb-go" plugin-pb/plugin/v3/plugin.proto diff --git a/metrics/metrics.go b/metrics/metrics.go index eb72cfb7..af9cdba1 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -1,3 +1,6 @@ +// Package metrics contains the sync metrics reported by the legacy source and destination protocols. +// +// Deprecated: This package is only used by the legacy protocols and by the sync summary sent to the analytics v0 service. There is no replacement. package metrics //nolint:revive // var-naming: package name conflicts with standard library but is appropriate for this context import ( diff --git a/pb/analytics/v0/doc.go b/pb/analytics/v0/doc.go new file mode 100644 index 00000000..2aa8de92 --- /dev/null +++ b/pb/analytics/v0/doc.go @@ -0,0 +1,4 @@ +// Package analytics contains the generated code for the analytics protocol v0. +// +// Deprecated: This package is frozen and no longer regenerated. There is no replacement. +package analytics diff --git a/pb/base/v0/doc.go b/pb/base/v0/doc.go new file mode 100644 index 00000000..8311d93b --- /dev/null +++ b/pb/base/v0/doc.go @@ -0,0 +1,4 @@ +// Package base contains the generated code for the messages shared by the source and destination plugin protocol v0. +// +// Deprecated: This package is frozen and no longer regenerated. Use github.com/cloudquery/plugin-pb-go/pb/plugin/v3 instead. +package base diff --git a/pb/destination/v0/doc.go b/pb/destination/v0/doc.go new file mode 100644 index 00000000..05a07459 --- /dev/null +++ b/pb/destination/v0/doc.go @@ -0,0 +1,4 @@ +// Package destination contains the generated code for the destination plugin protocol v0. +// +// Deprecated: This package is frozen and no longer regenerated. Use github.com/cloudquery/plugin-pb-go/pb/plugin/v3 instead. +package destination diff --git a/pb/destination/v1/doc.go b/pb/destination/v1/doc.go new file mode 100644 index 00000000..e2f15814 --- /dev/null +++ b/pb/destination/v1/doc.go @@ -0,0 +1,4 @@ +// Package destination contains the generated code for the destination plugin protocol v1. +// +// Deprecated: This package is frozen and no longer regenerated. Use github.com/cloudquery/plugin-pb-go/pb/plugin/v3 instead. +package destination diff --git a/pb/discovery/v0/doc.go b/pb/discovery/v0/doc.go new file mode 100644 index 00000000..eb0f22c4 --- /dev/null +++ b/pb/discovery/v0/doc.go @@ -0,0 +1,4 @@ +// Package discovery contains the generated code for the discovery protocol v0. +// +// Deprecated: This package is frozen and no longer regenerated. Use github.com/cloudquery/plugin-pb-go/pb/discovery/v1 instead. +package discovery diff --git a/pb/source/v0/doc.go b/pb/source/v0/doc.go new file mode 100644 index 00000000..746e5edd --- /dev/null +++ b/pb/source/v0/doc.go @@ -0,0 +1,4 @@ +// Package source contains the generated code for the source plugin protocol v0. +// +// Deprecated: This package is frozen and no longer regenerated. Use github.com/cloudquery/plugin-pb-go/pb/plugin/v3 instead. +package source diff --git a/pb/source/v1/doc.go b/pb/source/v1/doc.go new file mode 100644 index 00000000..f934748a --- /dev/null +++ b/pb/source/v1/doc.go @@ -0,0 +1,4 @@ +// Package source contains the generated code for the source plugin protocol v1. +// +// Deprecated: This package is frozen and no longer regenerated. Use github.com/cloudquery/plugin-pb-go/pb/plugin/v3 instead. +package source diff --git a/pb/source/v2/doc.go b/pb/source/v2/doc.go new file mode 100644 index 00000000..471c4d8d --- /dev/null +++ b/pb/source/v2/doc.go @@ -0,0 +1,4 @@ +// Package source contains the generated code for the source plugin protocol v2. +// +// Deprecated: This package is frozen and no longer regenerated. Use github.com/cloudquery/plugin-pb-go/pb/plugin/v3 instead. +package source diff --git a/specs/doc.go b/specs/doc.go index db22d708..81a11c46 100644 --- a/specs/doc.go +++ b/specs/doc.go @@ -1,3 +1,5 @@ // Package specs specs for source and destination plugins including // parsers and readers. +// +// Deprecated: These specs are only used by the legacy source and destination protocols. There is no replacement. package specs