Skip to content

Commit 9afe55b

Browse files
authored
chore: Bump go version and deps (#1305)
* chore: Bump go version and deps Signed-off-by: Jorge Turrado <[email protected]> * Bump golangci Signed-off-by: Jorge Turrado <[email protected]> * Bump golangci Signed-off-by: Jorge Turrado <[email protected]> --------- Signed-off-by: Jorge Turrado <[email protected]>
1 parent bf35564 commit 9afe55b

File tree

19 files changed

+301
-294
lines changed

19 files changed

+301
-294
lines changed

.devcontainer/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
44
#-------------------------------------------------------------------------------------------------------------
55

6-
FROM golang:1.23.6
6+
FROM golang:1.24.3
77

88
# Avoid warnings by switching to noninteractive
99
ENV DEBIAN_FRONTEND=noninteractive
@@ -55,7 +55,7 @@ RUN apt-get update \
5555
&& go install honnef.co/go/tools/cmd/staticcheck@latest \
5656
&& go install golang.org/x/tools/gopls@latest \
5757
# Install golangci-lint
58-
&& curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.57.2 \
58+
&& curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.1.0 \
5959
#
6060
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
6161
&& groupadd --gid $USER_GID $USERNAME \

.github/workflows/build_canary.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
packages: write
1717
id-token: write # needed for signing the images with GitHub OIDC Token **not production ready**
1818

19-
container: ghcr.io/kedacore/keda-tools:1.23.6
19+
container: ghcr.io/kedacore/keda-tools:1.24.3
2020
steps:
2121
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2222

@@ -43,7 +43,7 @@ jobs:
4343

4444
# https://github.com/sigstore/cosign-installer
4545
- name: Install Cosign
46-
uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1
46+
uses: sigstore/cosign-installer@3454372f43399081ed03b604cb2d021dabca52bb # v3.8.2
4747

4848
- name: Check Cosign install!
4949
run: cosign version

.github/workflows/build_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
packages: write
1313
id-token: write # needed for signing the images with GitHub OIDC Token **not production ready**
1414

15-
container: ghcr.io/kedacore/keda-tools:1.23.6
15+
container: ghcr.io/kedacore/keda-tools:1.24.3
1616
steps:
1717
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1818

@@ -49,7 +49,7 @@ jobs:
4949

5050
# https://github.com/sigstore/cosign-installer
5151
- name: Install Cosign
52-
uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1
52+
uses: sigstore/cosign-installer@3454372f43399081ed03b604cb2d021dabca52bb # v3.8.2
5353

5454
- name: Check Cosign install!
5555
run: cosign version

.github/workflows/e2e-tests.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ jobs:
3737

3838
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3939

40-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v4.1
40+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
4141
with:
42-
go-version: "1.23"
42+
go-version: "1.24"
4343

4444
- name: Helm install
4545
uses: Azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0
@@ -107,9 +107,9 @@ jobs:
107107
steps:
108108
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
109109

110-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v4.1
110+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
111111
with:
112-
go-version: "1.23"
112+
go-version: "1.24"
113113

114114
- name: Helm install
115115
uses: Azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0

.github/workflows/images.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313
jobs:
1414
build_scaler:
1515
runs-on: ubuntu-latest
16-
container: ghcr.io/kedacore/keda-tools:1.23.6
16+
container: ghcr.io/kedacore/keda-tools:1.24.3
1717
steps:
1818
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1919
- name: Register workspace path
@@ -25,7 +25,7 @@ jobs:
2525
2626
build_operator:
2727
runs-on: ubuntu-latest
28-
container: ghcr.io/kedacore/keda-tools:1.23.6
28+
container: ghcr.io/kedacore/keda-tools:1.24.3
2929
steps:
3030
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3131
- name: Register workspace path
@@ -37,7 +37,7 @@ jobs:
3737
3838
build_interceptor:
3939
runs-on: ubuntu-latest
40-
container: ghcr.io/kedacore/keda-tools:1.23.6
40+
container: ghcr.io/kedacore/keda-tools:1.24.3
4141
steps:
4242
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
4343
- name: Register workspace path

.github/workflows/tests.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
validate:
1717
name: validate - ${{ matrix.name }}
1818
runs-on: ${{ matrix.runner }}
19-
container: ghcr.io/kedacore/keda-tools:1.23.6
19+
container: ghcr.io/kedacore/keda-tools:1.24.3
2020
strategy:
2121
matrix:
2222
include:
@@ -40,13 +40,13 @@ jobs:
4040
echo ::set-output name=build_cache::$(go env GOCACHE)
4141
4242
- name: Go modules cache
43-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
43+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
4444
with:
4545
path: ${{ steps.go-paths.outputs.mod_cache }}
4646
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
4747

4848
- name: Go build cache
49-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
49+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
5050
with:
5151
path: ${{ steps.go-paths.outputs.build_cache }}
5252
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }}
@@ -79,7 +79,7 @@ jobs:
7979
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8080
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
8181
with:
82-
go-version: "1.23"
83-
- uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea # v6.5.1
82+
go-version: "1.24"
83+
- uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
8484
with:
85-
version: v1.60
85+
version: v2.1.0

