Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade to go 1.24 #4313

Merged
merged 3 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .docker/Dockerfile-build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax = docker/dockerfile:1-experimental
FROM golang:1.23-bullseye AS builder
FROM golang:1.24-bullseye AS builder

RUN apt-get update && apt-get upgrade -y &&\
mkdir -p /var/lib/sqlite
Expand Down
2 changes: 1 addition & 1 deletion .docker/Dockerfile-debug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.23-bullseye
FROM golang:1.24-bullseye
ENV CGO_ENABLED 1

RUN apt-get update && apt-get install -y --no-install-recommends inotify-tools psmisc
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
fetch-depth: 2
- uses: actions/setup-go@v4
with:
go-version: "1.23"
go-version: "1.24"
- run: go list -json > go.list
- name: Run nancy
uses: sonatype-nexus-community/[email protected]
Expand All @@ -96,7 +96,7 @@ jobs:
GOGC: 100
with:
args: --timeout 10m0s
version: v1.61.0
version: v1.64.5
- name: Build Kratos
run: make install
- name: Run go-acc (tests)
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.23"
go-version: "1.24"

- name: Install selfservice-ui-react-native
uses: actions/checkout@v3
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.23"
go-version: "1.24"
- run: go build -tags sqlite,json1 .

- name: Install selfservice-ui-react-native
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.23"
go-version: "1.24"
- run: make format
- name: Indicate formatting issues
run: git diff HEAD --exit-code --color
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/ory/kratos

go 1.23
go 1.24

toolchain go1.23.2
toolchain go1.24.0

replace (
github.com/coreos/go-oidc/v3 => github.com/ory/go-oidc/v3 v3.0.0-20241127113405-e5362711266b
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,6 @@ github.com/ory/pop/v6 v6.2.1-0.20241121111754-e5dfc0f3344b h1:BIzoOe2/wynZBQak1p
github.com/ory/pop/v6 v6.2.1-0.20241121111754-e5dfc0f3344b/go.mod h1:okVAYKGtgunD/wbW3NGhZTndJCS+6FqO+cA89rQ4doc=
github.com/ory/sessions v1.2.2-0.20220110165800-b09c17334dc2 h1:zm6sDvHy/U9XrGpixwHiuAwpp0Ock6khSVHkrv6lQQU=
github.com/ory/sessions v1.2.2-0.20220110165800-b09c17334dc2/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
github.com/ory/x v0.0.675 h1:K6GpVo99BXBFv2UiwMjySNNNqCFKGswynrt7vWQJFU8=
github.com/ory/x v0.0.675/go.mod h1:zJmnDtKje2FCP4EeFvRsKk94XXiqKCSGJMZcirAfhUs=
github.com/ory/x v0.0.689 h1:pMXmnw2aoHiq4jRX9xtGXqX+VU3USEwlUUbwNCxmiZQ=
github.com/ory/x v0.0.689/go.mod h1:UpPgjobuyIyHh1pG4LxqmfMpuNOnzf2BzwyouwBeCk4=
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
Expand Down
4 changes: 2 additions & 2 deletions persistence/sql/persister_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func TestPersister_Transaction(t *testing.T) {
errMessage := "failing because why not"
err := p.Transaction(context.Background(), func(_ context.Context, connection *pop.Connection) error {
require.NoError(t, connection.Create(i))
return errors.Errorf(errMessage)
return errors.New(errMessage)
})
require.Error(t, err)
assert.Contains(t, err.Error(), errMessage)
Expand All @@ -318,7 +318,7 @@ func TestPersister_Transaction(t *testing.T) {
ctx := sql.WithTransaction(context.Background(), tx)
require.NoError(t, p.CreateLoginFlow(ctx, lr), "%+v", lr)
require.NoError(t, getErr(p.GetLoginFlow(ctx, lr.ID)), "%+v", lr)
return errors.Errorf(errMessage)
return errors.New(errMessage)
})
require.Error(t, err)
assert.Contains(t, err.Error(), errMessage)
Expand Down
6 changes: 3 additions & 3 deletions selfservice/strategy/oidc/strategy_helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,19 +303,19 @@ func newHydra(t *testing.T, subject *string, claims *idTokenClaims, scope *[]str
pr := remotePublic + "/health/ready"
res, err := http.DefaultClient.Get(pr)
if err != nil || res.StatusCode != 200 {
return errors.Errorf("Hydra public is not ready at " + pr)
return errors.Errorf("Hydra public is not ready at %s", pr)
}

wellKnown := remotePublic + "/.well-known/openid-configuration"
res, err = http.DefaultClient.Get(wellKnown)
if err != nil || res.StatusCode != 200 {
return errors.Errorf("Hydra .well-known is not ready at " + wellKnown)
return errors.Errorf("Hydra .well-known is not ready at %s", wellKnown)
}

ar := remoteAdmin + "/health/ready"
res, err = http.DefaultClient.Get(ar)
if err != nil && res.StatusCode != 200 {
return errors.Errorf("Hydra admin is not ready at " + ar)
return errors.Errorf("Hydra admin is not ready at %s", ar)
} else {
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions selfservice/strategy/password/op_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,13 @@ func newHydra(t *testing.T, loginUI string, consentUI string) (hydraAdmin string
pr := hydraPublic + "/health/ready"
res, err := http.DefaultClient.Get(pr)
if err != nil || res.StatusCode != 200 {
return errors.Errorf("Hydra public is not ready at " + pr)
return errors.Errorf("Hydra public is not ready at %s", pr)
}

ar := hydraAdmin + "/health/ready"
res, err = http.DefaultClient.Get(ar)
if err != nil && res.StatusCode != 200 {
return errors.Errorf("Hydra admin is not ready at " + ar)
return errors.Errorf("Hydra admin is not ready at %s", ar)
} else {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/mock/httptarget/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/ory/mock

go 1.23.1
go 1.24.0

require (
github.com/julienschmidt/httprouter v1.3.0
Expand Down
Loading