Skip to content

[Plugins] Use new SDK import paths in the plugin implementations #5879

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

Merged
merged 7 commits into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (

"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
"github.com/pipe-cd/pipecd/pkg/plugin/diff"
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
)

type containerImage struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (

kubeConfigPkg "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
"github.com/pipe-cd/pipecd/pkg/plugin/logpersister/logpersistertest"
"github.com/pipe-cd/pipecd/pkg/plugin/toolregistry/toolregistrytest"
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
"github.com/pipe-cd/piped-plugin-sdk-go/logpersister/logpersistertest"
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
)

func TestPlugin_executeK8sPrimaryRolloutStage(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"

kubeConfigPkg "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
"github.com/pipe-cd/pipecd/pkg/plugin/logpersister/logpersistertest"
"github.com/pipe-cd/pipecd/pkg/plugin/toolregistry/toolregistrytest"
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
"github.com/pipe-cd/piped-plugin-sdk-go/logpersister/logpersistertest"
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
)

func TestPlugin_executeK8sRollbackStage_NoPreviousDeployment(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/pipedv1/plugin/kubernetes/deployment/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"

kubeConfigPkg "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
"github.com/pipe-cd/pipecd/pkg/plugin/logpersister/logpersistertest"
"github.com/pipe-cd/pipecd/pkg/plugin/toolregistry/toolregistrytest"
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
"github.com/pipe-cd/piped-plugin-sdk-go/logpersister/logpersistertest"
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
)

func TestPlugin_executeK8sSyncStage(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/plugin/kubernetes/livestate/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/toolregistry"
"github.com/pipe-cd/pipecd/pkg/plugin/diff"
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
)

type Plugin struct{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"

"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/provider"
"github.com/pipe-cd/pipecd/pkg/plugin/diff"
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
)

func makeTestManifest(t *testing.T, yaml string) provider.Manifest {
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/plugin/kubernetes/provider/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"

"github.com/pipe-cd/pipecd/pkg/plugin/diff"
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
)

func Diff(old, new Manifest, logger *zap.Logger, opts ...diff.Option) (*diff.Result, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/plugin/kubernetes/provider/diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"go.uber.org/zap"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"

"github.com/pipe-cd/pipecd/pkg/plugin/diff"
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
)

func TestDiff(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/plugin/kubernetes/provider/helm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"go.uber.org/zap/zaptest"

"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/toolregistry"
"github.com/pipe-cd/pipecd/pkg/plugin/toolregistry/toolregistrytest"
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
)

func TestTemplateLocalChart(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"go.uber.org/zap/zaptest"

"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/toolregistry"
"github.com/pipe-cd/pipecd/pkg/plugin/toolregistry/toolregistrytest"
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
)

func TestKustomizeTemplate(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/config"
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes/toolregistry"
"github.com/pipe-cd/pipecd/pkg/plugin/toolregistry/toolregistrytest"
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
)

func mustParseManifests(t *testing.T, data string) []Manifest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/pipe-cd/pipecd/pkg/plugin/toolregistry/toolregistrytest"
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
)

func TestRegistry_Kubectl(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (

"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/provider"
"github.com/pipe-cd/pipecd/pkg/plugin/diff"
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
)

type containerImage struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"

kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
"github.com/pipe-cd/pipecd/pkg/plugin/logpersister/logpersistertest"
"github.com/pipe-cd/pipecd/pkg/plugin/toolregistry/toolregistrytest"
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
"github.com/pipe-cd/piped-plugin-sdk-go/logpersister/logpersistertest"
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
)

func TestPlugin_executeK8sMultiRollbackStage_compatibility_k8sPlugin_NoPreviousDeployment(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"

kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
"github.com/pipe-cd/pipecd/pkg/plugin/logpersister/logpersistertest"
"github.com/pipe-cd/pipecd/pkg/plugin/toolregistry/toolregistrytest"
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
"github.com/pipe-cd/piped-plugin-sdk-go/logpersister/logpersistertest"
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
)

func TestPlugin_executeK8sMultiSyncStage(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/provider"
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/toolregistry"
"github.com/pipe-cd/pipecd/pkg/plugin/diff"
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
)

type Plugin struct{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (

kubeconfig "github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/provider"
"github.com/pipe-cd/pipecd/pkg/plugin/diff"
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
)

func makeTestManifest(t *testing.T, yaml string) provider.Manifest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"

"github.com/pipe-cd/pipecd/pkg/plugin/diff"
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
)

func Diff(old, new Manifest, logger *zap.Logger, opts ...diff.Option) (*diff.Result, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"go.uber.org/zap"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"

"github.com/pipe-cd/pipecd/pkg/plugin/diff"
"github.com/pipe-cd/piped-plugin-sdk-go/diff"
)

func TestDiff(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"go.uber.org/zap/zaptest"

"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/toolregistry"
"github.com/pipe-cd/pipecd/pkg/plugin/toolregistry/toolregistrytest"
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
)

func TestTemplateLocalChart(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"go.uber.org/zap/zaptest"

"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/toolregistry"
"github.com/pipe-cd/pipecd/pkg/plugin/toolregistry/toolregistrytest"
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
)

func TestKustomizeTemplate(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/config"
"github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster/toolregistry"
"github.com/pipe-cd/pipecd/pkg/plugin/toolregistry/toolregistrytest"
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
)

func mustParseManifests(t *testing.T, data string) []Manifest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/pipe-cd/pipecd/pkg/plugin/toolregistry/toolregistrytest"
"github.com/pipe-cd/piped-plugin-sdk-go/toolregistry/toolregistrytest"
)

func TestRegistry_Kubectl(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/plugin/wait/wait_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

"github.com/stretchr/testify/assert"

"github.com/pipe-cd/pipecd/pkg/plugin/logpersister/logpersistertest"
sdk "github.com/pipe-cd/piped-plugin-sdk-go"
"github.com/pipe-cd/piped-plugin-sdk-go/logpersister/logpersistertest"
)

func TestWait_Complete(t *testing.T) {
Expand Down