.golangci.yml

Lines changed: 55 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,74 @@
1-
# options for analysis running
1+
version: "2"
22
run:
3-
# default concurrency is a available CPU number
43
concurrency: 4
5-
# add the build tags to include e2e tests files
64
build-tags:
7-
- e2e
8-
# timeout for analysis, e.g. 30s, 5m, default is 1m
9-
timeout: 10m
5+
- e2e
106
linters:
11-
# please, do not use `enable-all`: it's deprecated and will be removed soon.
12-
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
13-
disable-all: true
7+
default: none
148
enable:
15-
- typecheck
16-
- dupl
17-
- goprintffuncname
18-
- govet
19-
- nolintlint
20-
#- rowserrcheck
21-
- gofmt
22-
- revive
23-
- goimports
24-
- misspell
259
- bodyclose
2610
- unconvert
2711
- ineffassign
2812
- staticcheck
2913
- copyloopvar
3014
#- depguard #https://github.com/kedacore/keda/issues/4980
3115
- dogsled
16+
- dupl
3217
- errcheck
3318
#- funlen
34-
- gci
3519
- goconst
3620
- gocritic
3721
- gocyclo
38-
- gosimple
39-
- stylecheck
40-
- unused
41-
- unparam
22+
- goprintffuncname
23+
- govet
24+
- ineffassign
25+
- misspell
26+
- nolintlint
27+
- revive
28+
- staticcheck
4229
- unconvert
30+
- unparam
31+
- unused
4332
- whitespace
44-
45-
issues:
46-
include:
47-
- EXC0002 # disable excluding of issues about comments from golint
48-
# Excluding configuration per-path, per-linter, per-text and per-source
49-
exclude-rules:
50-
- path: _test\.go
51-
linters:
52-
- dupl
53-
- unparam
54-
- revive
55-
# Exclude gci check for //+kubebuilder:scaffold:imports comments. Waiting to
56-
# resolve https://github.com/kedacore/keda/issues/4379
57-
- path: operator/controllers/http/suite_test.go
58-
linters:
59-
- gci
60-
- path: operator/main.go
61-
linters:
62-
- gci
63-
# Exlude httpso.Spec.ScaleTargetRef.Deployment until we remove it in v0.9.0
64-
- linters:
65-
- staticcheck
66-
text: "SA1019: httpso.Spec.ScaleTargetRef.Deployment"
67-
68-
linters-settings:
69-
funlen:
70-
lines: 80
71-
statements: 40
72-
gci:
73-
sections:
74-
- standard
75-
- default
76-
- prefix(github.com/kedacore/http-add-on)
33+
settings:
34+
funlen:
35+
lines: 80
36+
statements: 40
37+
exclusions:
38+
generated: lax
39+
presets:
40+
- comments
41+
- common-false-positives
42+
- legacy
43+
- std-error-handling
44+
rules:
45+
- linters:
46+
- dupl
47+
- revive
48+
- unparam
49+
path: _test\.go
50+
paths:
51+
- third_party$
52+
- builtin$
53+
- examples$
54+
formatters:
55+
enable:
56+
- gci
57+
- gofmt
58+
- goimports
59+
settings:
60+
gci:
61+
sections:
62+
- standard
63+
- default
64+
- prefix(github.com/kedacore/http-add-on)
65+
exclusions:
66+
generated: lax
67+
paths:
68+
- third_party$
69+
- builtin$
70+
- examples$
71+
# Exclude gci check for //+kubebuilder:scaffold:imports comments. Waiting to
72+
# resolve https://github.com/kedacore/keda/issues/4379
73+
- operator/controllers/http/suite_test.go
74+
- operator/main.go

0 commit comments

Comments
 (0)