From a2e0b6f9021129e64856112a9603354884bb3579 Mon Sep 17 00:00:00 2001 From: Papapetrou Patroklos <1743100+ppapapetrou76@users.noreply.github.com> Date: Thu, 12 Feb 2026 12:15:13 +0200 Subject: [PATCH] chore: bumps golang version to 1.26 in all places (#26393) Signed-off-by: Patroklos Papapetrou Co-authored-by: Nitish Kumar --- .github/workflows/ci-build.yaml | 4 ++-- .github/workflows/image.yaml | 4 ++-- .github/workflows/release.yaml | 4 ++-- .github/workflows/renovate.yaml | 2 +- .golangci.yaml | 2 ++ Dockerfile | 4 ++-- Dockerfile.tilt | 2 +- applicationset/utils/utils.go | 3 +-- cmd/argocd/commands/admin/settings_rbac.go | 1 + gitops-engine/go.mod | 2 +- go.mod | 2 +- hack/get-previous-release/go.mod | 2 +- test/container/Dockerfile | 2 +- test/remote/Dockerfile | 2 +- 14 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml index 9f54c60b2c..faddbb748f 100644 --- a/.github/workflows/ci-build.yaml +++ b/.github/workflows/ci-build.yaml @@ -14,7 +14,7 @@ on: env: # Golang version to use across CI steps # renovate: datasource=golang-version packageName=golang - GOLANG_VERSION: '1.25.6' + GOLANG_VERSION: '1.26.0' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -111,7 +111,7 @@ jobs: uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0 with: # renovate: datasource=go packageName=github.com/golangci/golangci-lint/v2 versioning=regex:^v(?\d+)\.(?\d+)\.(?\d+)?$ - version: v2.8.0 + version: v2.9.0 args: --verbose test-go: diff --git a/.github/workflows/image.yaml b/.github/workflows/image.yaml index ba6c3ab21e..81bd73f4ba 100644 --- a/.github/workflows/image.yaml +++ b/.github/workflows/image.yaml @@ -86,7 +86,7 @@ jobs: with: # Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations) # renovate: datasource=golang-version packageName=golang - go-version: 1.25.6 + go-version: 1.26.0 platforms: ${{ needs.set-vars.outputs.platforms }} push: false @@ -103,7 +103,7 @@ jobs: ghcr_image_name: ${{ needs.set-vars.outputs.ghcr_image_name }} # Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations) # renovate: datasource=golang-version packageName=golang - go-version: 1.25.6 + go-version: 1.26.0 platforms: ${{ needs.set-vars.outputs.platforms }} push: true secrets: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ac0a2c1f7e..850251f413 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ permissions: {} env: # renovate: datasource=golang-version packageName=golang - GOLANG_VERSION: '1.25.6' # Note: go-version must also be set in job argocd-image.with.go-version + GOLANG_VERSION: '1.26.0' # Note: go-version must also be set in job argocd-image.with.go-version jobs: argocd-image: @@ -26,7 +26,7 @@ jobs: quay_image_name: ${{ needs.setup-variables.outputs.quay_image_name }} # Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations) # renovate: datasource=golang-version packageName=golang - go-version: 1.25.6 + go-version: 1.26.0 platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le push: true secrets: diff --git a/.github/workflows/renovate.yaml b/.github/workflows/renovate.yaml index d171d1f1e9..9dad0184c7 100644 --- a/.github/workflows/renovate.yaml +++ b/.github/workflows/renovate.yaml @@ -27,7 +27,7 @@ jobs: uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0 with: # renovate: datasource=golang-version packageName=golang - go-version: 1.25.6 + go-version: 1.26.0 - name: Self-hosted Renovate uses: renovatebot/github-action@e23f4d9675532445118c886434f5a34292b630b4 #46.0.2 diff --git a/.golangci.yaml b/.golangci.yaml index 5b19c6cf04..273b4ac84e 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -126,6 +126,8 @@ linters: disable: # Suggest replacing omitempty with omitzero for struct fields. - omitzero + # Simplify code by using go1.26's new(expr). - generates lots of false positives. + - newexpr nolintlint: require-specific: true diff --git a/Dockerfile b/Dockerfile index 67572db5cc..222c0eec48 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG BASE_IMAGE=docker.io/library/ubuntu:25.10@sha256:4a9232cc47bf99defcc8860ef62 # Initial stage which pulls prepares build dependencies and CLI tooling we need for our final image # Also used as the image in CI jobs so needs all dependencies #################################################################################################### -FROM docker.io/library/golang:1.25.6@sha256:06d1251c59a75761ce4ebc8b299030576233d7437c886a68b43464bad62d4bb1 AS builder +FROM docker.io/library/golang:1.26.0@sha256:c83e68f3ebb6943a2904fa66348867d108119890a2c6a2e6f07b38d0eb6c25c5 AS builder WORKDIR /tmp @@ -109,7 +109,7 @@ RUN HOST_ARCH=$TARGETARCH NODE_ENV='production' NODE_ONLINE_ENV='online' NODE_OP #################################################################################################### # Argo CD Build stage which performs the actual build of Argo CD binaries #################################################################################################### -FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.25.6@sha256:06d1251c59a75761ce4ebc8b299030576233d7437c886a68b43464bad62d4bb1 AS argocd-build +FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.26.0@sha256:c83e68f3ebb6943a2904fa66348867d108119890a2c6a2e6f07b38d0eb6c25c5 AS argocd-build WORKDIR /go/src/github.com/argoproj/argo-cd diff --git a/Dockerfile.tilt b/Dockerfile.tilt index b524f4b2fb..b733dfc127 100644 --- a/Dockerfile.tilt +++ b/Dockerfile.tilt @@ -1,4 +1,4 @@ -FROM docker.io/library/golang:1.25.6@sha256:06d1251c59a75761ce4ebc8b299030576233d7437c886a68b43464bad62d4bb1 +FROM docker.io/library/golang:1.26.0@sha256:c83e68f3ebb6943a2904fa66348867d108119890a2c6a2e6f07b38d0eb6c25c5 ENV DEBIAN_FRONTEND=noninteractive diff --git a/applicationset/utils/utils.go b/applicationset/utils/utils.go index a82b2a6709..8648267536 100644 --- a/applicationset/utils/utils.go +++ b/applicationset/utils/utils.go @@ -388,8 +388,7 @@ func invalidGenerators(applicationSetInfo *argoappsv1.ApplicationSet) (bool, map for index, generator := range applicationSetInfo.Spec.Generators { v := reflect.Indirect(reflect.ValueOf(generator)) found := false - for i := 0; i < v.NumField(); i++ { - field := v.Field(i) + for _, field := range v.Fields() { if !field.CanInterface() { continue } diff --git a/cmd/argocd/commands/admin/settings_rbac.go b/cmd/argocd/commands/admin/settings_rbac.go index e9469a61e6..86dc6f9171 100644 --- a/cmd/argocd/commands/admin/settings_rbac.go +++ b/cmd/argocd/commands/admin/settings_rbac.go @@ -322,6 +322,7 @@ func getPolicy(ctx context.Context, policyFile string, kubeClient kubernetes.Int } // getPolicyFromFile loads a RBAC policy from given path +// nolint:unparam // complains about the error being always nil which is false-positive func getPolicyFromFile(policyFile string) (string, string, string, error) { var ( userPolicy string diff --git a/gitops-engine/go.mod b/gitops-engine/go.mod index 248a956041..86e76eb350 100644 --- a/gitops-engine/go.mod +++ b/gitops-engine/go.mod @@ -1,6 +1,6 @@ module github.com/argoproj/gitops-engine -go 1.25.5 +go 1.26.0 require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc diff --git a/go.mod b/go.mod index 08c6401ce7..b7d4956be5 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/argoproj/argo-cd/v3 -go 1.25.5 +go 1.26.0 require ( code.gitea.io/sdk/gitea v0.23.2 diff --git a/hack/get-previous-release/go.mod b/hack/get-previous-release/go.mod index e211fe04c4..330c94630c 100644 --- a/hack/get-previous-release/go.mod +++ b/hack/get-previous-release/go.mod @@ -1,6 +1,6 @@ module github.com/argoproj/argo-cd/get-previous-release -go 1.25.5 +go 1.26.0 require ( github.com/stretchr/testify v1.9.0 diff --git a/test/container/Dockerfile b/test/container/Dockerfile index c5a841d781..7d53e4bd2e 100644 --- a/test/container/Dockerfile +++ b/test/container/Dockerfile @@ -8,7 +8,7 @@ RUN ln -s /usr/lib/$(uname -m)-linux-gnu /usr/lib/linux-gnu # Please make sure to also check the contained yarn version and update the references below when upgrading this image's version FROM docker.io/library/node:22.9.0@sha256:8398ea18b8b72817c84af283f72daed9629af2958c4f618fe6db4f453c5c9328 AS node -FROM docker.io/library/golang:1.25.1@sha256:d7098379b7da665ab25b99795465ec320b1ca9d4addb9f77409c4827dc904211 AS golang +FROM docker.io/library/golang:1.26.0@sha256:c83e68f3ebb6943a2904fa66348867d108119890a2c6a2e6f07b38d0eb6c25c5 AS golang FROM docker.io/library/registry:3.0@sha256:6c5666b861f3505b116bb9aa9b25175e71210414bd010d92035ff64018f9457e AS registry diff --git a/test/remote/Dockerfile b/test/remote/Dockerfile index 2aa3be61dc..5362695ab0 100644 --- a/test/remote/Dockerfile +++ b/test/remote/Dockerfile @@ -1,6 +1,6 @@ ARG BASE_IMAGE=docker.io/library/ubuntu:25.10@sha256:4a9232cc47bf99defcc8860ef6222c99773330367fcecbf21ba2edb0b810a31e -FROM docker.io/library/golang:1.25.5@sha256:8bbd14091f2c61916134fa6aeb8f76b18693fcb29a39ec6d8be9242c0a7e9260 AS go +FROM docker.io/library/golang:1.26.0@sha256:c83e68f3ebb6943a2904fa66348867d108119890a2c6a2e6f07b38d0eb6c25c5 AS go RUN go install github.com/mattn/goreman@latest && \ go install github.com/kisielk/godepgraph@latest