From a13056e4ee5b7e9d9571a97a9867292ac5c7f71b Mon Sep 17 00:00:00 2001 From: David Fridrich <49119790+gauron99@users.noreply.github.com> Date: Wed, 4 Sep 2024 12:08:32 +0200 Subject: [PATCH] migrate client-pkg to client/pkg (#2477) * migrate Signed-off-by: David Fridrich * migrate more Signed-off-by: David Fridrich * sort imports Signed-off-by: David Fridrich --------- Signed-off-by: David Fridrich --- cmd/deploy.go | 3 ++- cmd/root.go | 2 +- cmd/root_test.go | 2 +- cmd/templates/command_groups_test.go | 4 ++-- cmd/templates/template_engine_test.go | 4 ++-- go.mod | 5 +++-- go.sum | 6 ++++-- pkg/knative/client.go | 4 ++-- pkg/knative/deployer.go | 10 +++++----- pkg/knative/describer.go | 2 +- pkg/knative/lister.go | 2 +- plugin/plugin.go | 2 +- 12 files changed, 25 insertions(+), 21 deletions(-) diff --git a/cmd/deploy.go b/cmd/deploy.go index cd7edcf3db..e986eff99c 100644 --- a/cmd/deploy.go +++ b/cmd/deploy.go @@ -12,7 +12,8 @@ import ( "github.com/ory/viper" "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/api/resource" - "knative.dev/client-pkg/pkg/util" + "knative.dev/client/pkg/util" + "knative.dev/func/pkg/builders" "knative.dev/func/pkg/config" fn "knative.dev/func/pkg/functions" diff --git a/cmd/root.go b/cmd/root.go index 633577aeb2..254104df30 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -13,7 +13,7 @@ import ( "github.com/spf13/pflag" "golang.org/x/term" "k8s.io/apimachinery/pkg/util/sets" - "knative.dev/client-pkg/pkg/util" + "knative.dev/client/pkg/util" "knative.dev/func/cmd/templates" "knative.dev/func/pkg/config" diff --git a/cmd/root_test.go b/cmd/root_test.go index 1a1fe3ed62..4e7e2ce55a 100644 --- a/cmd/root_test.go +++ b/cmd/root_test.go @@ -11,7 +11,7 @@ import ( "testing" "github.com/ory/viper" - "knative.dev/client-pkg/pkg/util" + "knative.dev/client/pkg/util" fn "knative.dev/func/pkg/functions" . "knative.dev/func/pkg/testing" diff --git a/cmd/templates/command_groups_test.go b/cmd/templates/command_groups_test.go index b64c4bac35..3469ab9df8 100644 --- a/cmd/templates/command_groups_test.go +++ b/cmd/templates/command_groups_test.go @@ -21,8 +21,8 @@ import ( "github.com/spf13/cobra" "gotest.tools/v3/assert" - "knative.dev/client-pkg/pkg/util" - "knative.dev/client-pkg/pkg/util/test" + "knative.dev/client/pkg/util" + "knative.dev/client/pkg/util/test" ) var groups = CommandGroups{ diff --git a/cmd/templates/template_engine_test.go b/cmd/templates/template_engine_test.go index 5d5b7fd245..a9b4af952a 100644 --- a/cmd/templates/template_engine_test.go +++ b/cmd/templates/template_engine_test.go @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" "gotest.tools/v3/assert" - "knative.dev/client-pkg/pkg/util" - "knative.dev/client-pkg/pkg/util/test" + "knative.dev/client/pkg/util" + "knative.dev/client/pkg/util/test" ) type testData struct { diff --git a/go.mod b/go.mod index b76aef4d46..24a3ea5fd7 100644 --- a/go.mod +++ b/go.mod @@ -60,7 +60,7 @@ require ( k8s.io/apimachinery v0.30.3 k8s.io/client-go v1.5.2 k8s.io/klog/v2 v2.130.1 - knative.dev/client-pkg v0.0.0-20240903141311-eb73a58a643f + knative.dev/client/pkg v0.0.0-20240903145132-9728a1e0fdbe knative.dev/eventing v0.42.1-0.20240902133926-07d379056bd8 knative.dev/hack v0.0.0-20240814130635-06f7aff93954 knative.dev/pkg v0.0.0-20240815051656-89743d9bbf7c @@ -285,7 +285,8 @@ require ( k8s.io/cli-runtime v0.29.2 // indirect k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8 // indirect k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect - knative.dev/networking v0.0.0-20240808015019-d4c57cd4a1b3 // indirect + knative.dev/client-pkg v0.0.0-20240903141311-eb73a58a643f // indirect + knative.dev/networking v0.0.0-20240815142417-37fdbdd0854b // indirect sigs.k8s.io/controller-runtime v0.7.2 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect diff --git a/go.sum b/go.sum index 5d0e914bc3..f604491674 100644 --- a/go.sum +++ b/go.sum @@ -2737,12 +2737,14 @@ k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1 k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= knative.dev/client-pkg v0.0.0-20240903141311-eb73a58a643f h1:z9Oxc+vpsoYrsyovO8agFR0E9k4ADljEHbphHw/I9DA= knative.dev/client-pkg v0.0.0-20240903141311-eb73a58a643f/go.mod h1:LZur1NaQ0sSun/QEZ5R2I99bS5lOW//Y68JLpUEpkJc= +knative.dev/client/pkg v0.0.0-20240903145132-9728a1e0fdbe h1:WPcavuBgU/gOqyfiHrkL0zNvhUqrbDrEE+gCtNZ1qYw= +knative.dev/client/pkg v0.0.0-20240903145132-9728a1e0fdbe/go.mod h1:JR3XomuVf2cBqgvXFONkX6Ebf1/gJwUnl/1OH47U18g= knative.dev/eventing v0.42.1-0.20240902133926-07d379056bd8 h1:doFWIRq/Gsoha36qpKBDv6gHqV4/wzlcvtvy2M/MJ74= knative.dev/eventing v0.42.1-0.20240902133926-07d379056bd8/go.mod h1:Clx8z37Nwg321H9+vGNxp5C6bVdo4l4XM5g6T5CgZVI= knative.dev/hack v0.0.0-20240814130635-06f7aff93954 h1:dGMK5VoL75szvrYQTL9NqhPYHu1f5dGaXx1hJI8fAFM= knative.dev/hack v0.0.0-20240814130635-06f7aff93954/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY= -knative.dev/networking v0.0.0-20240808015019-d4c57cd4a1b3 h1:KfIea0RVx0QfHK0gHruJfacT2kBVb4hZE8Sgzs32KKo= -knative.dev/networking v0.0.0-20240808015019-d4c57cd4a1b3/go.mod h1:QsOtfjxoHEzWvLa8y+mSts95UKUmzTvmgPxWoi7XHMQ= +knative.dev/networking v0.0.0-20240815142417-37fdbdd0854b h1:ws/Jeho6on84+5tfNKLAKriVVGIwivHbgPEtZjBfcs0= +knative.dev/networking v0.0.0-20240815142417-37fdbdd0854b/go.mod h1:2eMQVGLBZ5Kj1C4kKPuPhO7BsUeF6fkmhZFDQPIP+88= knative.dev/pkg v0.0.0-20240815051656-89743d9bbf7c h1:2crXVk4FG0dSG6WHaIT+WKbUzn7qG2wn0AfYmvA22zs= knative.dev/pkg v0.0.0-20240815051656-89743d9bbf7c/go.mod h1:cI2RPEEHZk+/dBpfHobs0aBdPA1mMZVUVWnGAc8NSzM= knative.dev/serving v0.42.1-0.20240903112117-f07e3d6f307e h1:9jeMRAUZaD3/T8LxH0gLWom7WUMcS2q00GUzqCNEQic= diff --git a/pkg/knative/client.go b/pkg/knative/client.go index 55c5fe3755..3abc594188 100644 --- a/pkg/knative/client.go +++ b/pkg/knative/client.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - clienteventingv1 "knative.dev/client-pkg/pkg/eventing/v1" - clientservingv1 "knative.dev/client-pkg/pkg/serving/v1" + clienteventingv1 "knative.dev/client/pkg/eventing/v1" + clientservingv1 "knative.dev/client/pkg/serving/v1" eventingv1 "knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1" servingv1 "knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1" diff --git a/pkg/knative/deployer.go b/pkg/knative/deployer.go index fc23818bec..f4012c55d3 100644 --- a/pkg/knative/deployer.go +++ b/pkg/knative/deployer.go @@ -9,7 +9,7 @@ import ( "strings" "time" - clienteventingv1 "knative.dev/client-pkg/pkg/eventing/v1" + clienteventingv1 "knative.dev/client/pkg/eventing/v1" eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1" duckv1 "knative.dev/pkg/apis/duck/v1" @@ -19,10 +19,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/rand" "k8s.io/apimachinery/pkg/util/sets" - "knative.dev/client-pkg/pkg/flags" - servingclientlib "knative.dev/client-pkg/pkg/serving" - clientservingv1 "knative.dev/client-pkg/pkg/serving/v1" - "knative.dev/client-pkg/pkg/wait" + "knative.dev/client/pkg/flags" + servingclientlib "knative.dev/client/pkg/serving" + clientservingv1 "knative.dev/client/pkg/serving/v1" + "knative.dev/client/pkg/wait" "knative.dev/serving/pkg/apis/autoscaling" v1 "knative.dev/serving/pkg/apis/serving/v1" diff --git a/pkg/knative/describer.go b/pkg/knative/describer.go index 46a003f16a..e8b55af6fd 100644 --- a/pkg/knative/describer.go +++ b/pkg/knative/describer.go @@ -5,7 +5,7 @@ import ( "fmt" "k8s.io/apimachinery/pkg/api/errors" - clientservingv1 "knative.dev/client-pkg/pkg/serving/v1" + clientservingv1 "knative.dev/client/pkg/serving/v1" eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1" fn "knative.dev/func/pkg/functions" diff --git a/pkg/knative/lister.go b/pkg/knative/lister.go index 124e5e9cd0..b83b71e4d4 100644 --- a/pkg/knative/lister.go +++ b/pkg/knative/lister.go @@ -4,7 +4,7 @@ import ( "context" corev1 "k8s.io/api/core/v1" - clientservingv1 "knative.dev/client-pkg/pkg/serving/v1" + clientservingv1 "knative.dev/client/pkg/serving/v1" "knative.dev/pkg/apis" fn "knative.dev/func/pkg/functions" diff --git a/plugin/plugin.go b/plugin/plugin.go index 57a60f7d7f..88e1de6466 100644 --- a/plugin/plugin.go +++ b/plugin/plugin.go @@ -8,7 +8,7 @@ import ( "strings" "syscall" - "knative.dev/client-pkg/pkg/plugin" + "knative.dev/client/pkg/plugin" "knative.dev/func/cmd" )