From 2c2ef63ba852a510aa28ed2d8cd3b002681ed7e9 Mon Sep 17 00:00:00 2001 From: Feny Mehta Date: Mon, 25 Mar 2024 18:37:28 +0530 Subject: [PATCH 1/4] Rename the ToolchainCluster controller to ToolchainCluster_cache controller Signed-off-by: Feny Mehta --- go.mod | 2 ++ go.sum | 4 ++-- main.go | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index d7fd37b7f..5029dd18d 100644 --- a/go.mod +++ b/go.mod @@ -114,3 +114,5 @@ require ( ) go 1.20 + +replace github.com/codeready-toolchain/toolchain-common => github.com/fbm3307/toolchain-common v0.0.0-20240325124307-e711469fec6d diff --git a/go.sum b/go.sum index 5b673a9f8..c08df56cf 100644 --- a/go.sum +++ b/go.sum @@ -138,8 +138,6 @@ github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoC github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/codeready-toolchain/api v0.0.0-20240322110702-5ab3840476e9 h1:Lm7bFLrzfJzrUiRGVqtsSaZMpj+akLiR/fvAFjjE9gM= github.com/codeready-toolchain/api v0.0.0-20240322110702-5ab3840476e9/go.mod h1:cfNN6YPX4TORvhhZXMSjSPesqAHlB3nD/WAfGe4WLKQ= -github.com/codeready-toolchain/toolchain-common v0.0.0-20240322131000-8d44f7428e83 h1:j+3snE8RGTyB5MdwPUqIfmAm9C2aScCni+ma1EveC4c= -github.com/codeready-toolchain/toolchain-common v0.0.0-20240322131000-8d44f7428e83/go.mod h1:OJ3L9aaTRMGjxr2WeH/9l6m5OjExwEK3Bp/+P+efoGg= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -193,6 +191,8 @@ github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+ne github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI= +github.com/fbm3307/toolchain-common v0.0.0-20240325124307-e711469fec6d h1:/g0OvY5tHYmmnSVSjgY1GxEHW1fFjl37NzxhgDVqhzw= +github.com/fbm3307/toolchain-common v0.0.0-20240325124307-e711469fec6d/go.mod h1:OJ3L9aaTRMGjxr2WeH/9l6m5OjExwEK3Bp/+P+efoGg= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= diff --git a/main.go b/main.go index d69accafd..70adb8565 100644 --- a/main.go +++ b/main.go @@ -33,7 +33,7 @@ import ( "github.com/codeready-toolchain/host-operator/pkg/templates/nstemplatetiers" "github.com/codeready-toolchain/host-operator/pkg/templates/usertiers" "github.com/codeready-toolchain/host-operator/version" - "github.com/codeready-toolchain/toolchain-common/controllers/toolchaincluster" + "github.com/codeready-toolchain/toolchain-common/controllers/toolchaincluster_cache" commonclient "github.com/codeready-toolchain/toolchain-common/pkg/client" commoncluster "github.com/codeready-toolchain/toolchain-common/pkg/cluster" commonconfig "github.com/codeready-toolchain/toolchain-common/pkg/configuration" @@ -215,7 +215,7 @@ func main() { // nolint:gocyclo } // Setup all Controllers - if err = toolchaincluster.NewReconciler( + if err = toolchaincluster_cache.NewReconciler( mgr, namespace, memberClientTimeout, @@ -382,7 +382,7 @@ func main() { // nolint:gocyclo } setupLog.Info("Starting ToolchainCluster health checks.") - toolchaincluster.StartHealthChecks(ctx, mgr, namespace, 10*time.Second) + toolchaincluster_cache.StartHealthChecks(ctx, mgr, namespace, 10*time.Second) // create or update Toolchain status during the operator deployment setupLog.Info("Creating/updating the ToolchainStatus resource") From 297336f840d09354906e791c521df9ebd3d579c3 Mon Sep 17 00:00:00 2001 From: Feny Mehta Date: Wed, 27 Mar 2024 11:37:30 +0530 Subject: [PATCH 2/4] removing underscore in package name Signed-off-by: Feny Mehta --- go.mod | 4 ++-- go.sum | 4 ++-- main.go | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 5029dd18d..18710ee20 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,7 @@ module github.com/codeready-toolchain/host-operator +replace github.com/codeready-toolchain/toolchain-common => github.com/fbm3307/toolchain-common v0.0.0-20240327060316-2473a65f2520 + require ( github.com/codeready-toolchain/api v0.0.0-20240322110702-5ab3840476e9 github.com/codeready-toolchain/toolchain-common v0.0.0-20240322131000-8d44f7428e83 @@ -114,5 +116,3 @@ require ( ) go 1.20 - -replace github.com/codeready-toolchain/toolchain-common => github.com/fbm3307/toolchain-common v0.0.0-20240325124307-e711469fec6d diff --git a/go.sum b/go.sum index c08df56cf..80e9fea7f 100644 --- a/go.sum +++ b/go.sum @@ -191,8 +191,8 @@ github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+ne github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI= -github.com/fbm3307/toolchain-common v0.0.0-20240325124307-e711469fec6d h1:/g0OvY5tHYmmnSVSjgY1GxEHW1fFjl37NzxhgDVqhzw= -github.com/fbm3307/toolchain-common v0.0.0-20240325124307-e711469fec6d/go.mod h1:OJ3L9aaTRMGjxr2WeH/9l6m5OjExwEK3Bp/+P+efoGg= +github.com/fbm3307/toolchain-common v0.0.0-20240327060316-2473a65f2520 h1:monNakHFVRUBR+tJ/cPoQLwqljO0DYWy0tneNpAhuSI= +github.com/fbm3307/toolchain-common v0.0.0-20240327060316-2473a65f2520/go.mod h1:OJ3L9aaTRMGjxr2WeH/9l6m5OjExwEK3Bp/+P+efoGg= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= diff --git a/main.go b/main.go index 70adb8565..6581a0cfc 100644 --- a/main.go +++ b/main.go @@ -33,7 +33,7 @@ import ( "github.com/codeready-toolchain/host-operator/pkg/templates/nstemplatetiers" "github.com/codeready-toolchain/host-operator/pkg/templates/usertiers" "github.com/codeready-toolchain/host-operator/version" - "github.com/codeready-toolchain/toolchain-common/controllers/toolchaincluster_cache" + "github.com/codeready-toolchain/toolchain-common/controllers/toolchainclustercache" commonclient "github.com/codeready-toolchain/toolchain-common/pkg/client" commoncluster "github.com/codeready-toolchain/toolchain-common/pkg/cluster" commonconfig "github.com/codeready-toolchain/toolchain-common/pkg/configuration" @@ -215,7 +215,7 @@ func main() { // nolint:gocyclo } // Setup all Controllers - if err = toolchaincluster_cache.NewReconciler( + if err = toolchainclustercache.NewReconciler( mgr, namespace, memberClientTimeout, @@ -382,7 +382,7 @@ func main() { // nolint:gocyclo } setupLog.Info("Starting ToolchainCluster health checks.") - toolchaincluster_cache.StartHealthChecks(ctx, mgr, namespace, 10*time.Second) + toolchainclustercache.StartHealthChecks(ctx, mgr, namespace, 10*time.Second) // create or update Toolchain status during the operator deployment setupLog.Info("Creating/updating the ToolchainStatus resource") From 49a42a34442a9f50bc0500e725f5f0be3a36d97f Mon Sep 17 00:00:00 2001 From: Feny Mehta Date: Wed, 27 Mar 2024 18:50:54 +0530 Subject: [PATCH 3/4] Updating the error msg Signed-off-by: Feny Mehta --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 6581a0cfc..08056db72 100644 --- a/main.go +++ b/main.go @@ -220,7 +220,7 @@ func main() { // nolint:gocyclo namespace, memberClientTimeout, ).SetupWithManager(mgr); err != nil { - setupLog.Error(err, "unable to create controller", "controller", "ToolchainCluster") + setupLog.Error(err, "unable to create controller", "controller", "ToolchainClusterCache") os.Exit(1) } if err := (&deactivation.Reconciler{ From bc7032a09b372ba744278ba9f2cdb9e9b7c37238 Mon Sep 17 00:00:00 2001 From: Feny Mehta Date: Wed, 3 Apr 2024 13:09:21 +0530 Subject: [PATCH 4/4] Updating toolchaincommon Signed-off-by: Feny Mehta --- go.mod | 4 +--- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 18710ee20..2b1284fb1 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,8 @@ module github.com/codeready-toolchain/host-operator -replace github.com/codeready-toolchain/toolchain-common => github.com/fbm3307/toolchain-common v0.0.0-20240327060316-2473a65f2520 - require ( github.com/codeready-toolchain/api v0.0.0-20240322110702-5ab3840476e9 - github.com/codeready-toolchain/toolchain-common v0.0.0-20240322131000-8d44f7428e83 + github.com/codeready-toolchain/toolchain-common v0.0.0-20240403070054-183e7d407080 github.com/davecgh/go-spew v1.1.1 // indirect github.com/ghodss/yaml v1.0.0 github.com/go-bindata/go-bindata v3.1.2+incompatible diff --git a/go.sum b/go.sum index 80e9fea7f..98ce59e69 100644 --- a/go.sum +++ b/go.sum @@ -138,6 +138,8 @@ github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoC github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/codeready-toolchain/api v0.0.0-20240322110702-5ab3840476e9 h1:Lm7bFLrzfJzrUiRGVqtsSaZMpj+akLiR/fvAFjjE9gM= github.com/codeready-toolchain/api v0.0.0-20240322110702-5ab3840476e9/go.mod h1:cfNN6YPX4TORvhhZXMSjSPesqAHlB3nD/WAfGe4WLKQ= +github.com/codeready-toolchain/toolchain-common v0.0.0-20240403070054-183e7d407080 h1:2ZzjVjiEbQmJoLrGfY4A4VH4MEkYj030aZ1gnDUhLgs= +github.com/codeready-toolchain/toolchain-common v0.0.0-20240403070054-183e7d407080/go.mod h1:OJ3L9aaTRMGjxr2WeH/9l6m5OjExwEK3Bp/+P+efoGg= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -191,8 +193,6 @@ github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+ne github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI= -github.com/fbm3307/toolchain-common v0.0.0-20240327060316-2473a65f2520 h1:monNakHFVRUBR+tJ/cPoQLwqljO0DYWy0tneNpAhuSI= -github.com/fbm3307/toolchain-common v0.0.0-20240327060316-2473a65f2520/go.mod h1:OJ3L9aaTRMGjxr2WeH/9l6m5OjExwEK3Bp/+P+efoGg= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=