Repository: ovn-kubernetes/ovn-kubernetes
Pull request #5162: Fix assorted issues with CI
Author: login: jcaamano
Created: 2025-04-02T12:11:55Z | Merged: 2025-04-03T18:00:36Z



Diff:
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 90c5060a6e3..46e68728d78 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -27,7 +27,11 @@ jobs:
       uses: actions/setup-go@v5
       with:
         go-version-file: 'go-controller/go.mod'
-        cache-dependency-path: "**/*.sum"
+        # Disabling cache to avoid warnings until these two issues are fixed
+        # https://github.com/actions/setup-go/issues/424
+        # https://github.com/actions/setup-go/issues/403
+        # cache-dependency-path: "**/*.sum"
+        cache: false
       id: go
 
     - name: Log in to the GH Container registry
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 371e5e5b8c0..bba25a95a5d 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -47,7 +47,11 @@ jobs:
       uses: actions/setup-go@v5
       with:
         go-version-file: 'go-controller/go.mod'
-        cache-dependency-path: "**/*.sum"
+        # Disabling cache to avoid warnings until these two issues are fixed
+        # https://github.com/actions/setup-go/issues/424
+        # https://github.com/actions/setup-go/issues/403
+        # cache-dependency-path: "**/*.sum"
+        cache: false
       id: go
 
     - name: Verify
@@ -103,7 +107,11 @@ jobs:
       uses: actions/setup-go@v5
       with:
         go-version-file: 'go-controller/go.mod'
-        cache-dependency-path: "**/*.sum"
+        # Disabling cache to avoid warnings until these two issues are fixed
+        # https://github.com/actions/setup-go/issues/424
+        # https://github.com/actions/setup-go/issues/403
+        # cache-dependency-path: "**/*.sum"
+        cache: false
       id: go
 
     - name: Build - from master branch
@@ -181,7 +189,11 @@ jobs:
       uses: actions/setup-go@v5
       with:
         go-version-file: 'go-controller/go.mod'
-        cache-dependency-path: "**/*.sum"
+        # Disabling cache to avoid warnings until these two issues are fixed
+        # https://github.com/actions/setup-go/issues/424
+        # https://github.com/actions/setup-go/issues/403
+        # cache-dependency-path: "**/*.sum"
+        cache: false
       id: go
 
     - name: Install VRF kernel module
@@ -222,18 +234,17 @@ jobs:
       continue-on-error: true
       env:
         COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        GO111MODULE: off
       run: |
         set -x
-        go get github.com/mattn/goveralls
-        go get github.com/modocache/gover
+        go install github.com/mattn/goveralls@latest
+        go install github.com/modocache/gover@latest
         PATH=$PATH:$(go env GOPATH)/bin
 
-        mkdir -p $(go env GOPATH)/src/github.com/ovn-kubernetes
-        ln -sf $(pwd) $(go env GOPATH)/src/github.com/ovn-kubernetes/ovn-kubernetes
+        mkdir -p $(go env GOPATH)/src/github.com/ovn-org
+        ln -sf $(pwd) $(go env GOPATH)/src/github.com/ovn-org/ovn-kubernetes
 
         gover
-        goveralls -coverprofile=gover.coverprofile -service=github
+        GO111MODULE=off goveralls -coverprofile=gover.coverprofile -service=github
 
     - name: Cache PR image
       if: steps.is_pr_image_build_needed.outputs.PR_IMAGE_RESTORED != 'true' && success()
@@ -286,7 +297,11 @@ jobs:
       uses: actions/setup-go@v5
       with:
         go-version-file: 'go-controller/go.mod'
-        cache-dependency-path: "**/*.sum"
+        # Disabling cache to avoid warnings until these two issues are fixed
+        # https://github.com/actions/setup-go/issues/424
+        # https://github.com/actions/setup-go/issues/403
+        # cache-dependency-path: "**/*.sum"
+        cache: false
       id: go
 
     - name: Set up environment
@@ -521,7 +536,11 @@ jobs:
       uses: actions/setup-go@v5
       with:
         go-version-file: 'go-controller/go.mod'
-        cache-dependency-path: "**/*.sum"
+        # Disabling cache to avoid warnings until these two issues are fixed
+        # https://github.com/actions/setup-go/issues/424
+        # https://github.com/actions/setup-go/issues/403
+        # cache-dependency-path: "**/*.sum"
+        cache: false
       id: go
 
     - name: Set up environment
