From 14754e8edc2da52fec2285b0f3ee405d743df1ee Mon Sep 17 00:00:00 2001 From: Iraq <66622793+kkrime@users.noreply.github.com> Date: Tue, 25 Mar 2025 07:01:29 +0000 Subject: [PATCH] chore: updating go to 1.24 (#9507) # Which Problems Are Solved Updating go to 1.24 --------- Co-authored-by: Iraq Jaber (cherry picked from commit 596970cc7e62e034e45a3772e98ad51ca8f201ae) --- .github/workflows/build.yml | 5 ----- .github/workflows/compile.yml | 5 +---- .github/workflows/core-integration-test.yml | 5 +---- .github/workflows/core-unit-test.yml | 5 +---- .github/workflows/core.yml | 5 +---- .github/workflows/lint.yml | 5 +---- internal/cache/connector/pg/pg.go | 2 +- internal/command/user_schema_model.go | 4 ++-- 8 files changed, 8 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1ab5e6bafd..c5e99b95b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,6 @@ jobs: with: node_version: "20" buf_version: "latest" - go_version: "1.23" console: uses: ./.github/workflows/console.yml @@ -43,7 +42,6 @@ jobs: needs: [core, console, version] uses: ./.github/workflows/compile.yml with: - go_version: "1.23" core_cache_key: ${{ needs.core.outputs.cache_key }} console_cache_key: ${{ needs.console.outputs.cache_key }} core_cache_path: ${{ needs.core.outputs.cache_path }} @@ -54,7 +52,6 @@ jobs: needs: core uses: ./.github/workflows/core-unit-test.yml with: - go_version: "1.23" core_cache_key: ${{ needs.core.outputs.cache_key }} core_cache_path: ${{ needs.core.outputs.cache_path }} secrets: @@ -64,7 +61,6 @@ jobs: needs: core uses: ./.github/workflows/core-integration-test.yml with: - go_version: "1.23" core_cache_key: ${{ needs.core.outputs.cache_key }} core_cache_path: ${{ needs.core.outputs.cache_path }} secrets: @@ -74,7 +70,6 @@ jobs: needs: [core, console] uses: ./.github/workflows/lint.yml with: - go_version: "1.23" node_version: "18" buf_version: "latest" go_lint_version: "v1.62.2" diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 979f8b4bc1..519586b9ee 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -3,9 +3,6 @@ name: Compile on: workflow_call: inputs: - go_version: - required: true - type: string core_cache_key: required: true type: string @@ -53,7 +50,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: ${{ inputs.go_version }} + go-version-file: 'go.mod' - name: compile timeout-minutes: 5 diff --git a/.github/workflows/core-integration-test.yml b/.github/workflows/core-integration-test.yml index cc9d898f5c..d889d7a5ff 100644 --- a/.github/workflows/core-integration-test.yml +++ b/.github/workflows/core-integration-test.yml @@ -3,9 +3,6 @@ name: Integration test core on: workflow_call: inputs: - go_version: - required: true - type: string core_cache_key: required: true type: string @@ -46,7 +43,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: ${{ inputs.go_version }} + go-version-file: 'go.mod' - uses: actions/cache/restore@v4 timeout-minutes: 1 diff --git a/.github/workflows/core-unit-test.yml b/.github/workflows/core-unit-test.yml index 0b1467ff5d..9fb5f572c7 100644 --- a/.github/workflows/core-unit-test.yml +++ b/.github/workflows/core-unit-test.yml @@ -3,9 +3,6 @@ name: Unit test core on: workflow_call: inputs: - go_version: - required: true - type: string core_cache_key: required: true type: string @@ -29,7 +26,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: ${{ inputs.go_version }} + go-version-file: 'go.mod' - uses: actions/cache/restore@v4 timeout-minutes: 1 diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 79aa6ddd1d..84843b1fa3 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -3,9 +3,6 @@ name: Build core on: workflow_call: inputs: - go_version: - required: true - type: string buf_version: required: true type: string @@ -70,7 +67,7 @@ jobs: if: ${{ steps.cache.outputs.cache-hit != 'true' }} uses: actions/setup-go@v5 with: - go-version: ${{ inputs.go_version }} + go-version-file: 'go.mod' - if: ${{ steps.cache.outputs.cache-hit != 'true' }} run: make core_build diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0aa3b81737..e704bdb146 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,9 +6,6 @@ on: node_version: required: true type: string - go_version: - required: true - type: string buf_version: required: true type: string @@ -85,7 +82,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: ${{ inputs.go_version }} + go-version-file: 'go.mod' - uses: actions/cache/restore@v4 timeout-minutes: 1 diff --git a/internal/cache/connector/pg/pg.go b/internal/cache/connector/pg/pg.go index 18215b68ed..8469a6ef6e 100644 --- a/internal/cache/connector/pg/pg.go +++ b/internal/cache/connector/pg/pg.go @@ -5,12 +5,12 @@ import ( _ "embed" "errors" "log/slog" + "slices" "strings" "text/template" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgconn" - "golang.org/x/exp/slices" "github.com/zitadel/zitadel/internal/cache" "github.com/zitadel/zitadel/internal/telemetry/tracing" diff --git a/internal/command/user_schema_model.go b/internal/command/user_schema_model.go index 08352e6d57..f58a689d3a 100644 --- a/internal/command/user_schema_model.go +++ b/internal/command/user_schema_model.go @@ -4,8 +4,7 @@ import ( "bytes" "context" "encoding/json" - - "golang.org/x/exp/slices" + "slices" "github.com/zitadel/zitadel/internal/domain" "github.com/zitadel/zitadel/internal/eventstore" @@ -80,6 +79,7 @@ func (wm *UserSchemaWriteModel) Query() *eventstore.SearchQueryBuilder { return query.Builder() } + func (wm *UserSchemaWriteModel) NewUpdatedEvent( ctx context.Context, agg *eventstore.Aggregate,