From 737b484185d85002cab7acb6228a5141201f2c8e Mon Sep 17 00:00:00 2001 From: Chaitanyareddy0702 Date: Mon, 8 Jul 2024 10:21:48 +0530 Subject: [PATCH 01/20] Update the go version to 1.22 - Change the go version in go.mod to 1.22 Signed-off-by: Chaitanyareddy0702 Author: VibhorChinda Signed-off-by: GW Cloud Common Services --- go.mod | 2 +- go.sum | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 0728c6e..2541ada 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/kubevela/workflow -go 1.19 +go 1.22 require ( cuelang.org/go v0.5.0 diff --git a/go.sum b/go.sum index bc0c73d..70b4b3e 100644 --- a/go.sum +++ b/go.sum @@ -2,7 +2,9 @@ cloud.google.com/go v0.100.2 h1:t9Iw5QH5v4XtlEQaCtUY7x6sCABps8sW0acw7e2WQ6Y= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.15.1 h1:7UGq3QknM33pw5xATlpzeoomNxsacIVvTqTTvbfajmE= +cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cuelang.org/go v0.5.0 h1:D6N0UgTGJCOxFKU8RU+qYvavKNsVc/+ZobmifStVJzU= @@ -55,6 +57,7 @@ github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Microsoft/hcsshim v0.9.6 h1:VwnDOgLeoi2du6dAznfmspNqTiwczvjv4K7NxuY9jsY= +github.com/Microsoft/hcsshim v0.9.6/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= @@ -69,6 +72,7 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= +github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= @@ -134,14 +138,19 @@ github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnweb github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/briandowns/spinner v1.11.1 h1:OixPqDEcX3juo5AjQZAnFPbeUA0jvkp2qzB5gOZJ/L0= github.com/briandowns/spinner v1.11.1/go.mod h1:QOuQk7x+EaDASo80FEXwlwiA+j/PPIcX3FScO+3/ZPQ= github.com/bshuster-repo/logrus-logstash-hook v1.0.0 h1:e+C0SB5R1pu//O4MQ3f9cFuPGoOVeF2fE4Og9otCc70= +github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng= +github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ= +github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o= +github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= @@ -186,6 +195,7 @@ github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/containerd/cgroups v1.0.4 h1:jN/mbWBEaz+T1pi5OFtnkQ+8qnmEbAr1Oo1FRm5B0dA= +github.com/containerd/cgroups v1.0.4/go.mod h1:nLNQtsF7Sl2HxNebu77i1R0oDlhiTG+kO4JTrUzo6IA= github.com/containerd/containerd v1.6.18 h1:qZbsLvmyu+Vlty0/Ex5xc0z2YtKpIsb5n45mAMI+2Ns= github.com/containerd/containerd v1.6.18/go.mod h1:1RdCUu95+gc2v9t3IL+zIlpClSmew7/0YS8O5eQZrOw= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= @@ -223,6 +233,7 @@ github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS3 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/distribution/distribution/v3 v3.0.0-20220526142353-ffbd94cbe269 h1:hbCT8ZPPMqefiAWD2ZKjn7ypokIGViTvBBg/ExLSdCk= +github.com/distribution/distribution/v3 v3.0.0-20220526142353-ffbd94cbe269/go.mod h1:28YO/VJk9/64+sTGNuYaBjWxrXTPrj0C0XmgTIOjxX4= github.com/docker/cli v20.10.20+incompatible h1:lWQbHSHUFs7KraSN2jOJK7zbMS2jNCHI4mt4xUFUVQ4= github.com/docker/cli v20.10.20+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= @@ -235,6 +246,7 @@ github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNk github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= @@ -242,6 +254,7 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4= +github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -257,6 +270,7 @@ github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/proto v1.10.0 h1:pDGyFRVV5RvV+nkBK9iy3q67FBy9Xa7vwrOTE+g5aGw= +github.com/emicklei/proto v1.10.0/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -403,8 +417,10 @@ github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= +github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobuffalo/flect v0.2.3/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -451,6 +467,7 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= +github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= @@ -477,6 +494,7 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 h1:SJ+NtwL6QaZ21U+IrK7d0gGgpjGGvd2kz+FzTHVzdqI= github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2/go.mod h1:Tv1PlzqC9t8wNnpPdctvtSUOPUUg4SHeE6vR1Ir2hmg= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= @@ -499,6 +517,7 @@ github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEo github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -506,6 +525,7 @@ github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gosuri/uitable v0.0.4 h1:IG2xLKRvErL3uhY6e1BylFzG+aJiwQviDDTfOKeKTpY= github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= @@ -630,10 +650,12 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= @@ -647,6 +669,7 @@ github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LE github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= @@ -724,6 +747,7 @@ github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/sys/mountinfo v0.5.0 h1:2Ks8/r6lopsxWi9m58nlwjaeSzUX9iiL1vj5qB/9ObI= +github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= @@ -788,6 +812,7 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU= +github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -828,6 +853,7 @@ github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6 github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI= +github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.6.0+incompatible h1:Ix9yFKn1nSPBLFl/yZknTp8TU5G4Ps0JDmguYK6iH1A= github.com/pierrec/lz4 v2.6.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= @@ -887,6 +913,7 @@ github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5 github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/protocolbuffers/txtpbfmt v0.0.0-20220428173112-74888fd59c2b h1:zd/2RNzIRkoGGMjE+YIsZ85CnDIz672JK2F3Zl4vux4= +github.com/protocolbuffers/txtpbfmt v0.0.0-20220428173112-74888fd59c2b/go.mod h1:KjY0wibdYKc4DYkerHSbguaf3JeIPGhNJBp2BNiFH78= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= @@ -896,6 +923,7 @@ github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1000,8 +1028,11 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI= +github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE= +github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f h1:ERexzlUfuTvpE74urLSbIQW0Z/6hF9t8U4NsJLaioAY= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.12.1 h1:PcupnljUm9EIvbgSHQnHhUr3fO6oFmkOrvs2BAFNXXY= github.com/zclconf/go-cty v1.12.1/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= @@ -1021,15 +1052,19 @@ go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6 go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v2 v2.305.5 h1:DktRP60//JJpnPC0VBymAN/7V71GHMdjDCBt4ZPXDjI= +go.etcd.io/etcd/client/v2 v2.305.5/go.mod h1:zQjKllfqfBVyVStbt4FaosoX2iYd8fV/GRy/PbowgP4= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= go.etcd.io/etcd/client/v3 v3.5.5 h1:q++2WTJbUgpQu4B6hCuT7VkdwaTP7Qz6Daak3WzbrlI= go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c= go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= go.etcd.io/etcd/pkg/v3 v3.5.5 h1:Ablg7T7OkR+AeeeU32kdVhw/AGDsitkKPl7aW73ssjU= +go.etcd.io/etcd/pkg/v3 v3.5.5/go.mod h1:6ksYFxttiUGzC2uxyqiyOEvhAiD0tuIqSZkX3TyPdaE= go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= go.etcd.io/etcd/raft/v3 v3.5.5 h1:Ibz6XyZ60OYyRopu73lLM/P+qco3YtlZMOhnXNS051I= +go.etcd.io/etcd/raft/v3 v3.5.5/go.mod h1:76TA48q03g1y1VpTue92jZLr9lIHKUNcYdZOOGyx8rI= go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.etcd.io/etcd/server/v3 v3.5.5 h1:jNjYm/9s+f9A9r6+SC4RvNaz6AqixpOvhrFdT0PvIj0= +go.etcd.io/etcd/server/v3 v3.5.5/go.mod h1:rZ95vDw/jrvsbj9XpTqPrTAB9/kzchVdhRirySPkUBc= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= @@ -1082,6 +1117,7 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= From a9739d25cbac7ae3ebfd1eef8b88a3e6d4480f82 Mon Sep 17 00:00:00 2001 From: Chaitanyareddy0702 Date: Mon, 8 Jul 2024 10:38:14 +0530 Subject: [PATCH 02/20] Fix: Change the version of go in workflow file - Change go and golangci version in unit-test workflow Signed-off-by: Chaitanyareddy0702 Signed-off-by: GW Cloud Common Services --- .github/workflows/unit-test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml index 660de38..5f1e66d 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/unit-test.yaml @@ -13,8 +13,8 @@ on: env: # Common versions - GO_VERSION: '1.19' - GOLANGCI_VERSION: 'v1.49' + GO_VERSION: '1.22' + GOLANGCI_VERSION: 'v1.59' KIND_VERSION: 'v0.7.0' jobs: From 6a6700fd3464f4ed501b29ed0c2cffbe470c5424 Mon Sep 17 00:00:00 2001 From: co_gwre Date: Mon, 8 Jul 2024 13:52:24 +0530 Subject: [PATCH 03/20] Chore: Update the go version to 1.22 - Update the go version in dockerfile and post-submit in github workflows Signed-off-by: Chaitanyareddy0702 Author: VibhorChinda Signed-off-by: GW Cloud Common Services --- .github/workflows/post-submit.yaml | 2 +- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/post-submit.yaml b/.github/workflows/post-submit.yaml index c47cba0..9ce6add 100644 --- a/.github/workflows/post-submit.yaml +++ b/.github/workflows/post-submit.yaml @@ -7,7 +7,7 @@ on: workflow_dispatch: {} env: - GO_VERSION: '1.19' + GO_VERSION: '1.22' jobs: diff --git a/Dockerfile b/Dockerfile index d97eeea..51dbe06 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ ARG BASE_IMAGE # Build the manager binary -FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine as builder +FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.22-alpine as builder ARG GOPROXY ENV GOPROXY=${GOPROXY:-https://goproxy.cn} WORKDIR /workspace From 6ad09e0d087170ab381fed36a4fbedd6a3cecaea Mon Sep 17 00:00:00 2001 From: co_gwre Date: Mon, 8 Jul 2024 13:58:56 +0530 Subject: [PATCH 04/20] Chore: Update the go version to 1.22 - Update the staticcheck to version 2023.1.7 Signed-off-by: Chaitanyareddy0702 Author: VibhorChinda Signed-off-by: GW Cloud Common Services --- makefiles/dependency.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefiles/dependency.mk b/makefiles/dependency.mk index 15b3c48..961f22c 100644 --- a/makefiles/dependency.mk +++ b/makefiles/dependency.mk @@ -39,7 +39,7 @@ ifeq (, $(shell which staticcheck)) @{ \ set -e ;\ echo 'installing honnef.co/go/tools/cmd/staticcheck ' ;\ - go install honnef.co/go/tools/cmd/staticcheck@2022.1 ;\ + go install honnef.co/go/tools/cmd/staticcheck@2023.1.7 ;\ } STATICCHECK=$(GOBIN)/staticcheck else From 9301dec59fb9f0e37bff50da133ddc221be3a6ff Mon Sep 17 00:00:00 2001 From: co_gwre Date: Mon, 8 Jul 2024 15:26:56 +0530 Subject: [PATCH 05/20] Chore: Update go version - Change the go version and golangci version in go.yml workflow Signed-off-by: Chaitanyareddy0702 Author: VibhorChinda Signed-off-by: GW Cloud Common Services --- .github/workflows/go.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 1936b44..c985058 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -13,8 +13,8 @@ on: env: # Common versions - GO_VERSION: '1.19' - GOLANGCI_VERSION: 'v1.49' + GO_VERSION: '1.22' + GOLANGCI_VERSION: 'v1.59' jobs: From 335cfe23147eae28bf83729d74d390232f62343b Mon Sep 17 00:00:00 2001 From: co_gwre Date: Mon, 8 Jul 2024 16:00:45 +0530 Subject: [PATCH 06/20] Chore: Update go version - Change the action-cache version Signed-off-by: Chaitanyareddy0702 Author: VibhorChinda Signed-off-by: GW Cloud Common Services --- .github/workflows/go.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index c985058..bfd9274 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -49,7 +49,7 @@ jobs: submodules: true - name: Cache Go Dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: .work/pkg key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} @@ -78,7 +78,7 @@ jobs: submodules: true - name: Cache Go Dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: .work/pkg key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} From 08c236680ed84870b4a4c2c03ac4d4300b5424dc Mon Sep 17 00:00:00 2001 From: co_gwre Date: Tue, 9 Jul 2024 08:30:05 +0530 Subject: [PATCH 07/20] Chore: Bump the go verison to 1.22 - Remove cache of go dependencies on the pipeline and run go mod tidy Signed-off-by: co_gwre Signed-off-by: GW Cloud Common Services --- .github/workflows/go.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index bfd9274..a9ff84a 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -55,6 +55,14 @@ jobs: key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} restore-keys: ${{ runner.os }}-pkg- + - name: Remove Cached Go dependencies + run: | + go clean -modcache + + - name: Install go depencies for newer verison of Go + run: | + go mod tidy + - name: Install StaticCheck run: go install honnef.co/go/tools/cmd/staticcheck@2022.1 From 3f455a01fe3df6e9b764c75dbb45d0a236ae0ebc Mon Sep 17 00:00:00 2001 From: vchinda Date: Wed, 10 Jul 2024 10:35:01 +0530 Subject: [PATCH 08/20] Bumped the staticcheck version Signed-off-by: GW Cloud Common Services --- .github/workflows/go.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index a9ff84a..8657780 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -64,7 +64,7 @@ jobs: go mod tidy - name: Install StaticCheck - run: go install honnef.co/go/tools/cmd/staticcheck@2022.1 + run: go install honnef.co/go/tools/cmd/staticcheck@2023.1.7 - name: Static Check run: staticcheck ./... From ecb0e30fff68f8308613ad07aa2b485c00f931bd Mon Sep 17 00:00:00 2001 From: vchinda Date: Wed, 10 Jul 2024 10:54:18 +0530 Subject: [PATCH 09/20] Bump the go version for e2e tests Signed-off-by: GW Cloud Common Services --- .github/workflows/e2e.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index ca7961b..5dd625f 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -15,8 +15,8 @@ on: env: # Common versions - GO_VERSION: '1.19' - GOLANGCI_VERSION: 'v1.49' + GO_VERSION: '1.22' + GOLANGCI_VERSION: 'v1.59' K3D_IMAGE_VERSION: '[\"v1.26\"]' K3D_IMAGE_VERSIONS: '[\"v1.26\"]' From e0bcd8874902f4d45cccbf94fdea32dc59f2cbd2 Mon Sep 17 00:00:00 2001 From: vchinda Date: Wed, 10 Jul 2024 11:06:53 +0530 Subject: [PATCH 10/20] Removed the uncache step Signed-off-by: GW Cloud Common Services --- .github/workflows/go.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 8657780..b23ab13 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -55,14 +55,6 @@ jobs: key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} restore-keys: ${{ runner.os }}-pkg- - - name: Remove Cached Go dependencies - run: | - go clean -modcache - - - name: Install go depencies for newer verison of Go - run: | - go mod tidy - - name: Install StaticCheck run: go install honnef.co/go/tools/cmd/staticcheck@2023.1.7 From 094b25ba1c7c70538870e16a0d7fb829f018f97f Mon Sep 17 00:00:00 2001 From: vchinda Date: Wed, 10 Jul 2024 11:34:01 +0530 Subject: [PATCH 11/20] bumped golanci version Signed-off-by: GW Cloud Common Services --- makefiles/dependency.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefiles/dependency.mk b/makefiles/dependency.mk index 961f22c..e028bcf 100644 --- a/makefiles/dependency.mk +++ b/makefiles/dependency.mk @@ -58,7 +58,7 @@ else GOIMPORTS=$(shell which goimports) endif -GOLANGCILINT_VERSION ?= v1.46.0 +GOLANGCILINT_VERSION ?= v1.59.0 .PHONY: golangci golangci: From 344b07fd3f2ffe937912d8056c5305a57995f877 Mon Sep 17 00:00:00 2001 From: vchinda Date: Wed, 10 Jul 2024 12:21:13 +0530 Subject: [PATCH 12/20] Bump controller tools version Signed-off-by: GW Cloud Common Services --- makefiles/dependency.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefiles/dependency.mk b/makefiles/dependency.mk index e028bcf..8d50cd1 100644 --- a/makefiles/dependency.mk +++ b/makefiles/dependency.mk @@ -12,7 +12,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest ## Tool Versions KUSTOMIZE_VERSION ?= 4.5.5 -CONTROLLER_TOOLS_VERSION ?= v0.9.0 +CONTROLLER_TOOLS_VERSION ?= v0.15.0 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize From f5ca25d812fdb51a4e6682f8249557f0d38a1cae Mon Sep 17 00:00:00 2001 From: vchinda Date: Wed, 10 Jul 2024 12:41:30 +0530 Subject: [PATCH 13/20] Bumped go version in dockerfile.e2e Signed-off-by: GW Cloud Common Services --- Dockerfile.e2e | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.e2e b/Dockerfile.e2e index 83b54eb..340fc45 100644 --- a/Dockerfile.e2e +++ b/Dockerfile.e2e @@ -1,6 +1,6 @@ ARG BASE_IMAGE # Build the manager binary -FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine as builder +FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.22-alpine as builder ARG GOPROXY ENV GOPROXY=${GOPROXY:-https://goproxy.cn} WORKDIR /workspace From 12c79afe45e3407bb02d6055bd80003dcd9a982a Mon Sep 17 00:00:00 2001 From: vchinda Date: Wed, 10 Jul 2024 14:10:00 +0530 Subject: [PATCH 14/20] Added no lint comments Author: Chaitanyareddy0702 chaitanyareddy0702@gmail.com Signed-off-by: vchinda Signed-off-by: GW Cloud Common Services --- pkg/backup/sls/producer.go | 2 +- pkg/hooks/data_passing.go | 2 +- pkg/providers/email/send.go | 2 +- pkg/providers/metrics/prom_check.go | 4 ++-- pkg/providers/util/util.go | 2 +- pkg/providers/workspace/workspace.go | 12 ++++++------ 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pkg/backup/sls/producer.go b/pkg/backup/sls/producer.go index ad00710..a170617 100644 --- a/pkg/backup/sls/producer.go +++ b/pkg/backup/sls/producer.go @@ -51,7 +51,7 @@ func (callback *Callback) Fail(result *producer.Result) { } // Success is success callback -func (callback *Callback) Success(result *producer.Result) { +func (callback *Callback) Success(result *producer.Result) { //nolint:golint,unused } // Store is store workflowRun to sls diff --git a/pkg/hooks/data_passing.go b/pkg/hooks/data_passing.go index e7d9f3f..9a5511c 100644 --- a/pkg/hooks/data_passing.go +++ b/pkg/hooks/data_passing.go @@ -82,7 +82,7 @@ func Output(ctx wfContext.Context, taskValue *value.Value, step v1alpha1.Workflo } // SetAdditionalNameInStatus sets additional name from properties to status map -func SetAdditionalNameInStatus(stepStatus map[string]v1alpha1.StepStatus, name string, properties *runtime.RawExtension, status v1alpha1.StepStatus) { +func SetAdditionalNameInStatus(stepStatus map[string]v1alpha1.StepStatus, name string, properties *runtime.RawExtension, status v1alpha1.StepStatus) { //nolint:golint,unused if stepStatus == nil || properties == nil { return } diff --git a/pkg/providers/email/send.go b/pkg/providers/email/send.go index 51dbaf2..c9a843c 100644 --- a/pkg/providers/email/send.go +++ b/pkg/providers/email/send.go @@ -53,7 +53,7 @@ type content struct { var emailRoutine sync.Map // Send sends email -func (h *provider) Send(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (h *provider) Send(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused stepID, err := v.LookupValue("stepID") if err != nil { return err diff --git a/pkg/providers/metrics/prom_check.go b/pkg/providers/metrics/prom_check.go index 7e12c3a..8001dcd 100644 --- a/pkg/providers/metrics/prom_check.go +++ b/pkg/providers/metrics/prom_check.go @@ -38,7 +38,7 @@ const ( type provider struct{} // PromCheck do health check from metrics from prometheus -func (h *provider) PromCheck(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (h *provider) PromCheck(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused stepID, err := v.GetString("stepID") if err != nil { return err @@ -175,7 +175,7 @@ func getQueryResult(ctx monitorContext.Context, v *value.Value) (string, error) return valueStr, nil } -func compareValueWithCondition(valueStr string, conditionStr string, v *value.Value) (bool, error) { +func compareValueWithCondition(valueStr string, conditionStr string, v *value.Value) (bool, error) { //nolint:golint,unused template := fmt.Sprintf("if: %s %s", valueStr, conditionStr) cueValue, err := value.NewValue(template, nil, "") if err != nil { diff --git a/pkg/providers/util/util.go b/pkg/providers/util/util.go index 00dbbfe..a70f9a5 100644 --- a/pkg/providers/util/util.go +++ b/pkg/providers/util/util.go @@ -38,7 +38,7 @@ type provider struct { pCtx process.Context } -func (p *provider) PatchK8sObject(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (p *provider) PatchK8sObject(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused val, err := v.LookupValue("value") if err != nil { return err diff --git a/pkg/providers/workspace/workspace.go b/pkg/providers/workspace/workspace.go index a28a2f2..17bd03c 100644 --- a/pkg/providers/workspace/workspace.go +++ b/pkg/providers/workspace/workspace.go @@ -46,7 +46,7 @@ type provider struct { } // DoVar get & put variable from context. -func (h *provider) DoVar(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (h *provider) DoVar(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused methodV, err := v.Field("method") if err != nil { return err @@ -87,7 +87,7 @@ func (h *provider) DoVar(ctx monitorContext.Context, wfCtx wfContext.Context, v } // Wait let workflow wait. -func (h *provider) Wait(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (h *provider) Wait(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused cv := v.CueValue() if cv.Exists() { ret := cv.LookupPath(value.FieldPath("continue")) @@ -104,7 +104,7 @@ func (h *provider) Wait(ctx monitorContext.Context, wfCtx wfContext.Context, v * } // Break let workflow terminate. -func (h *provider) Break(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (h *provider) Break(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused var msg string if v != nil { msg, _ = v.GetString("message") @@ -114,7 +114,7 @@ func (h *provider) Break(ctx monitorContext.Context, wfCtx wfContext.Context, v } // Fail let the step fail, its status is failed and reason is Action -func (h *provider) Fail(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (h *provider) Fail(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused var msg string if v != nil { msg, _ = v.GetString("message") @@ -124,7 +124,7 @@ func (h *provider) Fail(ctx monitorContext.Context, wfCtx wfContext.Context, v * } // Suspend let the step suspend, its status is suspending and reason is Suspend -func (h *provider) Suspend(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (h *provider) Suspend(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused stepID := fmt.Sprint(h.pCtx.GetData(model.ContextStepSessionID)) timestamp := wfCtx.GetMutableValue(stepID, ResumeTimeStamp) var msg string @@ -173,7 +173,7 @@ func (h *provider) Suspend(ctx monitorContext.Context, wfCtx wfContext.Context, } // Message writes message to step status, note that the message will be overwritten by the next message. -func (h *provider) Message(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (h *provider) Message(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused var msg string if v != nil { msg, _ = v.GetString("message") From 3c296de5c8c1d7c3e97d6dbc926dc322df4ab6d8 Mon Sep 17 00:00:00 2001 From: vchinda Date: Wed, 10 Jul 2024 14:26:06 +0530 Subject: [PATCH 15/20] added lint Signed-off-by: GW Cloud Common Services --- .github/workflows/go.yaml | 34 +++++++++++++++++----------------- pkg/backup/sls/producer.go | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index b23ab13..d1591db 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -18,24 +18,24 @@ env: jobs: - detect-noop: - runs-on: ubuntu-20.04 - outputs: - noop: ${{ steps.noop.outputs.should_skip }} - steps: - - name: Detect No-op Changes - id: noop - uses: fkirc/skip-duplicate-actions@v5.3.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]' - do_not_skip: '["workflow_dispatch", "schedule", "push"]' - concurrent_skipping: false + # detect-noop: + # runs-on: ubuntu-20.04 + # outputs: + # noop: ${{ steps.noop.outputs.should_skip }} + # steps: + # - name: Detect No-op Changes + # id: noop + # uses: fkirc/skip-duplicate-actions@v5.3.0 + # with: + # # github_token: ${{ secrets.GITHUB_TOKEN }} + # paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]' + # do_not_skip: '["workflow_dispatch", "schedule", "push"]' + # concurrent_skipping: false staticcheck: runs-on: ubuntu-20.04 - needs: detect-noop - if: needs.detect-noop.outputs.noop != 'true' + # needs: detect-noop + # if: needs.detect-noop.outputs.noop != 'true' steps: - name: Setup Go @@ -63,8 +63,8 @@ jobs: lint: runs-on: ubuntu-20.04 - needs: detect-noop - if: needs.detect-noop.outputs.noop != 'true' + # needs: detect-noop + # if: needs.detect-noop.outputs.noop != 'true' steps: - name: Setup Go diff --git a/pkg/backup/sls/producer.go b/pkg/backup/sls/producer.go index a170617..6b676b0 100644 --- a/pkg/backup/sls/producer.go +++ b/pkg/backup/sls/producer.go @@ -51,7 +51,7 @@ func (callback *Callback) Fail(result *producer.Result) { } // Success is success callback -func (callback *Callback) Success(result *producer.Result) { //nolint:golint,unused +func (callback *Callback) Success(result *producer.Result) { //nolint:revive,unused,govet,golint } // Store is store workflowRun to sls From fdeef5793b9bdaa65372272f8cd60de1450fa0e1 Mon Sep 17 00:00:00 2001 From: vchinda Date: Wed, 10 Jul 2024 14:33:06 +0530 Subject: [PATCH 16/20] Revert "added lint" This reverts commit 0025dd036210a3a82e07cfef605be740b7f70b8f. Signed-off-by: GW Cloud Common Services --- .github/workflows/go.yaml | 34 +++++++++++++++++----------------- pkg/backup/sls/producer.go | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index d1591db..b23ab13 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -18,24 +18,24 @@ env: jobs: - # detect-noop: - # runs-on: ubuntu-20.04 - # outputs: - # noop: ${{ steps.noop.outputs.should_skip }} - # steps: - # - name: Detect No-op Changes - # id: noop - # uses: fkirc/skip-duplicate-actions@v5.3.0 - # with: - # # github_token: ${{ secrets.GITHUB_TOKEN }} - # paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]' - # do_not_skip: '["workflow_dispatch", "schedule", "push"]' - # concurrent_skipping: false + detect-noop: + runs-on: ubuntu-20.04 + outputs: + noop: ${{ steps.noop.outputs.should_skip }} + steps: + - name: Detect No-op Changes + id: noop + uses: fkirc/skip-duplicate-actions@v5.3.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]' + do_not_skip: '["workflow_dispatch", "schedule", "push"]' + concurrent_skipping: false staticcheck: runs-on: ubuntu-20.04 - # needs: detect-noop - # if: needs.detect-noop.outputs.noop != 'true' + needs: detect-noop + if: needs.detect-noop.outputs.noop != 'true' steps: - name: Setup Go @@ -63,8 +63,8 @@ jobs: lint: runs-on: ubuntu-20.04 - # needs: detect-noop - # if: needs.detect-noop.outputs.noop != 'true' + needs: detect-noop + if: needs.detect-noop.outputs.noop != 'true' steps: - name: Setup Go diff --git a/pkg/backup/sls/producer.go b/pkg/backup/sls/producer.go index 6b676b0..a170617 100644 --- a/pkg/backup/sls/producer.go +++ b/pkg/backup/sls/producer.go @@ -51,7 +51,7 @@ func (callback *Callback) Fail(result *producer.Result) { } // Success is success callback -func (callback *Callback) Success(result *producer.Result) { //nolint:revive,unused,govet,golint +func (callback *Callback) Success(result *producer.Result) { //nolint:golint,unused } // Store is store workflowRun to sls From 1109fcd8cebef95f5618c9a00c79c4a1790aed63 Mon Sep 17 00:00:00 2001 From: vchinda Date: Wed, 10 Jul 2024 14:34:41 +0530 Subject: [PATCH 17/20] modified lint Signed-off-by: GW Cloud Common Services --- pkg/backup/sls/producer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/backup/sls/producer.go b/pkg/backup/sls/producer.go index a170617..ba69809 100644 --- a/pkg/backup/sls/producer.go +++ b/pkg/backup/sls/producer.go @@ -51,7 +51,7 @@ func (callback *Callback) Fail(result *producer.Result) { } // Success is success callback -func (callback *Callback) Success(result *producer.Result) { //nolint:golint,unused +func (callback *Callback) Success(result *producer.Result) { //nolint:revive,unused } // Store is store workflowRun to sls From 71eb9a8bec9ef9db937fda0bbec7cf32a265143d Mon Sep 17 00:00:00 2001 From: vchinda Date: Wed, 10 Jul 2024 14:39:50 +0530 Subject: [PATCH 18/20] lint changes Signed-off-by: GW Cloud Common Services --- pkg/hooks/data_passing.go | 2 +- pkg/providers/email/send.go | 2 +- pkg/providers/metrics/prom_check.go | 4 ++-- pkg/providers/util/util.go | 2 +- pkg/providers/workspace/workspace.go | 12 ++++++------ 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pkg/hooks/data_passing.go b/pkg/hooks/data_passing.go index 9a5511c..737e538 100644 --- a/pkg/hooks/data_passing.go +++ b/pkg/hooks/data_passing.go @@ -82,7 +82,7 @@ func Output(ctx wfContext.Context, taskValue *value.Value, step v1alpha1.Workflo } // SetAdditionalNameInStatus sets additional name from properties to status map -func SetAdditionalNameInStatus(stepStatus map[string]v1alpha1.StepStatus, name string, properties *runtime.RawExtension, status v1alpha1.StepStatus) { //nolint:golint,unused +func SetAdditionalNameInStatus(stepStatus map[string]v1alpha1.StepStatus, name string, properties *runtime.RawExtension, status v1alpha1.StepStatus) { //nolint:revive,unused if stepStatus == nil || properties == nil { return } diff --git a/pkg/providers/email/send.go b/pkg/providers/email/send.go index c9a843c..26e2d1a 100644 --- a/pkg/providers/email/send.go +++ b/pkg/providers/email/send.go @@ -53,7 +53,7 @@ type content struct { var emailRoutine sync.Map // Send sends email -func (h *provider) Send(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused +func (h *provider) Send(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused stepID, err := v.LookupValue("stepID") if err != nil { return err diff --git a/pkg/providers/metrics/prom_check.go b/pkg/providers/metrics/prom_check.go index 8001dcd..1b5f24d 100644 --- a/pkg/providers/metrics/prom_check.go +++ b/pkg/providers/metrics/prom_check.go @@ -38,7 +38,7 @@ const ( type provider struct{} // PromCheck do health check from metrics from prometheus -func (h *provider) PromCheck(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused +func (h *provider) PromCheck(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused stepID, err := v.GetString("stepID") if err != nil { return err @@ -175,7 +175,7 @@ func getQueryResult(ctx monitorContext.Context, v *value.Value) (string, error) return valueStr, nil } -func compareValueWithCondition(valueStr string, conditionStr string, v *value.Value) (bool, error) { //nolint:golint,unused +func compareValueWithCondition(valueStr string, conditionStr string, v *value.Value) (bool, error) { //nolint:revive,unused template := fmt.Sprintf("if: %s %s", valueStr, conditionStr) cueValue, err := value.NewValue(template, nil, "") if err != nil { diff --git a/pkg/providers/util/util.go b/pkg/providers/util/util.go index a70f9a5..41bc850 100644 --- a/pkg/providers/util/util.go +++ b/pkg/providers/util/util.go @@ -38,7 +38,7 @@ type provider struct { pCtx process.Context } -func (p *provider) PatchK8sObject(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused +func (p *provider) PatchK8sObject(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused val, err := v.LookupValue("value") if err != nil { return err diff --git a/pkg/providers/workspace/workspace.go b/pkg/providers/workspace/workspace.go index 17bd03c..3e82afc 100644 --- a/pkg/providers/workspace/workspace.go +++ b/pkg/providers/workspace/workspace.go @@ -46,7 +46,7 @@ type provider struct { } // DoVar get & put variable from context. -func (h *provider) DoVar(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused +func (h *provider) DoVar(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused methodV, err := v.Field("method") if err != nil { return err @@ -87,7 +87,7 @@ func (h *provider) DoVar(ctx monitorContext.Context, wfCtx wfContext.Context, v } // Wait let workflow wait. -func (h *provider) Wait(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused +func (h *provider) Wait(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused cv := v.CueValue() if cv.Exists() { ret := cv.LookupPath(value.FieldPath("continue")) @@ -104,7 +104,7 @@ func (h *provider) Wait(ctx monitorContext.Context, wfCtx wfContext.Context, v * } // Break let workflow terminate. -func (h *provider) Break(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused +func (h *provider) Break(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused var msg string if v != nil { msg, _ = v.GetString("message") @@ -114,7 +114,7 @@ func (h *provider) Break(ctx monitorContext.Context, wfCtx wfContext.Context, v } // Fail let the step fail, its status is failed and reason is Action -func (h *provider) Fail(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused +func (h *provider) Fail(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused var msg string if v != nil { msg, _ = v.GetString("message") @@ -124,7 +124,7 @@ func (h *provider) Fail(ctx monitorContext.Context, wfCtx wfContext.Context, v * } // Suspend let the step suspend, its status is suspending and reason is Suspend -func (h *provider) Suspend(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused +func (h *provider) Suspend(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused stepID := fmt.Sprint(h.pCtx.GetData(model.ContextStepSessionID)) timestamp := wfCtx.GetMutableValue(stepID, ResumeTimeStamp) var msg string @@ -173,7 +173,7 @@ func (h *provider) Suspend(ctx monitorContext.Context, wfCtx wfContext.Context, } // Message writes message to step status, note that the message will be overwritten by the next message. -func (h *provider) Message(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused +func (h *provider) Message(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused var msg string if v != nil { msg, _ = v.GetString("message") From 7bbca7dc3af6d06d0985441ff5447a8bca700791 Mon Sep 17 00:00:00 2001 From: GW Cloud Common Services Date: Wed, 10 Jul 2024 14:55:26 +0530 Subject: [PATCH 19/20] added nolint Signed-off-by: GW Cloud Common Services --- cmd/main.go | 2 +- controllers/workflowrun_controller.go | 2 +- pkg/executor/workflow.go | 4 ++-- pkg/generator/generator.go | 2 +- pkg/providers/http/do.go | 2 +- pkg/providers/kube/handle.go | 16 ++++++++-------- pkg/providers/util/util.go | 4 ++-- pkg/tasks/custom/task.go | 4 ++-- pkg/tasks/discover.go | 2 +- pkg/utils/operation.go | 2 +- pkg/utils/utils.go | 6 +++--- .../v1alpha1/workflowrun/mutating_handler.go | 2 +- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 509a617..00685c3 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -341,7 +341,7 @@ func waitWebhookSecretVolume(certDir string, timeout, interval time.Duration) er return false } // check if secret files are empty - err = filepath.Walk(certDir, func(path string, info os.FileInfo, err error) error { + err = filepath.Walk(certDir, func(path string, info os.FileInfo, err error) error { //nolint:revive,unused // even Cert dir is created, cert files are still empty for a while if info.Size() == 0 { return errors.New("secret is not ready") diff --git a/controllers/workflowrun_controller.go b/controllers/workflowrun_controller.go index c01d545..9660d40 100644 --- a/controllers/workflowrun_controller.go +++ b/controllers/workflowrun_controller.go @@ -246,7 +246,7 @@ func (r *WorkflowRunReconciler) SetupWithManager(mgr ctrl.Manager) error { return !reflect.DeepEqual(old, new) }, - CreateFunc: func(e ctrlEvent.CreateEvent) bool { + CreateFunc: func(e ctrlEvent.CreateEvent) bool { //nolint:revive,unused return true }, }). diff --git a/pkg/executor/workflow.go b/pkg/executor/workflow.go index b448993..054c1b0 100644 --- a/pkg/executor/workflow.go +++ b/pkg/executor/workflow.go @@ -188,7 +188,7 @@ func checkWorkflowSuspended(status *v1alpha1.WorkflowRunStatus) bool { return status.Suspend } -func newEngine(ctx monitorContext.Context, wfCtx wfContext.Context, w *workflowExecutor, wfStatus *v1alpha1.WorkflowRunStatus, taskRunners []types.TaskRunner) *engine { +func newEngine(ctx monitorContext.Context, wfCtx wfContext.Context, w *workflowExecutor, wfStatus *v1alpha1.WorkflowRunStatus, taskRunners []types.TaskRunner) *engine { //nolint:revive,unused stepStatus := make(map[string]v1alpha1.StepStatus) setStepStatus(stepStatus, wfStatus.Steps) stepDependsOn := make(map[string][]string) @@ -606,7 +606,7 @@ func (e *engine) generateRunOptions(ctx monitorContext.Context, dependsOnPhase v return &types.PreCheckResult{Skip: !ifValue}, nil } }, - func(step v1alpha1.WorkflowStep, options *types.PreCheckOptions) (*types.PreCheckResult, error) { + func(step v1alpha1.WorkflowStep, options *types.PreCheckOptions) (*types.PreCheckResult, error) { //nolint:revive,unused status := e.stepStatus[step.Name] if e.parentRunner != "" { if status, ok := e.stepStatus[e.parentRunner]; ok && status.Phase == v1alpha1.WorkflowStepPhaseFailed && status.Reason == types.StatusReasonTimeout { diff --git a/pkg/generator/generator.go b/pkg/generator/generator.go index 6c10323..429375f 100644 --- a/pkg/generator/generator.go +++ b/pkg/generator/generator.go @@ -141,7 +141,7 @@ func GenerateWorkflowInstance(ctx context.Context, cli client.Client, run *v1alp return instance, nil } -func initStepGeneratorOptions(ctx monitorContext.Context, instance *types.WorkflowInstance, options types.StepGeneratorOptions) types.StepGeneratorOptions { +func initStepGeneratorOptions(ctx monitorContext.Context, instance *types.WorkflowInstance, options types.StepGeneratorOptions) types.StepGeneratorOptions { //nolint:revive,unused if options.Providers == nil { options.Providers = providers.NewProviders() } diff --git a/pkg/providers/http/do.go b/pkg/providers/http/do.go index 50b544a..4dd36a7 100644 --- a/pkg/providers/http/do.go +++ b/pkg/providers/http/do.go @@ -59,7 +59,7 @@ type provider struct { } // Do process http request. -func (h *provider) Do(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (h *provider) Do(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused resp, err := h.runHTTP(ctx, v) if err != nil { return err diff --git a/pkg/providers/kube/handle.go b/pkg/providers/kube/handle.go index f4c4324..94497ff 100644 --- a/pkg/providers/kube/handle.go +++ b/pkg/providers/kube/handle.go @@ -84,7 +84,7 @@ type dispatcher struct { cli client.Client } -func (d *dispatcher) apply(ctx context.Context, cluster, owner string, workloads ...*unstructured.Unstructured) error { +func (d *dispatcher) apply(ctx context.Context, cluster, owner string, workloads ...*unstructured.Unstructured) error { //nolint:revive,unused for _, workload := range workloads { existing := new(unstructured.Unstructured) existing.GetObjectKind().SetGroupVersionKind(workload.GetObjectKind().GroupVersionKind()) @@ -124,12 +124,12 @@ func (d *dispatcher) apply(ctx context.Context, cluster, owner string, workloads return nil } -func (d *dispatcher) delete(ctx context.Context, cluster, owner string, manifest *unstructured.Unstructured) error { +func (d *dispatcher) delete(ctx context.Context, cluster, owner string, manifest *unstructured.Unstructured) error { //nolint:revive,unused return d.cli.Delete(ctx, manifest) } // Patch patch CR in cluster. -func (h *provider) Patch(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (h *provider) Patch(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused val, err := v.LookupValue("value") if err != nil { return err @@ -179,7 +179,7 @@ func (h *provider) Patch(ctx monitorContext.Context, wfCtx wfContext.Context, v } // Apply create or update CR in cluster. -func (h *provider) Apply(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (h *provider) Apply(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused val, err := v.LookupValue("value") if err != nil { return err @@ -208,7 +208,7 @@ func (h *provider) Apply(ctx monitorContext.Context, wfCtx wfContext.Context, v } // ApplyInParallel create or update CRs in parallel. -func (h *provider) ApplyInParallel(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (h *provider) ApplyInParallel(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused val, err := v.LookupValue("value") if err != nil { return err @@ -242,7 +242,7 @@ func (h *provider) ApplyInParallel(ctx monitorContext.Context, wfCtx wfContext.C } // Read get CR from cluster. -func (h *provider) Read(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (h *provider) Read(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused val, err := v.LookupValue("value") if err != nil { return err @@ -267,7 +267,7 @@ func (h *provider) Read(ctx monitorContext.Context, wfCtx wfContext.Context, v * } // List lists CRs from cluster. -func (h *provider) List(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (h *provider) List(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused r, err := v.LookupValue("resource") if err != nil { return err @@ -305,7 +305,7 @@ func (h *provider) List(ctx monitorContext.Context, wfCtx wfContext.Context, v * } // Delete deletes CR from cluster. -func (h *provider) Delete(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (h *provider) Delete(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused val, err := v.LookupValue("value") if err != nil { return err diff --git a/pkg/providers/util/util.go b/pkg/providers/util/util.go index 41bc850..8eaad85 100644 --- a/pkg/providers/util/util.go +++ b/pkg/providers/util/util.go @@ -63,7 +63,7 @@ func (p *provider) PatchK8sObject(ctx monitorContext.Context, wfCtx wfContext.Co } // String convert byte to string -func (p *provider) String(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (p *provider) String(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused b, err := v.LookupValue("bt") if err != nil { return err @@ -76,7 +76,7 @@ func (p *provider) String(ctx monitorContext.Context, wfCtx wfContext.Context, v } // Log print cue value in log -func (p *provider) Log(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { +func (p *provider) Log(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:revive,unused stepName := fmt.Sprint(p.pCtx.GetData(model.ContextStepName)) stepID := fmt.Sprint(p.pCtx.GetData(model.ContextStepSessionID)) config := make(map[string]types.LogConfig) diff --git a/pkg/tasks/custom/task.go b/pkg/tasks/custom/task.go index 34346cd..2406fb8 100644 --- a/pkg/tasks/custom/task.go +++ b/pkg/tasks/custom/task.go @@ -147,7 +147,7 @@ func (t *TaskLoader) makeTaskGenerator(templ string) (types.TaskGenerator, error } tRunner.run = func(ctx wfContext.Context, options *types.TaskRunOptions) (stepStatus v1alpha1.StepStatus, operations *types.Operation, rErr error) { if options.GetTracer == nil { - options.GetTracer = func(id string, step v1alpha1.WorkflowStep) monitorContext.Context { + options.GetTracer = func(id string, step v1alpha1.WorkflowStep) monitorContext.Context { //nolint:revive,unused return monitorContext.NewTraceContext(context.Background(), "") } } @@ -561,7 +561,7 @@ func (exec *executor) doSteps(ctx monitorContext.Context, wfCtx wfContext.Contex } if isStepList(fieldName) { - return false, in.StepByList(func(name string, item *value.Value) (bool, error) { + return false, in.StepByList(func(name string, item *value.Value) (bool, error) { //nolint:revive,unused do := OpTpy(item) if do == "" { return false, nil diff --git a/pkg/tasks/discover.go b/pkg/tasks/discover.go index ec3db79..ab6deac 100644 --- a/pkg/tasks/discover.go +++ b/pkg/tasks/discover.go @@ -34,7 +34,7 @@ type taskDiscover struct { } // NewTaskDiscover new task discover -func NewTaskDiscover(ctx monitorContext.Context, options types.StepGeneratorOptions) types.TaskDiscover { +func NewTaskDiscover(ctx monitorContext.Context, options types.StepGeneratorOptions) types.TaskDiscover { //nolint:revive,unused return &taskDiscover{ builtin: map[string]types.TaskGenerator{ types.WorkflowStepTypeStepGroup: builtin.StepGroup, diff --git a/pkg/utils/operation.go b/pkg/utils/operation.go index 09dc472..f889784 100644 --- a/pkg/utils/operation.go +++ b/pkg/utils/operation.go @@ -241,7 +241,7 @@ func ResumeWorkflow(ctx context.Context, cli client.Client, run *v1alpha1.Workfl } // Rollback is not supported for WorkflowRun -func (wo workflowRunOperator) Rollback(ctx context.Context) error { +func (wo workflowRunOperator) Rollback(ctx context.Context) error { //nolint:revive,unused return fmt.Errorf("can not rollback a WorkflowRun") } diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 88706cf..762712e 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -35,7 +35,7 @@ import ( ) // GetDataFromContext get data from workflow context -func GetDataFromContext(ctx context.Context, cli client.Client, ctxName, name, ns string, paths ...string) (*value.Value, error) { +func GetDataFromContext(ctx context.Context, cli client.Client, ctxName, name, ns string, paths ...string) (*value.Value, error) { //nolint:revive,unused wfCtx, err := wfContext.LoadContext(cli, ns, name, ctxName) if err != nil { return nil, err @@ -51,7 +51,7 @@ func GetDataFromContext(ctx context.Context, cli client.Client, ctxName, name, n } // GetLogConfigFromStep get log config from step -func GetLogConfigFromStep(ctx context.Context, cli client.Client, ctxName, name, ns, step string) (*types.LogConfig, error) { +func GetLogConfigFromStep(ctx context.Context, cli client.Client, ctxName, name, ns, step string) (*types.LogConfig, error) { //nolint:revive,unused wfCtx, err := wfContext.LoadContext(cli, ns, name, ctxName) if err != nil { return nil, err @@ -126,7 +126,7 @@ func GetLogsFromURL(ctx context.Context, url string) (io.ReadCloser, error) { } // GetLogsFromPod get logs from pod -func GetLogsFromPod(ctx context.Context, clientSet kubernetes.Interface, cli client.Client, podName, ns, cluster string, opts *corev1.PodLogOptions) (io.ReadCloser, error) { +func GetLogsFromPod(ctx context.Context, clientSet kubernetes.Interface, cli client.Client, podName, ns, cluster string, opts *corev1.PodLogOptions) (io.ReadCloser, error) { //nolint:revive,unused cliCtx := multicluster.WithCluster(ctx, cluster) req := clientSet.CoreV1().Pods(ns).GetLogs(podName, opts) readCloser, err := req.Stream(cliCtx) diff --git a/pkg/webhook/v1alpha1/workflowrun/mutating_handler.go b/pkg/webhook/v1alpha1/workflowrun/mutating_handler.go index c5cac57..2239a71 100644 --- a/pkg/webhook/v1alpha1/workflowrun/mutating_handler.go +++ b/pkg/webhook/v1alpha1/workflowrun/mutating_handler.go @@ -37,7 +37,7 @@ type MutatingHandler struct { var _ admission.Handler = &MutatingHandler{} // Handle mutate application -func (h *MutatingHandler) Handle(ctx context.Context, req admission.Request) admission.Response { +func (h *MutatingHandler) Handle(ctx context.Context, req admission.Request) admission.Response { //nolint:revive,unused wr := &v1alpha1.WorkflowRun{} if err := h.Decoder.Decode(req, wr); err != nil { return admission.Errored(http.StatusBadRequest, err) From d73a00625697ac85ef4be0d016216bde38a85d44 Mon Sep 17 00:00:00 2001 From: GW Cloud Common Services Date: Wed, 10 Jul 2024 15:07:17 +0530 Subject: [PATCH 20/20] changed new object Signed-off-by: GW Cloud Common Services --- controllers/backup_controller.go | 8 ++++---- controllers/workflowrun_controller.go | 18 +++++++++--------- pkg/utils/recycle.go | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/controllers/backup_controller.go b/controllers/backup_controller.go index abd390d..abaaff8 100644 --- a/controllers/backup_controller.go +++ b/controllers/backup_controller.go @@ -172,14 +172,14 @@ func (r *BackupReconciler) SetupWithManager(mgr ctrl.Manager) error { // filter the changes in workflow status // let workflow handle its reconcile UpdateFunc: func(e ctrlEvent.UpdateEvent) bool { - new := e.ObjectNew.DeepCopyObject().(*v1alpha1.WorkflowRun) - old := e.ObjectOld.DeepCopyObject().(*v1alpha1.WorkflowRun) + newObj := e.ObjectNew.DeepCopyObject().(*v1alpha1.WorkflowRun) + oldObj := e.ObjectOld.DeepCopyObject().(*v1alpha1.WorkflowRun) // if the workflow is not finished, skip the reconcile - if !new.Status.Finished { + if !newObj.Status.Finished { return false } - return !reflect.DeepEqual(old, new) + return !reflect.DeepEqual(oldObj, newObj) }, CreateFunc: func(e ctrlEvent.CreateEvent) bool { run := e.Object.DeepCopyObject().(*v1alpha1.WorkflowRun) diff --git a/controllers/workflowrun_controller.go b/controllers/workflowrun_controller.go index 9660d40..bad0c2e 100644 --- a/controllers/workflowrun_controller.go +++ b/controllers/workflowrun_controller.go @@ -216,8 +216,8 @@ func (r *WorkflowRunReconciler) SetupWithManager(mgr ctrl.Manager) error { // filter the changes in workflow status // let workflow handle its reconcile UpdateFunc: func(e ctrlEvent.UpdateEvent) bool { - new, isNewWR := e.ObjectNew.DeepCopyObject().(*v1alpha1.WorkflowRun) - old, isOldWR := e.ObjectOld.DeepCopyObject().(*v1alpha1.WorkflowRun) + newObj, isNewWR := e.ObjectNew.DeepCopyObject().(*v1alpha1.WorkflowRun) + oldObj, isOldWR := e.ObjectOld.DeepCopyObject().(*v1alpha1.WorkflowRun) // if the object is a event listener, reconcile the controller if !isNewWR || !isOldWR { @@ -225,26 +225,26 @@ func (r *WorkflowRunReconciler) SetupWithManager(mgr ctrl.Manager) error { } // if the workflow is finished, skip the reconcile - if new.Status.Finished { + if newObj.Status.Finished { return false } // filter managedFields changes - old.ManagedFields = nil - new.ManagedFields = nil + oldObj.ManagedFields = nil + newObj.ManagedFields = nil // filter resourceVersion changes - old.ResourceVersion = new.ResourceVersion + oldObj.ResourceVersion = newObj.ResourceVersion // if the generation is changed, return true to let the controller handle it - if old.Generation != new.Generation { + if oldObj.Generation != newObj.Generation { return true } // ignore the changes in step status - old.Status.Steps = new.Status.Steps + oldObj.Status.Steps = newObj.Status.Steps - return !reflect.DeepEqual(old, new) + return !reflect.DeepEqual(oldObj, newObj) }, CreateFunc: func(e ctrlEvent.CreateEvent) bool { //nolint:revive,unused return true diff --git a/pkg/utils/recycle.go b/pkg/utils/recycle.go index 8634a40..475df03 100644 --- a/pkg/utils/recycle.go +++ b/pkg/utils/recycle.go @@ -69,7 +69,7 @@ func (r *recycleCronJob) start(ctx context.Context) (*cron.Cron, error) { Duration: 1 * time.Minute, Factor: 5.0, Jitter: 0.1, - }, func(err error) bool { + }, func(err error) bool { //nolint:revive,unused // always retry return true }, func() error {