Skip to content

Commit 3ddb5a7

Browse files
Merge pull request #3913 from dexidp/update-go
build: update Go version
2 parents 3e90ce9 + c9da08e commit 3ddb5a7

File tree

14 files changed

+350
-81
lines changed

14 files changed

+350
-81
lines changed

.envrc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
if ! has nix_direnv_version || ! nix_direnv_version 3.0.5; then
2-
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" "sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w="
1+
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
2+
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM="
33
fi
4-
5-
use flake
4+
use flake . --impure
65

76
dotenv_if_exists

.github/workflows/artifacts.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ jobs:
4444
id-token: write
4545
security-events: write
4646

47-
4847
outputs:
4948
name: ${{ steps.image-name.outputs.value }}
5049
digest: ${{ steps.build.outputs.digest }}
@@ -203,21 +202,21 @@ jobs:
203202
with:
204203
path: cache/db
205204
key: trivy-cache-${{ steps.date.outputs.date }}
206-
restore-keys:
207-
trivy-cache-
205+
restore-keys: trivy-cache-
208206

209207
- name: Run Trivy vulnerability scanner
210208
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # 0.29.0
211209
with:
212210
input: image
213211
format: sarif
214212
output: trivy-results.sarif
215-
scan-type: 'fs'
216-
scan-ref: '.'
213+
scan-type: "fs"
214+
scan-ref: "."
217215
cache-dir: "./cache"
218-
env:
219-
TRIVY_SKIP_DB_UPDATE: true
220-
TRIVY_SKIP_JAVA_DB_UPDATE: true
216+
# Disable skipping trivy cache for now
217+
# env:
218+
# TRIVY_SKIP_DB_UPDATE: true
219+
# TRIVY_SKIP_JAVA_DB_UPDATE: true
221220

222221
## Trivy-db uses `0600` permissions.
223222
## But `action/cache` use `runner` user by default

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
pull_request:
77

88
permissions:
@@ -71,7 +71,7 @@ jobs:
7171
- name: Set up Go
7272
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
7373
with:
74-
go-version: "1.21"
74+
go-version: "1.23"
7575

7676
- name: Download tool dependencies
7777
run: make deps
@@ -142,7 +142,7 @@ jobs:
142142
- name: Set up Go
143143
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
144144
with:
145-
go-version: "1.21"
145+
go-version: "1.23"
146146

147147
- name: Download golangci-lint
148148
run: make bin/golangci-lint

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/.devenv/
12
/.direnv/
23
/.idea/
34
/bin/

.golangci.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
11
run:
22
timeout: 4m
3-
skip-dirs:
4-
- storage/ent/db # generated ent code
53

64
linters-settings:
75
depguard:
8-
rules:
9-
deprecated:
10-
deny:
11-
- pkg: "io/ioutil"
12-
desc: "The 'io/ioutil' package is deprecated. Use corresponding 'os' or 'io' functions instead."
6+
rules:
7+
deprecated:
8+
deny:
9+
- pkg: "io/ioutil"
10+
desc: "The 'io/ioutil' package is deprecated. Use corresponding 'os' or 'io' functions instead."
1311
gci:
14-
local-prefixes: github.com/dexidp/dex
12+
sections:
13+
- standard
14+
- default
15+
- prefix(github.com/dexidp/dex)
1516
goimports:
1617
local-prefixes: github.com/dexidp/dex
1718

18-
1919
linters:
2020
disable-all: true
2121
enable:
2222
- depguard
2323
- dogsled
2424
- exhaustive
25-
- exportloopref
2625
- gci
2726
- gochecknoinits
2827
- gocritic
@@ -92,3 +91,7 @@ linters:
9291
# - nestif
9392
# - testpackage
9493
# - wsl
94+
95+
issues:
96+
exclude-dirs:
97+
- storage/ent/db # generated ent code

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export GOBIN=$(PWD)/bin
1818
LD_FLAGS="-w -X main.version=$(VERSION)"
1919

2020
# Dependency versions
21-
GOLANGCI_VERSION = 1.56.2
22-
GOTESTSUM_VERSION ?= 1.10.1
21+
GOLANGCI_VERSION = 1.63.4
22+
GOTESTSUM_VERSION ?= 1.12.0
2323

2424
PROTOC_VERSION = 24.4
2525
PROTOC_GEN_GO_VERSION = 1.32.0

api/v2/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/dexidp/dex/api/v2
22

3-
go 1.21
3+
go 1.23
44

55
require (
66
google.golang.org/grpc v1.65.0

connector/saml/saml.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ func (p *provider) validateStatus(status *status) error {
467467
if statusMessage != nil && statusMessage.Value != "" {
468468
errorMessage += " -> " + statusMessage.Value
469469
}
470-
return fmt.Errorf(errorMessage)
470+
return errors.New(errorMessage)
471471
}
472472
return nil
473473
}

examples/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/dexidp/dex/examples
22

3-
go 1.21
3+
go 1.23
44

55
require (
66
github.com/coreos/go-oidc/v3 v3.11.0

0 commit comments

Comments
 (0)