Skip to content

Commit 380a432

Browse files
authored
build(go): upgrade Go version to 1.24 across workflows and dependencies (#360)
* build(go): upgrade Go version to 1.24 across workflows and dependencies * refactor(controller): simplify error wrapping in Reconcile * build(makefile): add VET_EXCLUDES to exclude packages from vet * fix ci
1 parent e1a20ee commit 380a432

File tree

12 files changed

+195
-197
lines changed

12 files changed

+195
-197
lines changed

.github/workflows/e2e_test.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ name: Operator E2e tests
1717
on:
1818
pull_request:
1919
branches:
20-
- '*'
20+
- "*"
2121
paths:
22-
- '**.go'
23-
- '.github/workflows/e2e_test.yml'
22+
- "**.go"
23+
- ".github/workflows/e2e_test.yml"
2424
env:
2525
GOPRIVATE: github.com/streamnative
2626
jobs:
2727
e2e-test:
2828
name: E2e tests for Operators
2929
strategy:
3030
matrix:
31-
alwaysUpdatePulsar: [ "true", "false" ]
31+
alwaysUpdatePulsar: ["true", "false"]
3232
runs-on: ubuntu-latest
3333
env:
3434
ALWAYS_UPDATE_PULSAR_RESOURCE: ${{ matrix.alwaysUpdatePulsar }}
@@ -55,10 +55,10 @@ jobs:
5555
- name: Cleanup disk
5656
run: sudo rm -rf /usr/local/.ghcup
5757

58-
- name: Set up Go 1.23
58+
- name: Set up Go 1.24
5959
uses: actions/setup-go@v3
6060
with:
61-
go-version: '1.23'
61+
go-version: "1.24"
6262
id: go
6363

6464
- name: Set up Git token
@@ -89,6 +89,15 @@ jobs:
8989
kind load docker-image --name pulsar-dev docker.cloudsmith.io/streamnative/operators/kubebuilder/kube-rbac-proxy:v0.8.0
9090
df -h
9191
92+
- name: Build and Setup Pulsar Resources Operator
93+
run: |
94+
make docker-build
95+
kind load docker-image --name pulsar-dev controller:latest
96+
make deploy
97+
kubectl get crds
98+
kubectl wait --for condition=available --timeout=360s deployment/pulsar-resources-operator-controller-manager -npulsar-resources-operator-system
99+
df -h
100+
92101
- name: Install Pulsar Operators and sn-platform
93102
run: |
94103
helm repo add streamnative https://charts.streamnative.io
@@ -106,15 +115,6 @@ jobs:
106115
helm install test --set initialize=true --values ../.ci/clusters/values.yaml charts/pulsar
107116
df -h
108117
109-
- name: Build and Setup Pulsar Resources Operator
110-
run: |
111-
make docker-build
112-
kind load docker-image --name pulsar-dev controller:latest
113-
make deploy
114-
kubectl get crds
115-
kubectl wait --for condition=available --timeout=360s deployment/pulsar-resources-operator-controller-manager -npulsar-resources-operator-system
116-
df -h
117-
118118
- name: Run Operator Test
119119
run: |
120120
cd tests

.github/workflows/golangci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
4242
- uses: actions/setup-go@v3
4343
with:
44-
go-version: 1.23
44+
go-version: 1.24
4545

4646
- uses: actions/checkout@v3
4747
- name: golangci-lint
@@ -72,4 +72,4 @@ jobs:
7272
uses: mxschmitt/action-tmate@v3
7373
timeout-minutes: 15
7474
if: failure()
75-
# You can use golangci-lint run --fix to see how to fix the error
75+
# You can use golangci-lint run --fix to see how to fix the error

.github/workflows/release-operator.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ jobs:
3838
default_channel: ${{ steps.redhat.outputs.default_channel }}
3939

4040
steps:
41-
- name: Set up Go 1.23
41+
- name: Set up Go 1.24
4242
uses: actions/setup-go@v3
4343
with:
44-
go-version: "1.23"
44+
go-version: "1.24"
4545
id: go
4646

4747
- name: Set up Git token

.github/workflows/style.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
# limitations under the License.
1414

1515
name: Precommit Style Check
16-
on:
16+
on:
1717
push:
1818
branches:
19-
- master
20-
- main
21-
- develop
19+
- master
20+
- main
21+
- develop
2222
pull_request:
2323
branches:
24-
- '*'
24+
- "*"
2525
env:
2626
GOPRIVATE: github.com/streamnative
2727
jobs:
@@ -32,20 +32,20 @@ jobs:
3232
ACCESS_TOKEN: ${{ secrets.SNBOT_GITHUB_TOKEN }}
3333
GOPRIVATE: github.com/streamnative
3434
steps:
35-
- name: Set up Go 1.23
36-
uses: actions/setup-go@v3
37-
with:
38-
go-version: '1.23'
39-
id: go
35+
- name: Set up Go 1.24
36+
uses: actions/setup-go@v3
37+
with:
38+
go-version: "1.24"
39+
id: go
4040

41-
- name: Set up git token
42-
run: |
43-
git config --global url."https://${ACCESS_TOKEN}:@github.com/".insteadOf "https://github.com/"
41+
- name: Set up git token
42+
run: |
43+
git config --global url."https://${ACCESS_TOKEN}:@github.com/".insteadOf "https://github.com/"
4444
45-
- name: Check out code into the Go module directory
46-
uses: actions/checkout@v3
45+
- name: Check out code into the Go module directory
46+
uses: actions/checkout@v3
4747

48-
- name: Check style
49-
run: |
50-
./scripts/verify_gofmt.sh ./...
51-
./scripts/verify_govet.sh ./...
48+
- name: Check style
49+
run: |
50+
./scripts/verify_gofmt.sh ./...
51+
./scripts/verify_govet.sh ./...

0 commit comments

Comments
 (0)