From 78b6965e57f584cf27fbfa60c7cb4fdd0f52bedd Mon Sep 17 00:00:00 2001 From: Marcelo Guerrero Date: Tue, 15 Oct 2024 11:22:38 +0200 Subject: [PATCH 1/3] Use go version set in go.mod for workflows Signed-off-by: Marcelo Guerrero --- .github/workflows/build.yml | 9 ++++----- .github/workflows/test.yml | 17 ++++++++--------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b44c3219..6cfe841bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,19 +4,18 @@ jobs: build: strategy: matrix: - go-version: [1.21.x] #goarch: [386, amd64, arm, ppc64le, arm64] goarch: [amd64, arm64] os: [ubuntu-latest] #, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Install Go uses: actions/setup-go@v5 with: - go-version: ${{ matrix.go-version }} - - - name: Checkout code - uses: actions/checkout@v4 + go-version-file: go.mod - name: Install kubebuilder tools run: ./hack/install-kubebuilder-tools.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 09086634e..c67415d35 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,17 +4,16 @@ jobs: test: strategy: matrix: - go-version: [1.21.x] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Install Go uses: actions/setup-go@v5 with: - go-version: ${{ matrix.go-version }} - - - name: Checkout code - uses: actions/checkout@v4 + go-version-file: go.mod - name: Get all changed files excluding docs and README id: changed-files @@ -71,13 +70,13 @@ jobs: env: NUMBER_OF_COMPUTE_NODES: 5 steps: + - name: Checkout code into the Go module directory + uses: actions/checkout@v4 + - name: Set up Go version uses: actions/setup-go@v5 with: - go-version: 1.21.x - - - name: Checkout code into the Go module directory - uses: actions/checkout@v4 + go-version-file: go.mod - name: Get all changed files excluding docs and README id: changed-files From 5d6641d3a2ffbc7137ca2f29a5bc83b53b7ffb07 Mon Sep 17 00:00:00 2001 From: Marcelo Guerrero Date: Tue, 15 Oct 2024 11:24:06 +0200 Subject: [PATCH 2/3] Bump go version 1.23 Align with version used in Dockerfile Signed-off-by: Marcelo Guerrero --- go.mod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 08a70cb36..b8fb71c67 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/k8snetworkplumbingwg/whereabouts -go 1.21 +go 1.23 require ( github.com/blang/semver v3.5.1+incompatible @@ -59,7 +59,7 @@ require ( golang.org/x/sys v0.20.0 // indirect golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.3.0 // indirect + golang.org/x/time v0.3.0 golang.org/x/tools v0.20.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.33.0 // indirect @@ -68,7 +68,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect - k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/klog/v2 v2.110.1 k8s.io/utils v0.0.0-20230726121419-3b25d923346b sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect From f17422d4c683779c3caa4687148e3078cf62e0d9 Mon Sep 17 00:00:00 2001 From: Marcelo Guerrero Date: Mon, 21 Oct 2024 10:48:16 +0200 Subject: [PATCH 3/3] Fix OverlappingRangeIPReservation test Signed-off-by: Marcelo Guerrero --- e2e/e2e_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/e2e_test.go b/e2e/e2e_test.go index 8b3efc777..40f006e65 100644 --- a/e2e/e2e_test.go +++ b/e2e/e2e_test.go @@ -678,7 +678,7 @@ var _ = Describe("Whereabouts functionality", func() { enableOverlappingRanges), func() { BeforeEach(func() { netAttachDef2 = util.MacvlanNetworkWithWhereaboutsIPAMNetwork(testNetwork2Name, testNamespace, - ipv4TestRangeOverlapping, []string{}, "", false) + ipv4TestRangeOverlapping, []string{}, "", enableOverlappingRanges) By("creating a second NetworkAttachmentDefinition for whereabouts") _, err := clientInfo.AddNetAttachDef(netAttachDef2)