@@ -685,7 +704,11 @@ jobs:
       uses: actions/setup-go@v5
       with:
         go-version-file: 'go-controller/go.mod'
-        cache-dependency-path: "**/*.sum"
+        # Disabling cache to avoid warnings until these two issues are fixed
+        # https://github.com/actions/setup-go/issues/424
+        # https://github.com/actions/setup-go/issues/403
+        # cache-dependency-path: "**/*.sum"
+        cache: false
       id: go
 
     - name: Set up environment
diff --git a/contrib/kind-common b/contrib/kind-common
index 2bc44154d4a..5c81856f859 100644
--- a/contrib/kind-common
+++ b/contrib/kind-common
@@ -169,7 +169,7 @@ EOF
   # Override GOBIN until https://github.com/metallb/metallb/issues/2218 is fixed.
   GOBIN="" inv dev-env -n ovn -b frr -p bgp -i "${ip_family}"
 
-  docker network rm clientnet || true
+  docker network rm -f clientnet
   docker network create --subnet="${METALLB_CLIENT_NET_SUBNET_IPV4}" ${ipv6_network} --driver bridge clientnet
   docker network connect clientnet frr
   if  [ "$KIND_IPV6_SUPPORT" == true ]; then
@@ -177,7 +177,7 @@ EOF
     docker exec frr sysctl -w net.ipv6.conf.all.forwarding=1
   fi
   # Note: this image let's us use it also for creating load balancer backends that can send big packets
-  docker rm -f lbclient || true
+  docker rm -f lbclient
   docker run  --cap-add NET_ADMIN --user 0  -d --network clientnet  --rm  --name lbclient  quay.io/itssurya/dev-images:metallb-lbservice
   popd
   delete_metallb_dir
