From ed3cfbe9d9431b2a989fde6e1be99f46cec47132 Mon Sep 17 00:00:00 2001 From: Matt Dale <9760375+matthewdale@users.noreply.github.com> Date: Tue, 7 Jul 2026 23:51:16 -0700 Subject: [PATCH 1/9] GODRIVER-3989 Add a drivers-evergreen-tools submodule with a pinned revision. --- .evergreen/drivers-evergreen-tools | 1 + .evergreen/setup-system.sh | 7 ++++--- .gitmodules | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) create mode 160000 .evergreen/drivers-evergreen-tools diff --git a/.evergreen/drivers-evergreen-tools b/.evergreen/drivers-evergreen-tools new file mode 160000 index 0000000000..835079f20f --- /dev/null +++ b/.evergreen/drivers-evergreen-tools @@ -0,0 +1 @@ +Subproject commit 835079f20f12bbe8cf3a178067ad4eb484e6f86f diff --git a/.evergreen/setup-system.sh b/.evergreen/setup-system.sh index 542060fee4..c6f9973b0f 100755 --- a/.evergreen/setup-system.sh +++ b/.evergreen/setup-system.sh @@ -8,7 +8,7 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) PROJECT_DIRECTORY=$(dirname $SCRIPT_DIR) pushd $PROJECT_DIRECTORY ROOT_DIR=$(dirname $PROJECT_DIRECTORY) -DRIVERS_TOOLS=${DRIVERS_TOOLS:-${ROOT_DIR}/drivers-evergreen-tools} +DRIVERS_TOOLS=${DRIVERS_TOOLS:-${PROJECT_DIRECTORY}/.evergreen/drivers-evergreen-tools} MONGO_ORCHESTRATION_HOME="${DRIVERS_TOOLS}/.evergreen/orchestration" MONGODB_BINARIES="${DRIVERS_TOOLS}/mongodb/bin" OS="${OS:-""}" @@ -45,9 +45,10 @@ else CURRENT_VERSION=latest fi -# Ensure a checkout of drivers-tools. +# Ensure the $DRIVERS_TOOLS directory exists. if [ ! -d "$DRIVERS_TOOLS" ]; then - git clone https://github.com/mongodb-labs/drivers-evergreen-tools $DRIVERS_TOOLS + echo "drivers-evergreen-tools not found at \"$DRIVERS_TOOLS\"" + exit 1 fi # Write the .env file for drivers-tools. diff --git a/.gitmodules b/.gitmodules index e3b5c7b3ee..8e8e764c08 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "specifications"] path = testdata/specifications url = https://github.com/mongodb/specifications +[submodule ".evergreen/drivers-evergreen-tools"] + path = .evergreen/drivers-evergreen-tools + url = https://github.com/mongodb-labs/drivers-evergreen-tools.git From 4a3502805a6d3b1fd5e89367fa55d1734fe4b623 Mon Sep 17 00:00:00 2001 From: Matt Dale <9760375+matthewdale@users.noreply.github.com> Date: Wed, 8 Jul 2026 17:14:52 -0700 Subject: [PATCH 2/9] Make a new clone of the DET repo at the submodule revision. --- .evergreen/setup-system.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.evergreen/setup-system.sh b/.evergreen/setup-system.sh index c6f9973b0f..d07a202017 100755 --- a/.evergreen/setup-system.sh +++ b/.evergreen/setup-system.sh @@ -8,7 +8,7 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) PROJECT_DIRECTORY=$(dirname $SCRIPT_DIR) pushd $PROJECT_DIRECTORY ROOT_DIR=$(dirname $PROJECT_DIRECTORY) -DRIVERS_TOOLS=${DRIVERS_TOOLS:-${PROJECT_DIRECTORY}/.evergreen/drivers-evergreen-tools} +DRIVERS_TOOLS=${DRIVERS_TOOLS:-${ROOT_DIR}/drivers-evergreen-tools} MONGO_ORCHESTRATION_HOME="${DRIVERS_TOOLS}/.evergreen/orchestration" MONGODB_BINARIES="${DRIVERS_TOOLS}/mongodb/bin" OS="${OS:-""}" @@ -45,10 +45,12 @@ else CURRENT_VERSION=latest fi -# Ensure the $DRIVERS_TOOLS directory exists. +# If $DRIVERS_TOOLS doesn't already exist, clone it using the pinned revision of +# the drivers-evergreen-tools submodule. We clone a copy here because modifying +# the submodule directory directly doesn't work on Windows for some reason. if [ ! -d "$DRIVERS_TOOLS" ]; then - echo "drivers-evergreen-tools not found at \"$DRIVERS_TOOLS\"" - exit 1 + detrev=$(git submodule status drivers-evergreen-tools | cut -w -f2) + git clone --revision=$detrev https://github.com/mongodb-labs/drivers-evergreen-tools $DRIVERS_TOOLS fi # Write the .env file for drivers-tools. From 402712071be73d88c2e25b126afc89f160fde0bc Mon Sep 17 00:00:00 2001 From: Matt Dale <9760375+matthewdale@users.noreply.github.com> Date: Wed, 8 Jul 2026 17:28:18 -0700 Subject: [PATCH 3/9] Fix submodule path and use awk. --- .evergreen/setup-system.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/setup-system.sh b/.evergreen/setup-system.sh index d07a202017..f3c5be212e 100755 --- a/.evergreen/setup-system.sh +++ b/.evergreen/setup-system.sh @@ -49,7 +49,7 @@ fi # the drivers-evergreen-tools submodule. We clone a copy here because modifying # the submodule directory directly doesn't work on Windows for some reason. if [ ! -d "$DRIVERS_TOOLS" ]; then - detrev=$(git submodule status drivers-evergreen-tools | cut -w -f2) + detrev=$(git submodule status .evergreen/drivers-evergreen-tools | awk '{print $1}') git clone --revision=$detrev https://github.com/mongodb-labs/drivers-evergreen-tools $DRIVERS_TOOLS fi From 93dc5641ca970cf234988d206cc4ce180e1946cd Mon Sep 17 00:00:00 2001 From: Matt Dale <9760375+matthewdale@users.noreply.github.com> Date: Wed, 8 Jul 2026 18:52:42 -0700 Subject: [PATCH 4/9] Use checkout instead of clone with --revision. --- .evergreen/setup-system.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.evergreen/setup-system.sh b/.evergreen/setup-system.sh index f3c5be212e..e0bd5bf636 100755 --- a/.evergreen/setup-system.sh +++ b/.evergreen/setup-system.sh @@ -50,7 +50,8 @@ fi # the submodule directory directly doesn't work on Windows for some reason. if [ ! -d "$DRIVERS_TOOLS" ]; then detrev=$(git submodule status .evergreen/drivers-evergreen-tools | awk '{print $1}') - git clone --revision=$detrev https://github.com/mongodb-labs/drivers-evergreen-tools $DRIVERS_TOOLS + git clone https://github.com/mongodb-labs/drivers-evergreen-tools $DRIVERS_TOOLS + git -C $DRIVERS_TOOLS checkout $detrev fi # Write the .env file for drivers-tools. From 6e91b1538e734fce0f33440e43dab654a7e97d5d Mon Sep 17 00:00:00 2001 From: Matt Dale <9760375+matthewdale@users.noreply.github.com> Date: Wed, 8 Jul 2026 20:13:21 -0700 Subject: [PATCH 5/9] Bump DET submodule version. --- .evergreen/drivers-evergreen-tools | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/drivers-evergreen-tools b/.evergreen/drivers-evergreen-tools index 835079f20f..b0aded0e55 160000 --- a/.evergreen/drivers-evergreen-tools +++ b/.evergreen/drivers-evergreen-tools @@ -1 +1 @@ -Subproject commit 835079f20f12bbe8cf3a178067ad4eb484e6f86f +Subproject commit b0aded0e55f747fafa942e2368e77bd128fc5755 From 1bcb99365d8b7476f002c06ae56547ebdeb9893e Mon Sep 17 00:00:00 2001 From: Matt Dale <9760375+matthewdale@users.noreply.github.com> Date: Wed, 8 Jul 2026 21:55:35 -0700 Subject: [PATCH 6/9] Ignore .evergreen in go.mod --- go.mod | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/go.mod b/go.mod index 75280ce510..1568c5ca5f 100644 --- a/go.mod +++ b/go.mod @@ -19,3 +19,8 @@ require ( ) replace golang.org/x/net/http2 => golang.org/x/net/http2 v0.23.0 // GODRIVER-3225 + +// Ignore the .evergreen directory so that Go modules contained in the +// .evergreen/drivers-evergreen-tools submodule are not included in Go commands +// and not formatted with gofumpt. +ignore ./.evergreen From 48653ac444a181c5f33ba6b449074b4a4af3a48c Mon Sep 17 00:00:00 2001 From: Matt Dale <9760375+matthewdale@users.noreply.github.com> Date: Wed, 8 Jul 2026 23:15:09 -0700 Subject: [PATCH 7/9] Ignore directories that start with '.' for license checker. --- etc/check_license.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/check_license.sh b/etc/check_license.sh index 5ea046daa5..9f1337b4b1 100755 --- a/etc/check_license.sh +++ b/etc/check_license.sh @@ -61,8 +61,10 @@ FILES=$1 # If no filenames were passed, find all .go files and try to write a license # notice. +# +# Ignore "hidden" directories that start with a "." if [ -z "$FILES" ]; then - FILES=$(find . -type f -name "*.go" -print) + FILES=$(find . -not -path '*/.*' -type f -name "*.go" -print) fi for file in $FILES From ab486f7fa91fadac1f444005d111d7fb62828c0d Mon Sep 17 00:00:00 2001 From: Matt Dale <9760375+matthewdale@users.noreply.github.com> Date: Fri, 10 Jul 2026 19:50:56 -0700 Subject: [PATCH 8/9] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- etc/check_license.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/check_license.sh b/etc/check_license.sh index 9f1337b4b1..3e0eebbec4 100755 --- a/etc/check_license.sh +++ b/etc/check_license.sh @@ -64,7 +64,7 @@ FILES=$1 # # Ignore "hidden" directories that start with a "." if [ -z "$FILES" ]; then - FILES=$(find . -not -path '*/.*' -type f -name "*.go" -print) + FILES=$(find . -path '*/.*' -prune -o -type f -name "*.go" -print) fi for file in $FILES From aae56da6ce71d6a9c02addb2d456c86e2566ff03 Mon Sep 17 00:00:00 2001 From: Matt Dale <9760375+matthewdale@users.noreply.github.com> Date: Fri, 10 Jul 2026 19:54:29 -0700 Subject: [PATCH 9/9] Use a more resilient git command to get the DET submodule revision. --- .evergreen/setup-system.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/setup-system.sh b/.evergreen/setup-system.sh index e0bd5bf636..6ad853dd0e 100755 --- a/.evergreen/setup-system.sh +++ b/.evergreen/setup-system.sh @@ -49,7 +49,7 @@ fi # the drivers-evergreen-tools submodule. We clone a copy here because modifying # the submodule directory directly doesn't work on Windows for some reason. if [ ! -d "$DRIVERS_TOOLS" ]; then - detrev=$(git submodule status .evergreen/drivers-evergreen-tools | awk '{print $1}') + detrev=$(git ls-tree --object-only HEAD .evergreen/drivers-evergreen-tools) git clone https://github.com/mongodb-labs/drivers-evergreen-tools $DRIVERS_TOOLS git -C $DRIVERS_TOOLS checkout $detrev fi