From 2921cceadd0117063ed6ee4cd5c23d940e5e7412 Mon Sep 17 00:00:00 2001 From: Roo Thorp Date: Tue, 1 Oct 2024 17:15:11 +0100 Subject: [PATCH] CLOUDP-269300: Bump to Go 1.23 (#1841) * Bump Go & golangci * Replace deprecated linter * Remedy linter errors * Update licenses * Move to go 1.23 * Try fix the licenses issue * Bump all images to 1.23 also * Apply suggestions from code review Use %w for error wrapping Co-authored-by: Sergiusz Urbaniak Signed-off-by: jose.vazquez * Apply suggestions from code review Revert to use `%s` again, because `stat.Error` is a `string` and thus cannot be wrapped as an error. --------- Signed-off-by: jose.vazquez Co-authored-by: jose.vazquez Co-authored-by: Sergiusz Urbaniak --- .../actions/gen-install-scripts/Dockerfile | 2 +- .golangci.yml | 2 +- .licenses-gomod.sha256 | 2 +- Dockerfile.post-install | 2 +- Makefile | 12 +- devbox.json | 5 +- devbox.lock | 184 +++++++----------- fast.Dockerfile | 2 +- go.mod | 4 +- licenses.csv | 2 +- pkg/controller/atlasproject/custom_roles.go | 6 +- test/app/Dockerfile | 2 +- test/app/go.mod | 4 +- test/helper/cel/cel.go | 1 - test/helper/cel/pattern.go | 1 - tools/clean/go.mod | 4 +- tools/makejwt/go.mod | 4 +- tools/metrics/go.mod | 4 +- 18 files changed, 92 insertions(+), 151 deletions(-) diff --git a/.github/actions/gen-install-scripts/Dockerfile b/.github/actions/gen-install-scripts/Dockerfile index 7dd9a52dbe..62a8cb748b 100644 --- a/.github/actions/gen-install-scripts/Dockerfile +++ b/.github/actions/gen-install-scripts/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22 +FROM golang:1.23 ENV KUBECTL_VERSION 1.18.12 ENV GO111MODULE on diff --git a/.golangci.yml b/.golangci.yml index ad420a807f..fec8b28ce0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -7,7 +7,7 @@ linters: - dupl - errcheck - errorlint - - exportloopref + - copyloopvar #- gocritic - gocyclo - goimports diff --git a/.licenses-gomod.sha256 b/.licenses-gomod.sha256 index 7855834ab6..082c275813 100644 --- a/.licenses-gomod.sha256 +++ b/.licenses-gomod.sha256 @@ -1 +1 @@ -100644 c4cf9120e81ef4e31f288eef5adccbba2862f023 go.mod +100644 6a6da89744c37c3cd16ce3e453f217e5927c2860 go.mod diff --git a/Dockerfile.post-install b/Dockerfile.post-install index d5ff391a27..983defd9f6 100644 --- a/Dockerfile.post-install +++ b/Dockerfile.post-install @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.22 as builder +FROM golang:1.23 as builder ENV CGO_ENABLED=0 ENV GOOS=linux diff --git a/Makefile b/Makefile index 9e52e3d405..a72132c484 100644 --- a/Makefile +++ b/Makefile @@ -84,6 +84,7 @@ ATLAS_KEY_SECRET_NAME = mongodb-atlas-operator-api-key BASE_GO_PACKAGE = github.com/mongodb/mongodb-atlas-kubernetes/v2 GO_LICENSES = go-licenses +GO_LICENSES_VERSION = 1.6.0 KUSTOMIZE = kustomize DISALLOWED_LICENSES = restricted,reciprocal @@ -126,9 +127,9 @@ all: manager ## Build all binaries build-licenses.csv: go.mod ## Track licenses in a CSV file @echo "Tracking licenses into file $@" @echo "========================================" - GOOS=linux GOARCH=amd64 go mod download - # https://github.com/google/go-licenses/issues/244 - GOTOOLCHAIN=local GOOS=linux GOARCH=amd64 $(GO_LICENSES) csv --include_tests $(BASE_GO_PACKAGE)/... > licenses.csv + export GOOS=linux + export GOARCH=amd64 + go run github.com/google/$(GO_LICENSES)@v$(GO_LICENSES_VERSION) csv --include_tests $(BASE_GO_PACKAGE)/... > licenses.csv echo $(GOMOD_SHA) > $(LICENSES_GOMOD_SHA_FILE) .PHONY: recompute-licenses @@ -145,8 +146,9 @@ licenses-up-to-date: ## Check if the licenses.csv is up to date check-licenses: licenses-up-to-date ## Check licenses are compliant with our restrictions @echo "Checking licenses not to be: $(DISALLOWED_LICENSES)" @echo "============================================" - # https://github.com/google/go-licenses/issues/244 - GOTOOLCHAIN=local GOOS=linux GOARCH=amd64 $(GO_LICENSES) check --include_tests \ + export GOOS=linux + export GOARCH=amd64 + go run github.com/google/$(GO_LICENSES)@v$(GO_LICENSES_VERSION) check --include_tests \ --disallowed_types $(DISALLOWED_LICENSES) $(BASE_GO_PACKAGE)/... @echo "--------------------" @echo "Licenses check: PASS" diff --git a/devbox.json b/devbox.json index 9e0e1b1370..ba78809292 100644 --- a/devbox.json +++ b/devbox.json @@ -3,7 +3,7 @@ "yq-go@latest", "kubebuilder@4.1.1", "jq@latest", - "go@1.22.5", + "go@1.23", "gotests@latest", "act@latest", "kubectl@latest", @@ -16,11 +16,10 @@ "kubernetes-helm@latest", "govulncheck@latest", "gotools@latest", - "go-licenses@latest", "ginkgo@latest", "operator-sdk@1.36.1", "shellcheck@latest", - "golangci-lint@1.59.1", + "golangci-lint@1.60", "kubernetes-controller-tools@0.16.1" ] } diff --git a/devbox.lock b/devbox.lock index 00ffbec2df..4ac7fa88a8 100644 --- a/devbox.lock +++ b/devbox.lock @@ -2,50 +2,50 @@ "lockfile_version": "1", "packages": { "act@latest": { - "last_modified": "2024-09-10T15:01:03Z", - "resolved": "github:NixOS/nixpkgs/5ed627539ac84809c78b2dd6d26a5cebeb5ae269#act", + "last_modified": "2024-09-29T05:15:19Z", + "resolved": "github:NixOS/nixpkgs/2dcd9c55e8914017226f5948ac22c53872a13ee2#act", "source": "devbox-search", - "version": "0.2.66", + "version": "0.2.67", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/wpbqsvhz0p0fxzybqqmhv3j92fyds1xk-act-0.2.66", + "path": "/nix/store/95ng1vsmq36600yl5jnhydwwp7qlw4qs-act-0.2.67", "default": true } ], - "store_path": "/nix/store/wpbqsvhz0p0fxzybqqmhv3j92fyds1xk-act-0.2.66" + "store_path": "/nix/store/95ng1vsmq36600yl5jnhydwwp7qlw4qs-act-0.2.67" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/5bv5239h13a2bff3kbq8qd8nyxlnlxsh-act-0.2.66", + "path": "/nix/store/han8drmgpwc6pdz0jyaxf4zs18fsvp40-act-0.2.67", "default": true } ], - "store_path": "/nix/store/5bv5239h13a2bff3kbq8qd8nyxlnlxsh-act-0.2.66" + "store_path": "/nix/store/han8drmgpwc6pdz0jyaxf4zs18fsvp40-act-0.2.67" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/hx3976ks2y5v5p6c5853bg8scy2s9xv0-act-0.2.66", + "path": "/nix/store/daqqazwkrf3b4rivcg4wahpij1k0359h-act-0.2.67", "default": true } ], - "store_path": "/nix/store/hx3976ks2y5v5p6c5853bg8scy2s9xv0-act-0.2.66" + "store_path": "/nix/store/daqqazwkrf3b4rivcg4wahpij1k0359h-act-0.2.67" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/6sis0w1w41mic6lgpalb08pn6hgkr67j-act-0.2.66", + "path": "/nix/store/8kh39sl27yzgd7pd8smfw5vjkshpxml7-act-0.2.67", "default": true } ], - "store_path": "/nix/store/6sis0w1w41mic6lgpalb08pn6hgkr67j-act-0.2.66" + "store_path": "/nix/store/8kh39sl27yzgd7pd8smfw5vjkshpxml7-act-0.2.67" } } }, @@ -98,50 +98,50 @@ } }, "docker@latest": { - "last_modified": "2024-09-13T05:52:00Z", - "resolved": "github:NixOS/nixpkgs/673d99f1406cb09b8eb6feab4743ebdf70046557#docker", + "last_modified": "2024-09-27T09:34:34Z", + "resolved": "github:NixOS/nixpkgs/e0f477a570df7375172a08ddb9199c90853c63f0#docker", "source": "devbox-search", - "version": "27.2.0", + "version": "27.3.0", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/djpji4gal3p4xb6zzfcmxvzyi763rs81-docker-27.2.0", + "path": "/nix/store/962n5f437smyb6p3nw0z8nskyylxnm01-docker-27.3.0", "default": true } ], - "store_path": "/nix/store/djpji4gal3p4xb6zzfcmxvzyi763rs81-docker-27.2.0" + "store_path": "/nix/store/962n5f437smyb6p3nw0z8nskyylxnm01-docker-27.3.0" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/wwyz92pbgl6039rla0bb8s31ylg34asa-docker-27.2.0", + "path": "/nix/store/9v8impsbg1vsxnmwna786vi6rzgam9g5-docker-27.3.0", "default": true } ], - "store_path": "/nix/store/wwyz92pbgl6039rla0bb8s31ylg34asa-docker-27.2.0" + "store_path": "/nix/store/9v8impsbg1vsxnmwna786vi6rzgam9g5-docker-27.3.0" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/8yd9szyhz306m48i7rg3p3i6cl38wlsq-docker-27.2.0", + "path": "/nix/store/z5kr0jj4h5zlvybdcckslhv13q1ys407-docker-27.3.0", "default": true } ], - "store_path": "/nix/store/8yd9szyhz306m48i7rg3p3i6cl38wlsq-docker-27.2.0" + "store_path": "/nix/store/z5kr0jj4h5zlvybdcckslhv13q1ys407-docker-27.3.0" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/szw73hrv059aqj6prdvqq5h7gdliasd2-docker-27.2.0", + "path": "/nix/store/28sn43pf5245rr0iham0222qgwrrp66z-docker-27.3.0", "default": true } ], - "store_path": "/nix/store/szw73hrv059aqj6prdvqq5h7gdliasd2-docker-27.2.0" + "store_path": "/nix/store/28sn43pf5245rr0iham0222qgwrrp66z-docker-27.3.0" } } }, @@ -365,147 +365,99 @@ } } }, - "go-licenses@latest": { + "go@1.23": { "last_modified": "2024-09-10T15:01:03Z", - "resolved": "github:NixOS/nixpkgs/5ed627539ac84809c78b2dd6d26a5cebeb5ae269#go-licenses", - "source": "devbox-search", - "version": "1.6.0", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/xrqf812ghh9mag43vpjq5n95hs6cjazh-go-licenses-1.6.0", - "default": true - } - ], - "store_path": "/nix/store/xrqf812ghh9mag43vpjq5n95hs6cjazh-go-licenses-1.6.0" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/awh5r3dix6iw3qh175zpk37sv36frrsg-go-licenses-1.6.0", - "default": true - } - ], - "store_path": "/nix/store/awh5r3dix6iw3qh175zpk37sv36frrsg-go-licenses-1.6.0" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/91pyjlqq8rkp89cvfnkb2rk051jcrzpw-go-licenses-1.6.0", - "default": true - } - ], - "store_path": "/nix/store/91pyjlqq8rkp89cvfnkb2rk051jcrzpw-go-licenses-1.6.0" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/r4kp26590jzkacciq06sz4rd6r0nzb2f-go-licenses-1.6.0", - "default": true - } - ], - "store_path": "/nix/store/r4kp26590jzkacciq06sz4rd6r0nzb2f-go-licenses-1.6.0" - } - } - }, - "go@1.22.5": { - "last_modified": "2024-08-18T12:44:29Z", - "resolved": "github:NixOS/nixpkgs/ff1c2669bbb4d0dd9e62cc94f0968cfa652ceec1#go", + "resolved": "github:NixOS/nixpkgs/5ed627539ac84809c78b2dd6d26a5cebeb5ae269#go_1_23", "source": "devbox-search", - "version": "1.22.5", + "version": "1.23.1", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/p2i1kd6n12qj3s8kx65l3199mmjcffwz-go-1.22.5", + "path": "/nix/store/nvaay1c4banbccyvv6ba1gzyqpypjmfq-go-1.23.1", "default": true } ], - "store_path": "/nix/store/p2i1kd6n12qj3s8kx65l3199mmjcffwz-go-1.22.5" + "store_path": "/nix/store/nvaay1c4banbccyvv6ba1gzyqpypjmfq-go-1.23.1" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/xvwr7mp9yqafl8pclayhrhdcxkszaf6d-go-1.22.5", + "path": "/nix/store/9ylsay11jb3p6yarkmlz0fin76cdypwa-go-1.23.1", "default": true } ], - "store_path": "/nix/store/xvwr7mp9yqafl8pclayhrhdcxkszaf6d-go-1.22.5" + "store_path": "/nix/store/9ylsay11jb3p6yarkmlz0fin76cdypwa-go-1.23.1" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/vkrmfnargqkzg5amlfl4yh8vgxja7pli-go-1.22.5", + "path": "/nix/store/zkg5xhyx2rs03dq0qp14nqlx9ff1y5c5-go-1.23.1", "default": true } ], - "store_path": "/nix/store/vkrmfnargqkzg5amlfl4yh8vgxja7pli-go-1.22.5" + "store_path": "/nix/store/zkg5xhyx2rs03dq0qp14nqlx9ff1y5c5-go-1.23.1" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/4ay992wzksf59aapkkh5lflv4rkbmdjy-go-1.22.5", + "path": "/nix/store/mi0ybwsm6pmxzv9hsm6bcbqaq1pkf8wh-go-1.23.1", "default": true } ], - "store_path": "/nix/store/4ay992wzksf59aapkkh5lflv4rkbmdjy-go-1.22.5" + "store_path": "/nix/store/mi0ybwsm6pmxzv9hsm6bcbqaq1pkf8wh-go-1.23.1" } } }, - "golangci-lint@1.59.1": { - "last_modified": "2024-07-31T08:48:38Z", - "resolved": "github:NixOS/nixpkgs/c3392ad349a5227f4a3464dce87bcc5046692fce#golangci-lint", + "golangci-lint@1.60": { + "last_modified": "2024-09-07T06:00:21Z", + "resolved": "github:NixOS/nixpkgs/29cca090417df03e6d1928d99f77e8e81c74c3fa#golangci-lint", "source": "devbox-search", - "version": "1.59.1", + "version": "1.60.3", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/k3rnfx753gnx5v8l3i4sx1g1al2ds0di-golangci-lint-1.59.1", + "path": "/nix/store/byyqd75qaws3bp84lfnipwdz65y2sms8-golangci-lint-1.60.3", "default": true } ], - "store_path": "/nix/store/k3rnfx753gnx5v8l3i4sx1g1al2ds0di-golangci-lint-1.59.1" + "store_path": "/nix/store/byyqd75qaws3bp84lfnipwdz65y2sms8-golangci-lint-1.60.3" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/29908ar68rrr9jzdhzcrlkbfk30gnihf-golangci-lint-1.59.1", + "path": "/nix/store/q76c0iw8rpf1n8v2kwl7shiiymvm2lkn-golangci-lint-1.60.3", "default": true } ], - "store_path": "/nix/store/29908ar68rrr9jzdhzcrlkbfk30gnihf-golangci-lint-1.59.1" + "store_path": "/nix/store/q76c0iw8rpf1n8v2kwl7shiiymvm2lkn-golangci-lint-1.60.3" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/v7882fqgdy46a7l432q11f3xmbln80rc-golangci-lint-1.59.1", + "path": "/nix/store/4ihxpxi0q56329cnvikv15vcj4lsz17m-golangci-lint-1.60.3", "default": true } ], - "store_path": "/nix/store/v7882fqgdy46a7l432q11f3xmbln80rc-golangci-lint-1.59.1" + "store_path": "/nix/store/4ihxpxi0q56329cnvikv15vcj4lsz17m-golangci-lint-1.60.3" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/1m1i9zhrgdw2192803n6wf2k7g86y6d5-golangci-lint-1.59.1", + "path": "/nix/store/ilaacmahr3mfjh2hsfvcsyh7f2gsz0zj-golangci-lint-1.60.3", "default": true } ], - "store_path": "/nix/store/1m1i9zhrgdw2192803n6wf2k7g86y6d5-golangci-lint-1.59.1" + "store_path": "/nix/store/ilaacmahr3mfjh2hsfvcsyh7f2gsz0zj-golangci-lint-1.60.3" } } }, @@ -654,8 +606,8 @@ } }, "jq@latest": { - "last_modified": "2024-09-16T10:17:16Z", - "resolved": "github:NixOS/nixpkgs/20f9370d5f588fb8c72e844c54511cab054b5f40#jq", + "last_modified": "2024-09-29T05:15:19Z", + "resolved": "github:NixOS/nixpkgs/2dcd9c55e8914017226f5948ac22c53872a13ee2#jq", "source": "devbox-search", "version": "1.7.1", "systems": { @@ -764,6 +716,10 @@ "path": "/nix/store/0jpj9xq83imjwhldsrmiyn8pp8wjazp5-jq-1.7.1-man", "default": true }, + { + "name": "dev", + "path": "/nix/store/04ca5xwvasz6s3jg0k7njz6rzi0d225w-jq-1.7.1-dev" + }, { "name": "doc", "path": "/nix/store/yfc9bsy7n9k66238s3cy7vw3cw1l1ap8-jq-1.7.1-doc" @@ -775,10 +731,6 @@ { "name": "out", "path": "/nix/store/7sy12xv4fwii421d920jxqx63c0ai3w3-jq-1.7.1" - }, - { - "name": "dev", - "path": "/nix/store/04ca5xwvasz6s3jg0k7njz6rzi0d225w-jq-1.7.1-dev" } ], "store_path": "/nix/store/x8jzsy0y1zk30mcvav2rh6lrw1gbzzy3-jq-1.7.1-bin" @@ -966,50 +918,50 @@ } }, "kubernetes-helm@latest": { - "last_modified": "2024-09-10T15:01:03Z", - "resolved": "github:NixOS/nixpkgs/5ed627539ac84809c78b2dd6d26a5cebeb5ae269#kubernetes-helm", + "last_modified": "2024-09-17T14:38:52Z", + "resolved": "github:NixOS/nixpkgs/658e7223191d2598641d50ee4e898126768fe847#kubernetes-helm", "source": "devbox-search", - "version": "3.15.4", + "version": "3.16.1", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/yxbbxgpql76sabh4ac8gwivy1xiik6ds-kubernetes-helm-3.15.4", + "path": "/nix/store/g9b797qqdsp7ymdx7dhwy5nfkhf90r4m-kubernetes-helm-3.16.1", "default": true } ], - "store_path": "/nix/store/yxbbxgpql76sabh4ac8gwivy1xiik6ds-kubernetes-helm-3.15.4" + "store_path": "/nix/store/g9b797qqdsp7ymdx7dhwy5nfkhf90r4m-kubernetes-helm-3.16.1" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/vdw78nb3gvfvf1zjk18zi4niqqgg60pm-kubernetes-helm-3.15.4", + "path": "/nix/store/s1smmyjs9988adbszdg2nd58qradswbc-kubernetes-helm-3.16.1", "default": true } ], - "store_path": "/nix/store/vdw78nb3gvfvf1zjk18zi4niqqgg60pm-kubernetes-helm-3.15.4" + "store_path": "/nix/store/s1smmyjs9988adbszdg2nd58qradswbc-kubernetes-helm-3.16.1" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/his95njlm5f7pivvyhmjx55lxsrg7b7v-kubernetes-helm-3.15.4", + "path": "/nix/store/3wfzg682rdi2md92jlql5i4h2pzxbq7a-kubernetes-helm-3.16.1", "default": true } ], - "store_path": "/nix/store/his95njlm5f7pivvyhmjx55lxsrg7b7v-kubernetes-helm-3.15.4" + "store_path": "/nix/store/3wfzg682rdi2md92jlql5i4h2pzxbq7a-kubernetes-helm-3.16.1" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/x4mb959fwbfpjn1mlq4hhh6cz6h4gvr3-kubernetes-helm-3.15.4", + "path": "/nix/store/gl7z7bx0csk5flgidxjhjswf13y7vd7w-kubernetes-helm-3.16.1", "default": true } ], - "store_path": "/nix/store/x4mb959fwbfpjn1mlq4hhh6cz6h4gvr3-kubernetes-helm-3.15.4" + "store_path": "/nix/store/gl7z7bx0csk5flgidxjhjswf13y7vd7w-kubernetes-helm-3.16.1" } } }, @@ -1182,8 +1134,8 @@ } }, "wget@latest": { - "last_modified": "2024-09-10T15:01:03Z", - "resolved": "github:NixOS/nixpkgs/5ed627539ac84809c78b2dd6d26a5cebeb5ae269#wget", + "last_modified": "2024-09-24T01:22:05Z", + "resolved": "github:NixOS/nixpkgs/189e5f171b163feb7791a9118afa778d9a1db81f#wget", "source": "devbox-search", "version": "1.24.5", "systems": { @@ -1191,11 +1143,11 @@ "outputs": [ { "name": "out", - "path": "/nix/store/jp912nkxxzk3crf4ji7qzizzx658pwh9-wget-1.24.5", + "path": "/nix/store/psa874fw1wd425xqqk7q95hgnb6vdhxg-wget-1.24.5", "default": true } ], - "store_path": "/nix/store/jp912nkxxzk3crf4ji7qzizzx658pwh9-wget-1.24.5" + "store_path": "/nix/store/psa874fw1wd425xqqk7q95hgnb6vdhxg-wget-1.24.5" }, "aarch64-linux": { "outputs": [ @@ -1211,11 +1163,11 @@ "outputs": [ { "name": "out", - "path": "/nix/store/m9g22b1zkyiqj2zrg0pcx8m76jhlpbbh-wget-1.24.5", + "path": "/nix/store/iz3hq7bsl1fhrfv5jasyplw17hyyp7hf-wget-1.24.5", "default": true } ], - "store_path": "/nix/store/m9g22b1zkyiqj2zrg0pcx8m76jhlpbbh-wget-1.24.5" + "store_path": "/nix/store/iz3hq7bsl1fhrfv5jasyplw17hyyp7hf-wget-1.24.5" }, "x86_64-linux": { "outputs": [ diff --git a/fast.Dockerfile b/fast.Dockerfile index 4c4cac4895..b27a791c9e 100644 --- a/fast.Dockerfile +++ b/fast.Dockerfile @@ -1,5 +1,5 @@ # TODO: Eventually replace main Dockerfile -FROM golang:1.22 as certs-source +FROM golang:1.23 as certs-source ARG GOTOOLCHAIN=auto # Using rolling tag to stay on latest UBI 9 diff --git a/go.mod b/go.mod index c4cf9120e8..6a6da89744 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/mongodb/mongodb-atlas-kubernetes/v2 -go 1.22.0 - -toolchain go1.22.7 +go 1.23.1 require ( cloud.google.com/go/kms v1.20.0 diff --git a/licenses.csv b/licenses.csv index d2a8d134b5..aa7fc1552f 100644 --- a/licenses.csv +++ b/licenses.csv @@ -113,7 +113,7 @@ golang.org/x/exp,https://cs.opensource.google/go/x/exp/+/8a7402ab:LICENSE,BSD-3- golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.29.0:LICENSE,BSD-3-Clause golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/v0.23.0:LICENSE,BSD-3-Clause golang.org/x/sync,https://cs.opensource.google/go/x/sync/+/v0.8.0:LICENSE,BSD-3-Clause -golang.org/x/sys,https://cs.opensource.google/go/x/sys/+/v0.25.0:LICENSE,BSD-3-Clause +golang.org/x/sys/unix,https://cs.opensource.google/go/x/sys/+/v0.25.0:LICENSE,BSD-3-Clause golang.org/x/term,https://cs.opensource.google/go/x/term/+/v0.24.0:LICENSE,BSD-3-Clause golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.18.0:LICENSE,BSD-3-Clause golang.org/x/time/rate,https://cs.opensource.google/go/x/time/+/v0.6.0:LICENSE,BSD-3-Clause diff --git a/pkg/controller/atlasproject/custom_roles.go b/pkg/controller/atlasproject/custom_roles.go index 412d0cbde4..2a272dae46 100644 --- a/pkg/controller/atlasproject/custom_roles.go +++ b/pkg/controller/atlasproject/custom_roles.go @@ -200,7 +200,7 @@ func syncCustomRolesStatus(ctx *workflow.Context, desiredCustomRoles []customrol if ok { if stat.Status == status.CustomRoleStatusFailed { statuses = append(statuses, stat) - err = errors.Join(err, fmt.Errorf(stat.Error)) + err = errors.Join(err, fmt.Errorf("%s", stat.Error)) } continue @@ -210,7 +210,7 @@ func syncCustomRolesStatus(ctx *workflow.Context, desiredCustomRoles []customrol statuses = append(statuses, stat) if stat.Status == status.CustomRoleStatusFailed { - err = errors.Join(err, fmt.Errorf(stat.Error)) + err = errors.Join(err, fmt.Errorf("%s", stat.Error)) } continue @@ -220,7 +220,7 @@ func syncCustomRolesStatus(ctx *workflow.Context, desiredCustomRoles []customrol statuses = append(statuses, stat) if stat.Status == status.CustomRoleStatusFailed { - err = errors.Join(err, fmt.Errorf(stat.Error)) + err = errors.Join(err, fmt.Errorf("%s", stat.Error)) } continue diff --git a/test/app/Dockerfile b/test/app/Dockerfile index 8feaffb31b..414ae33bf1 100644 --- a/test/app/Dockerfile +++ b/test/app/Dockerfile @@ -1,7 +1,7 @@ # Please push to quay.io/mongodb/mongodb-atlas-kubernetes-operator-test-app:v1 # Build the manager binary -FROM golang:1.22 as builder +FROM golang:1.23 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/test/app/go.mod b/test/app/go.mod index e7389625a6..c00accdc40 100644 --- a/test/app/go.mod +++ b/test/app/go.mod @@ -1,8 +1,6 @@ module github.com/mongodb/mongodb-atlas-kubernetes/test/app -go 1.22.1 - -toolchain go1.22.5 +go 1.23.1 require ( github.com/gorilla/mux v1.8.0 diff --git a/test/helper/cel/cel.go b/test/helper/cel/cel.go index 7cbc033743..5ab3af7ce8 100644 --- a/test/helper/cel/cel.go +++ b/test/helper/cel/cel.go @@ -114,7 +114,6 @@ func findCEL(t *testing.T, s *schema.Structural, root bool, pth *field.Path) (ma } for k, v := range s.Properties { - v := v sub, err := findCEL(t, &v, false, pth.Child("properties").Child(k)) if err != nil { return nil, err diff --git a/test/helper/cel/pattern.go b/test/helper/cel/pattern.go index 94db2cd648..394eb1312a 100644 --- a/test/helper/cel/pattern.go +++ b/test/helper/cel/pattern.go @@ -90,7 +90,6 @@ func findPattern(t *testing.T, s *schema.Structural, pth *field.Path) (map[strin } for k, v := range s.Properties { - v := v sub, err := findPattern(t, &v, pth.Child("properties").Child(k)) if err != nil { return nil, err diff --git a/tools/clean/go.mod b/tools/clean/go.mod index 341ba7129b..bf19abe638 100644 --- a/tools/clean/go.mod +++ b/tools/clean/go.mod @@ -1,8 +1,6 @@ module tools/clean -go 1.22.1 - -toolchain go1.22.5 +go 1.23.1 require ( cloud.google.com/go/compute v1.28.1 diff --git a/tools/makejwt/go.mod b/tools/makejwt/go.mod index 23fa745a88..d5cbaff10e 100644 --- a/tools/makejwt/go.mod +++ b/tools/makejwt/go.mod @@ -1,7 +1,5 @@ module tools/makejwt -go 1.22.1 - -toolchain go1.22.5 +go 1.23.1 require github.com/golang-jwt/jwt v3.2.2+incompatible diff --git a/tools/metrics/go.mod b/tools/metrics/go.mod index 21ec403b17..5e0e4b3eae 100644 --- a/tools/metrics/go.mod +++ b/tools/metrics/go.mod @@ -1,8 +1,6 @@ module tools/metrics -go 1.22.1 - -toolchain go1.22.5 +go 1.23.1 require ( github.com/google/go-github/v57 v57.0.0