@@ -730,8 +730,8 @@ deploy_bgp_external_server() {
     ip_family="ipv4"
     ipv6_network=""
   fi
-  docker rm -f bgpserver || true
-  docker network rm bgpnet || true
+  docker rm -f bgpserver
+  docker network rm -f bgpnet
   docker network create --subnet="${BGP_SERVER_NET_SUBNET_IPV4}" ${ipv6_network} --driver bridge bgpnet
   docker network connect bgpnet frr
   docker run  --cap-add NET_ADMIN --user 0  -d --network bgpnet  --rm  --name bgpserver -p 8080:8080  registry.k8s.io/e2e-test-images/agnhost:2.45 netexec


Reviews:
user: login: pperiyasamy
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-03T07:52:41Z
user: login: jcaamano
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-03T08:52:34Z
user: login: jcaamano
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-03T08:56:02Z
user: login: qinqon
body: LGTM
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-03T13:31:51Z

Review comments:
diff_hunk: @@ -27,7 +27,11 @@ jobs:
       uses: actions/setup-go@v5
       with:
         go-version-file: 'go-controller/go.mod'
-        cache-dependency-path: "**/*.sum"
+        # Disabling cache to avoid warnings until these two issues are fixed
path: .github/workflows/docker.yml
user: login: pperiyasamy
body: Nit, just for my understanding, which warnings going off when we disable cache ?

seeing below message are not seen now with the change for setup go action.

```
/opt/hostedtoolcache/go/1.22.0/x64/bin/go env GOMODCACHE
/opt/hostedtoolcache/go/1.22.0/x64/bin/go env GOCACHE
/home/runner/go/pkg/mod
/home/runner/.cache/go-build
Cache hit for: setup-go-Linux-x64-ubuntu22-go-1.22.0-a8c6e738605850ace6401da4d0f954016eee8d2f76a1a3a82198fc761e43785b
Received 230686720 of 756704065 (30.5%), 217.6 MBs/sec
Received 465567744 of 756704065 (61.5%), 220.7 MBs/sec
Received 679477248 of 756704065 (89.8%), 213.8 MBs/sec
Received 756704065 of 756704065 (100.0%), 217.6 MBs/sec
Cache Size: ~722 MB (756704065 B)
/usr/bin/tar -xf /home/runner/work/_temp/cd103e33-273d-43c5-886c-08f3b4dc4f63/cache.tzst -P -C /home/runner/work/ovn-kubernetes/ovn-kubernetes --use-compress-program unzstd
Cache restored successfully
Cache restored from key: setup-go-Linux-x64-ubuntu22-go-1.22.0-a8c6e738605850ace6401da4d0f954016eee8d2f76a1a3a82198fc761e43785b
```
created_at: 2025-04-03T07:45:55Z
author_association: CONTRIBUTOR
diff_hunk: @@ -222,15 +222,14 @@ jobs:
       continue-on-error: true
       env:
         COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        GO111MODULE: off
       run: |
         set -x
-        go get github.com/mattn/goveralls
-        go get github.com/modocache/gover
+        go install github.com/mattn/goveralls@latest
+        go install github.com/modocache/gover@latest
         PATH=$PATH:$(go env GOPATH)/bin
 
-        mkdir -p $(go env GOPATH)/src/github.com/ovn-kubernetes
-        ln -sf $(pwd) $(go env GOPATH)/src/github.com/ovn-kubernetes/ovn-kubernetes
+        mkdir -p $(go env GOPATH)/src/github.com/ovn-org
path: .github/workflows/test.yml
user: login: pperiyasamy
body: is this just a `ovn-kubernetes->ovn-org` cosmetic change ?

this action is still failing.

```
++ pwd
++ go env GOPATH
+ ln -sf /home/runner/work/ovn-kubernetes/ovn-kubernetes /home/runner/go/src/github.com/ovn-org/ovn-kubernetes
+ gover
+ goveralls -coverprofile=gover.coverprofile -service=github
cannot find file "github.com/ovn-org/ovn-kubernetes/go-controller/hybrid-overlay/pkg/controller/ho_node_linux.go": can't find "ho_node_linux.go": no required module provides package github.com/ovn-org/ovn-kubernetes/go-controller/hybrid-overlay/pkg/controller: go.mod file not found in current directory or any parent directory; see 'go help modules'
```
created_at: 2025-04-03T07:52:22Z
author_association: CONTRIBUTOR
diff_hunk: @@ -222,15 +222,14 @@ jobs:
       continue-on-error: true
       env:
         COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        GO111MODULE: off
       run: |
         set -x
-        go get github.com/mattn/goveralls
-        go get github.com/modocache/gover
+        go install github.com/mattn/goveralls@latest
+        go install github.com/modocache/gover@latest
         PATH=$PATH:$(go env GOPATH)/bin
 
-        mkdir -p $(go env GOPATH)/src/github.com/ovn-kubernetes
-        ln -sf $(pwd) $(go env GOPATH)/src/github.com/ovn-kubernetes/ovn-kubernetes
+        mkdir -p $(go env GOPATH)/src/github.com/ovn-org
path: .github/workflows/test.yml
user: login: jcaamano
body: I know. Working on it.
created_at: 2025-04-03T08:52:33Z
author_association: CONTRIBUTOR
diff_hunk: @@ -27,7 +27,11 @@ jobs:
       uses: actions/setup-go@v5
       with:
         go-version-file: 'go-controller/go.mod'
-        cache-dependency-path: "**/*.sum"
+        # Disabling cache to avoid warnings until these two issues are fixed
path: .github/workflows/docker.yml
user: login: jcaamano
body: We would have things like
```
Build-PR
Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
```
as it is mentioned in the two issues I linked.
created_at: 2025-04-03T08:56:02Z
author_association: CONTRIBUTOR

PR comments:
user: login: jcaamano
created_at: 2025-04-03T11:59:50Z
body: PTAL @qinqon 
author_association: CONTRIBUTOR
user: login: qinqon
created_at: 2025-04-03T13:19:15Z
body: @jcaamano aren't we missing reading GO_VERSION from go.mod at Makefile too ? 
author_association: CONTRIBUTOR
user: login: jcaamano
created_at: 2025-04-03T13:30:20Z
body: > @jcaamano aren't we missing reading GO_VERSION from go.mod at Makefile too ?

Don't intend to add that in this PR. Maybe next bump.
author_association: CONTRIBUTOR
user: login: qinqon
created_at: 2025-04-03T13:31:33Z
body: > > @jcaamano aren't we missing reading GO_VERSION from go.mod at Makefile too ?
> 
> Don't intend to add that in this PR. Maybe next bump.

Fair enough
author_association: CONTRIBUTOR