From a1486142caea19bdc5b2585cfe368a9258ab2264 Mon Sep 17 00:00:00 2001 From: Preston Vasquez Date: Fri, 21 Mar 2025 09:52:03 -0600 Subject: [PATCH] GODRIVER-3514 Upgrade to Go 1.23 in CI --- .evergreen/config.yml | 50 +++++++++++----------- README.md | 2 +- docs/CONTRIBUTING.md | 4 +- examples/_logger/logrus/go.mod | 2 +- examples/_logger/zap/go.mod | 2 +- examples/_logger/zerolog/go.mod | 2 +- go.work | 2 +- internal/cmd/faas/awslambda/mongodb/go.mod | 2 +- 8 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 903e5b9267..df9f3fbdd0 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1745,7 +1745,7 @@ axes: - windows-vsCurrent-small variables: GCC_PATH: "/cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin" - GO_DIST: "C:\\golang\\go1.22" + GO_DIST: "C:\\golang\\go1.23" VENV_BIN_DIR: "Scripts" DEFAULT_TASK: evg-test # CSOT tests are unreliable on our slow Windows hosts. @@ -1754,14 +1754,14 @@ axes: display_name: "RHEL 8.7" run_on: rhel8.7-large variables: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" DEFAULT_TASK: evg-test - id: "macos" display_name: "MacOS 14.0" run_on: macos-14 batchtime: 1440 # Run at most once per 24 hours. variables: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" DEFAULT_TASK: evg-test-load-balancers # CSOT tests are unreliable on our slow macOS hosts. SKIP_CSOT_TESTS: true @@ -1776,7 +1776,7 @@ axes: - windows-vsCurrent-small variables: GCC_PATH: "/cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin" - GO_DIST: "C:\\golang\\go1.22" + GO_DIST: "C:\\golang\\go1.23" VENV_BIN_DIR: "Scripts" DEFAULT_TASK: evg-test # CSOT tests are unreliable on our slow Windows hosts. @@ -1785,14 +1785,14 @@ axes: display_name: "RHEL 8.7" run_on: rhel8.7-large variables: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" DEFAULT_TASK: evg-test - id: "macos" display_name: "MacOS 14.0" run_on: macos-14 batchtime: 1440 # Run at most once per 24 hours. variables: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" DEFAULT_TASK: evg-test-load-balancers # CSOT tests are unreliable on our slow macOS hosts. SKIP_CSOT_TESTS: true @@ -1804,7 +1804,7 @@ axes: display_name: "RHEL 8.7" run_on: rhel8.7-large variables: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" DEFAULT_TASK: evg-test - id: os-aws-auth @@ -1816,7 +1816,7 @@ axes: - windows-vsCurrent-small variables: GCC_PATH: "/cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin" - GO_DIST: "C:\\golang\\go1.22" + GO_DIST: "C:\\golang\\go1.23" SKIP_ECS_AUTH_TEST: true DEFAULT_TASK: evg-test # CSOT tests are unreliable on our slow Windows hosts. @@ -1825,14 +1825,14 @@ axes: display_name: "Ubuntu 20.04" run_on: ubuntu2004-test variables: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" DEFAULT_TASK: evg-test - id: "macos" display_name: "MacOS 14.0" run_on: macos-14 batchtime: 1440 # Run at most once per 24 hours. variables: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" SKIP_ECS_AUTH_TEST: true SKIP_EC2_AUTH_TEST: true SKIP_WEB_IDENTITY_AUTH_TEST: true @@ -1847,7 +1847,7 @@ axes: display_name: "RHEL 8.7" run_on: rhel8.7-large variables: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" - id: os-serverless display_name: OS @@ -1856,7 +1856,7 @@ axes: display_name: "RHEL 8.7" run_on: rhel8.7-small variables: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" task_groups: - name: serverless_task_group @@ -2095,7 +2095,7 @@ buildvariants: - rhel8.7-small expansions: # Keep this in sync with go version used in etc/golangci-lint.sh - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" tasks: - name: ".static-analysis" @@ -2105,7 +2105,7 @@ buildvariants: run_on: - rhel8.7-small expansions: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" tasks: - name: "pull-request-helpers" @@ -2114,7 +2114,7 @@ buildvariants: display_name: "Performance" run_on: rhel90-dbx-perf-large expansions: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" tasks: - name: ".performance" @@ -2124,7 +2124,7 @@ buildvariants: run_on: - rhel8.7-small expansions: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" tasks: - name: ".compile-check" @@ -2133,7 +2133,7 @@ buildvariants: run_on: - rhel8.7-small expansions: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" tasks: - name: "backport-pr" @@ -2143,7 +2143,7 @@ buildvariants: run_on: - rhel8.7-large expansions: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" tasks: - name: "atlas-test" @@ -2153,7 +2153,7 @@ buildvariants: run_on: - ubuntu2004-large expansions: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" tasks: - name: "test-atlas-data-lake" @@ -2163,7 +2163,7 @@ buildvariants: run_on: - ubuntu2204-large expansions: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" tasks: - name: "test-docker-runner" @@ -2173,7 +2173,7 @@ buildvariants: run_on: - ubuntu2204-large expansions: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" tasks: - name: ".goleak" @@ -2340,7 +2340,7 @@ buildvariants: run_on: - rhel8.7-small expansions: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" tasks: - name: testgcpkms_task_group batchtime: 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README @@ -2351,7 +2351,7 @@ buildvariants: run_on: - rhel8.7-small expansions: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" tasks: - testawskms-task - testawskms-fail-task @@ -2361,7 +2361,7 @@ buildvariants: run_on: - rhel8.7-small expansions: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" tasks: - name: testazurekms_task_group batchtime: 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README @@ -2372,7 +2372,7 @@ buildvariants: run_on: - ubuntu2204-small expansions: - GO_DIST: "/opt/golang/go1.22" + GO_DIST: "/opt/golang/go1.23" tasks: - name: testoidc_task_group - name: testazureoidc_task_group diff --git a/README.md b/README.md index f52d9a264c..e7d8976dec 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ See the following resources to learn more about upgrading from version 1.x to 2. ## Requirements - Go 1.18 or higher. We aim to support the latest versions of Go. -- Go 1.22 or higher is required to run the driver test suite. +- Go 1.23 or higher is required to run the driver test suite. - MongoDB 3.6 and higher. ## Installation diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 7514557427..0c39558c66 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -6,7 +6,7 @@ We are building this software together and strongly encourage contributions from ## Requirements -Go 1.22 or higher is required to run the driver test suite. We use [task](https://taskfile.dev/) as our task runner. +Go 1.23 or higher is required to run the driver test suite. We use [task](https://taskfile.dev/) as our task runner. ## Bug Fixes and New Features @@ -17,7 +17,7 @@ Before starting to write code, look for existing [tickets](https://jira.mongodb. The Go Driver team uses GitHub to manage and review all code changes. Patches should generally be made against the master (default) branch and include relevant tests, if applicable. -Code should compile and tests should pass under all Go versions which the driver currently supports. Currently the Go Driver supports a minimum version of Go 1.18 and requires Go 1.22 for development. Please run the following `Taskfile` targets to validate your changes: +Code should compile and tests should pass under all Go versions which the driver currently supports. Currently the Go Driver supports a minimum version of Go 1.18 and requires Go 1.23 for development. Please run the following `Taskfile` targets to validate your changes: - `task fmt` - `task lint` diff --git a/examples/_logger/logrus/go.mod b/examples/_logger/logrus/go.mod index f5930e057b..d2f507630a 100644 --- a/examples/_logger/logrus/go.mod +++ b/examples/_logger/logrus/go.mod @@ -1,6 +1,6 @@ module go.mongodb.go/mongo-driver/examples/logger/logrus -go 1.22 +go 1.23 replace go.mongodb.org/mongo-driver/v2 => ../../../ diff --git a/examples/_logger/zap/go.mod b/examples/_logger/zap/go.mod index 522274859d..97ea2a974c 100644 --- a/examples/_logger/zap/go.mod +++ b/examples/_logger/zap/go.mod @@ -1,6 +1,6 @@ module go.mongodb.go/mongo-driver/examples/logger/zap -go 1.22 +go 1.23 replace go.mongodb.org/mongo-driver/v2 => ../../../ diff --git a/examples/_logger/zerolog/go.mod b/examples/_logger/zerolog/go.mod index 7ed3d463de..dedc1d77cf 100644 --- a/examples/_logger/zerolog/go.mod +++ b/examples/_logger/zerolog/go.mod @@ -1,6 +1,6 @@ module go.mongodb.go/mongo-driver/examples/logger/zerolog -go 1.22 +go 1.23 replace go.mongodb.org/mongo-driver/v2 => ../../../ diff --git a/go.work b/go.work index e508be5714..23ad2ff8a7 100644 --- a/go.work +++ b/go.work @@ -1,4 +1,4 @@ -go 1.22 +go 1.23 use ( . diff --git a/internal/cmd/faas/awslambda/mongodb/go.mod b/internal/cmd/faas/awslambda/mongodb/go.mod index 0e6e69f939..b9c63a4ea8 100644 --- a/internal/cmd/faas/awslambda/mongodb/go.mod +++ b/internal/cmd/faas/awslambda/mongodb/go.mod @@ -1,6 +1,6 @@ module go.mongodb.go/mongo-driver/internal/test/mongodb -go 1.22 +go 1.23 replace go.mongodb.org/mongo-driver/v2 => ../../../../../