From 212631782453dbae0c76e1a00d2eb72f600e8935 Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Thu, 29 Jan 2026 10:33:25 -0800 Subject: [PATCH 01/16] test(NODE-7400): Test Node Driver 7.0.0 against latest version of BSON library --- .evergreen/config.yml | 82 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 399010513e3..72823e0396c 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -29,6 +29,39 @@ functions: - command: expansions.update params: file: src/expansion.yml + fetch source 7.0.0: + - command: git.get_project + params: + directory: src + shallow_clone: true + script: |- + set -o errexit + set -o pipefail + git fetch origin 7.0.0 || git fetch origin v7.0.0 || true + - command: subprocess.exec + params: + working_dir: src + binary: bash + env: + is_patch: ${is_patch} + project: ${project} + args: + - .evergreen/prepare-shell.sh + - command: expansions.update + params: + file: src/expansion.yml + - command: subprocess.exec + params: + working_dir: src + binary: bash + env: + is_patch: ${is_patch} + project: ${project} + args: + - .evergreen/prepare-shell.sh + - command: expansions.update + params: + file: src/expansion.yml bootstrap mongo-orchestration: - command: subprocess.exec params: @@ -639,6 +672,25 @@ functions: add_expansions_to_env: true args: - .evergreen/docker/alpine.sh + log state: + - command: shell.exec + params: + working_dir: "src" + shell: bash + script: |- + set -o errexit + set -o pipefail + + echo "=== Driver state ===" + echo "Current commit:" + git rev-parse HEAD + echo + echo "Current branch / status:" + git status --short --branch || true + echo + echo "npm ls (full):" + npm ls + echo "=== end log state ===" tasks: - name: test-gcpkms-task commands: @@ -3118,6 +3170,31 @@ tasks: - func: install dependencies - func: bootstrap mongo-orchestration - func: run tests + - name: test-bson-latest-server-7.0.0 + tags: + - "bson-compat" + - "driver-7.0.0" + commands: + - command: expansions.update + type: setup + params: + updates: + # These VERSION/TOPOLOGY/AUTH/SSL expansions are used by bootstrap mongo-orchestration. + # Adjust to whatever topology you want for this compat test. + - { key: VERSION, value: "7.0" } + - { key: TOPOLOGY, value: "replica_set" } + - { key: AUTH, value: "auth" } + - { key: SSL, value: "ssl" } + - { key: NODE_LTS_VERSION, value: '24'} + # This is for the install package helper: + - { key: PACKAGE, value: "https://github.com/mongodb/js-bson#HEAD" } + - func: fetch source 7.0.0 + - func: install dependencies + - func: install package + - func: log state + - func: bootstrap mongo-orchestration + - func: run unit tests + - func: run tests task_groups: - name: test_gcpkms_task_group setup_group_can_fail_task: true @@ -3903,3 +3980,8 @@ buildvariants: run_on: rhel80-large tasks: - .ssl + - name: BSON compatibility tests + display_name: BSON compatibility tests + run_on: rhel80-large + tasks: + - test-bson-latest-server-7.0.0 From 4343e250b6c650ecbb5983184855a07e01457e1d Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Thu, 29 Jan 2026 13:38:35 -0800 Subject: [PATCH 02/16] build tool pasta time --- .evergreen/config.yml | 51 +++++++++++++------------------------------ 1 file changed, 15 insertions(+), 36 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 72823e0396c..afb97f6e51a 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -17,27 +17,19 @@ functions: params: directory: src shallow_clone: true - - command: subprocess.exec + - command: shell.exec params: working_dir: src - binary: bash - env: - is_patch: ${is_patch} - project: ${project} - args: - - .evergreen/prepare-shell.sh - - command: expansions.update - params: - file: src/expansion.yml - fetch source 7.0.0: - - command: git.get_project - params: - directory: src - shallow_clone: true - script: |- - set -o errexit - set -o pipefail - git fetch origin 7.0.0 || git fetch origin v7.0.0 || true + shell: bash + script: | + set -euxo pipefail + # Only override if source_rev is set (use | to default to empty) + if [ "${source_rev|}" != "" ]; then + git reset --hard HEAD + git clean -xfd + git fetch origin "${source_rev}" + git checkout "${source_rev}" + fi - command: subprocess.exec params: working_dir: src @@ -50,17 +42,6 @@ functions: - command: expansions.update params: file: src/expansion.yml - - command: subprocess.exec - params: - working_dir: src - binary: bash - env: - is_patch: ${is_patch} - project: ${project} - args: - - .evergreen/prepare-shell.sh - - command: expansions.update - params: file: src/expansion.yml bootstrap mongo-orchestration: - command: subprocess.exec @@ -3179,22 +3160,18 @@ tasks: type: setup params: updates: - # These VERSION/TOPOLOGY/AUTH/SSL expansions are used by bootstrap mongo-orchestration. - # Adjust to whatever topology you want for this compat test. - { key: VERSION, value: "7.0" } - { key: TOPOLOGY, value: "replica_set" } - { key: AUTH, value: "auth" } - { key: SSL, value: "ssl" } - { key: NODE_LTS_VERSION, value: '24'} - # This is for the install package helper: - { key: PACKAGE, value: "https://github.com/mongodb/js-bson#HEAD" } - - func: fetch source 7.0.0 - func: install dependencies + - func: bootstrap mongo-orchestration + - func: fetch source - func: install package - func: log state - - func: bootstrap mongo-orchestration - func: run unit tests - - func: run tests task_groups: - name: test_gcpkms_task_group setup_group_can_fail_task: true @@ -3983,5 +3960,7 @@ buildvariants: - name: BSON compatibility tests display_name: BSON compatibility tests run_on: rhel80-large + expansions: + source_rev: 2512137b5d94b238e7cf5ee753f867e8d1e2e0fc tasks: - test-bson-latest-server-7.0.0 From bfc415641741f6fc7a93e75cfac9a7a67f5f2771 Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Thu, 29 Jan 2026 13:47:27 -0800 Subject: [PATCH 03/16] move changes to config.in.yml --- .evergreen/config.in.yml | 65 +++++++++++++++++++++++++++ .evergreen/config.yml | 96 ++++++++++++++++++++-------------------- 2 files changed, 113 insertions(+), 48 deletions(-) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index 2b5fa1eada1..89e937ee973 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -34,6 +34,21 @@ functions: directory: "src" shallow_clone: true # speed things up by limiting clone depth to 100 + # Checkout the desired source revision if specified + - command: shell.exec + params: + working_dir: src + shell: bash + script: | + set -euxo pipefail + # Only override if source_rev is set (use | to default to empty) + if [ "${source_rev|}" != "" ]; then + git reset --hard HEAD + git clean -xfd + git fetch origin "${source_rev}" + git checkout "${source_rev}" + fi + # Make an evergreen expansion file with dynamic values - command: subprocess.exec params: @@ -955,6 +970,48 @@ tasks: args: - .evergreen/run-search-index-management-tests.sh + - name: test-bson-latest-server-7.0.0 + tags: + - "bson-compat" + - "driver-7.0.0" + commands: + - command: expansions.update + type: setup + params: + updates: + - { key: VERSION, value: "7.0" } + - { key: TOPOLOGY, value: "replica_set" } + - { key: AUTH, value: "auth" } + - { key: SSL, value: "ssl" } + - { key: NODE_LTS_VERSION, value: '24'} + - { key: PACKAGE, value: "https://github.com/mongodb/js-bson#HEAD" } + - func: install dependencies + - func: bootstrap mongo-orchestration + - func: fetch source + - func: install package + - func: log state + - func: run unit tests + + - name: log state + commands: + - command: shell.exec + params: + working_dir: "src" + shell: bash + script: |- + set -o errexit + set -o pipefail + + echo "=== Driver state ===" + echo "Current commit:" + git rev-parse HEAD + echo + echo "Current branch / status:" + git status --short --branch || true + echo + echo "npm ls (full):" + npm ls + echo "=== end log state ===" task_groups: - name: test_gcpkms_task_group setup_group_can_fail_task: true @@ -1216,6 +1273,14 @@ task_groups: tasks: - test-search-index-helpers + - name: BSON compatibility tests + display_name: BSON compatibility tests + run_on: rhel80-large + expansions: + source_rev: 2512137b5d94b238e7cf5ee753f867e8d1e2e0fc + tasks: + - test-bson-latest-server-7.0.0 + pre: - func: "fetch source" - func: "fix absolute paths" diff --git a/.evergreen/config.yml b/.evergreen/config.yml index afb97f6e51a..527f5b4a5d3 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -42,7 +42,6 @@ functions: - command: expansions.update params: file: src/expansion.yml - file: src/expansion.yml bootstrap mongo-orchestration: - command: subprocess.exec params: @@ -653,25 +652,6 @@ functions: add_expansions_to_env: true args: - .evergreen/docker/alpine.sh - log state: - - command: shell.exec - params: - working_dir: "src" - shell: bash - script: |- - set -o errexit - set -o pipefail - - echo "=== Driver state ===" - echo "Current commit:" - git rev-parse HEAD - echo - echo "Current branch / status:" - git status --short --branch || true - echo - echo "npm ls (full):" - npm ls - echo "=== end log state ===" tasks: - name: test-gcpkms-task commands: @@ -915,6 +895,47 @@ tasks: add_expansions_to_env: true args: - .evergreen/run-search-index-management-tests.sh + - name: test-bson-latest-server-7.0.0 + tags: + - bson-compat + - driver-7.0.0 + commands: + - command: expansions.update + type: setup + params: + updates: + - {key: VERSION, value: '7.0'} + - {key: TOPOLOGY, value: replica_set} + - {key: AUTH, value: auth} + - {key: SSL, value: ssl} + - {key: NODE_LTS_VERSION, value: '24'} + - {key: PACKAGE, value: https://github.com/mongodb/js-bson#HEAD} + - func: install dependencies + - func: bootstrap mongo-orchestration + - func: fetch source + - func: install package + - func: log state + - func: run unit tests + - name: log state + commands: + - command: shell.exec + params: + working_dir: src + shell: bash + script: |- + set -o errexit + set -o pipefail + + echo "=== Driver state ===" + echo "Current commit:" + git rev-parse HEAD + echo + echo "Current branch / status:" + git status --short --branch || true + echo + echo "npm ls (full):" + npm ls + echo "=== end log state ===" - name: test-latest-server tags: - latest @@ -3151,27 +3172,6 @@ tasks: - func: install dependencies - func: bootstrap mongo-orchestration - func: run tests - - name: test-bson-latest-server-7.0.0 - tags: - - "bson-compat" - - "driver-7.0.0" - commands: - - command: expansions.update - type: setup - params: - updates: - - { key: VERSION, value: "7.0" } - - { key: TOPOLOGY, value: "replica_set" } - - { key: AUTH, value: "auth" } - - { key: SSL, value: "ssl" } - - { key: NODE_LTS_VERSION, value: '24'} - - { key: PACKAGE, value: "https://github.com/mongodb/js-bson#HEAD" } - - func: install dependencies - - func: bootstrap mongo-orchestration - - func: fetch source - - func: install package - - func: log state - - func: run unit tests task_groups: - name: test_gcpkms_task_group setup_group_can_fail_task: true @@ -3422,6 +3422,13 @@ task_groups: setup_group_timeout_secs: 1800 tasks: - test-search-index-helpers + - name: BSON compatibility tests + display_name: BSON compatibility tests + run_on: rhel80-large + expansions: + source_rev: 2512137b5d94b238e7cf5ee753f867e8d1e2e0fc + tasks: + - test-bson-latest-server-7.0.0 pre: - func: fetch source - func: fix absolute paths @@ -3957,10 +3964,3 @@ buildvariants: run_on: rhel80-large tasks: - .ssl - - name: BSON compatibility tests - display_name: BSON compatibility tests - run_on: rhel80-large - expansions: - source_rev: 2512137b5d94b238e7cf5ee753f867e8d1e2e0fc - tasks: - - test-bson-latest-server-7.0.0 From c87587cee0bfbc1e05a60257d12c3048c7d9e22f Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Thu, 29 Jan 2026 13:50:26 -0800 Subject: [PATCH 04/16] update func name --- .evergreen/config.in.yml | 4 ++-- .evergreen/config.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index 89e937ee973..eb5278e2cfb 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -989,10 +989,10 @@ tasks: - func: bootstrap mongo-orchestration - func: fetch source - func: install package - - func: log state + - func: log-state - func: run unit tests - - name: log state + - name: log-state commands: - command: shell.exec params: diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 527f5b4a5d3..b0f565eb7b0 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -914,9 +914,9 @@ tasks: - func: bootstrap mongo-orchestration - func: fetch source - func: install package - - func: log state + - func: log-state - func: run unit tests - - name: log state + - name: log-state commands: - command: shell.exec params: From 82094d6e9805a4fa00812525c38ebed1798881a2 Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Thu, 29 Jan 2026 13:53:08 -0800 Subject: [PATCH 05/16] moved funcs --- .evergreen/config.in.yml | 41 ++++++++++++++++++++-------------------- .evergreen/config.yml | 40 +++++++++++++++++++-------------------- 2 files changed, 41 insertions(+), 40 deletions(-) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index eb5278e2cfb..fc0982ca01c 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -970,6 +970,27 @@ tasks: args: - .evergreen/run-search-index-management-tests.sh + - name: log-state + commands: + - command: shell.exec + params: + working_dir: "src" + shell: bash + script: |- + set -o errexit + set -o pipefail + + echo "=== Driver state ===" + echo "Current commit:" + git rev-parse HEAD + echo + echo "Current branch / status:" + git status --short --branch || true + echo + echo "npm ls (full):" + npm ls + echo "=== end log state ===" + - name: test-bson-latest-server-7.0.0 tags: - "bson-compat" @@ -992,26 +1013,6 @@ tasks: - func: log-state - func: run unit tests - - name: log-state - commands: - - command: shell.exec - params: - working_dir: "src" - shell: bash - script: |- - set -o errexit - set -o pipefail - - echo "=== Driver state ===" - echo "Current commit:" - git rev-parse HEAD - echo - echo "Current branch / status:" - git status --short --branch || true - echo - echo "npm ls (full):" - npm ls - echo "=== end log state ===" task_groups: - name: test_gcpkms_task_group setup_group_can_fail_task: true diff --git a/.evergreen/config.yml b/.evergreen/config.yml index b0f565eb7b0..b7f3a09df0e 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -895,6 +895,26 @@ tasks: add_expansions_to_env: true args: - .evergreen/run-search-index-management-tests.sh + - name: log-state + commands: + - command: shell.exec + params: + working_dir: src + shell: bash + script: |- + set -o errexit + set -o pipefail + + echo "=== Driver state ===" + echo "Current commit:" + git rev-parse HEAD + echo + echo "Current branch / status:" + git status --short --branch || true + echo + echo "npm ls (full):" + npm ls + echo "=== end log state ===" - name: test-bson-latest-server-7.0.0 tags: - bson-compat @@ -916,26 +936,6 @@ tasks: - func: install package - func: log-state - func: run unit tests - - name: log-state - commands: - - command: shell.exec - params: - working_dir: src - shell: bash - script: |- - set -o errexit - set -o pipefail - - echo "=== Driver state ===" - echo "Current commit:" - git rev-parse HEAD - echo - echo "Current branch / status:" - git status --short --branch || true - echo - echo "npm ls (full):" - npm ls - echo "=== end log state ===" - name: test-latest-server tags: - latest From fec362d1ed335be3c3961c9844a678edc9b4464a Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Thu, 29 Jan 2026 14:21:36 -0800 Subject: [PATCH 06/16] made log state a function --- .evergreen/config.in.yml | 50 ++++++++++++++++++++++------------------ .evergreen/config.yml | 48 +++++++++++++++++++++----------------- 2 files changed, 55 insertions(+), 43 deletions(-) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index fc0982ca01c..1d01d63013f 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -718,6 +718,26 @@ functions: args: - .evergreen/docker/alpine.sh + "log state": + - command: shell.exec + params: + working_dir: "src" + shell: bash + script: |- + set -o errexit + set -o pipefail + + echo "=== Driver state ===" + echo "Current commit:" + git rev-parse HEAD + echo + echo "Current branch / status:" + git status --short --branch || true + echo + echo "npm ls (full):" + npm ls + echo "=== end log state ===" + tasks: - name: "test-gcpkms-task" commands: @@ -970,27 +990,6 @@ tasks: args: - .evergreen/run-search-index-management-tests.sh - - name: log-state - commands: - - command: shell.exec - params: - working_dir: "src" - shell: bash - script: |- - set -o errexit - set -o pipefail - - echo "=== Driver state ===" - echo "Current commit:" - git rev-parse HEAD - echo - echo "Current branch / status:" - git status --short --branch || true - echo - echo "npm ls (full):" - npm ls - echo "=== end log state ===" - - name: test-bson-latest-server-7.0.0 tags: - "bson-compat" @@ -1010,7 +1009,7 @@ tasks: - func: bootstrap mongo-orchestration - func: fetch source - func: install package - - func: log-state + - func: log state - func: run unit tests task_groups: @@ -1303,3 +1302,10 @@ buildvariants: run_on: ubuntu2204-small tasks: - .alpine-fle + - name: BSON compatibility tests + display_name: BSON compatibility tests + run_on: rhel80-large + expansions: + source_rev: 2512137b5d94b238e7cf5ee753f867e8d1e2e0fc + tasks: + - test-bson-latest-server-7.0.0 diff --git a/.evergreen/config.yml b/.evergreen/config.yml index b7f3a09df0e..79f511f82c1 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -652,6 +652,25 @@ functions: add_expansions_to_env: true args: - .evergreen/docker/alpine.sh + log state: + - command: shell.exec + params: + working_dir: src + shell: bash + script: |- + set -o errexit + set -o pipefail + + echo "=== Driver state ===" + echo "Current commit:" + git rev-parse HEAD + echo + echo "Current branch / status:" + git status --short --branch || true + echo + echo "npm ls (full):" + npm ls + echo "=== end log state ===" tasks: - name: test-gcpkms-task commands: @@ -895,26 +914,6 @@ tasks: add_expansions_to_env: true args: - .evergreen/run-search-index-management-tests.sh - - name: log-state - commands: - - command: shell.exec - params: - working_dir: src - shell: bash - script: |- - set -o errexit - set -o pipefail - - echo "=== Driver state ===" - echo "Current commit:" - git rev-parse HEAD - echo - echo "Current branch / status:" - git status --short --branch || true - echo - echo "npm ls (full):" - npm ls - echo "=== end log state ===" - name: test-bson-latest-server-7.0.0 tags: - bson-compat @@ -934,7 +933,7 @@ tasks: - func: bootstrap mongo-orchestration - func: fetch source - func: install package - - func: log-state + - func: log state - func: run unit tests - name: test-latest-server tags: @@ -3447,6 +3446,13 @@ buildvariants: run_on: ubuntu2204-small tasks: - .alpine-fle + - name: BSON compatibility tests + display_name: BSON compatibility tests + run_on: rhel80-large + expansions: + source_rev: 2512137b5d94b238e7cf5ee753f867e8d1e2e0fc + tasks: + - test-bson-latest-server-7.0.0 - name: rhel80-large-iron display_name: rhel8 Node20.19.0 run_on: rhel80-large From e8ee4d53c9b3b651f6d2b71c16a99200aa3a3407 Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Thu, 29 Jan 2026 14:32:31 -0800 Subject: [PATCH 07/16] remove extraneous taskgroup --- .evergreen/config.in.yml | 8 -------- .evergreen/config.yml | 7 ------- 2 files changed, 15 deletions(-) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index 1d01d63013f..c8357f8e855 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -1273,14 +1273,6 @@ task_groups: tasks: - test-search-index-helpers - - name: BSON compatibility tests - display_name: BSON compatibility tests - run_on: rhel80-large - expansions: - source_rev: 2512137b5d94b238e7cf5ee753f867e8d1e2e0fc - tasks: - - test-bson-latest-server-7.0.0 - pre: - func: "fetch source" - func: "fix absolute paths" diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 79f511f82c1..54c17b05fe4 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -3421,13 +3421,6 @@ task_groups: setup_group_timeout_secs: 1800 tasks: - test-search-index-helpers - - name: BSON compatibility tests - display_name: BSON compatibility tests - run_on: rhel80-large - expansions: - source_rev: 2512137b5d94b238e7cf5ee753f867e8d1e2e0fc - tasks: - - test-bson-latest-server-7.0.0 pre: - func: fetch source - func: fix absolute paths From a047acee98800b2a84dcd5897000b41be1db3b09 Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Thu, 29 Jan 2026 14:47:52 -0800 Subject: [PATCH 08/16] use tag instead of commit hash --- .evergreen/config.in.yml | 2 +- .evergreen/config.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index c8357f8e855..956026c9bf8 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -1298,6 +1298,6 @@ buildvariants: display_name: BSON compatibility tests run_on: rhel80-large expansions: - source_rev: 2512137b5d94b238e7cf5ee753f867e8d1e2e0fc + source_rev: refs/tags/v7.0.0 tasks: - test-bson-latest-server-7.0.0 diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 54c17b05fe4..26a5e7042aa 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -3443,7 +3443,7 @@ buildvariants: display_name: BSON compatibility tests run_on: rhel80-large expansions: - source_rev: 2512137b5d94b238e7cf5ee753f867e8d1e2e0fc + source_rev: refs/tags/v7.0.0 tasks: - test-bson-latest-server-7.0.0 - name: rhel80-large-iron From 1dcdde2a01d5010400276f80f360e46099d96c5d Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Fri, 30 Jan 2026 09:21:10 -0800 Subject: [PATCH 09/16] drop unnecessary configs --- .evergreen/config.in.yml | 8 +------- .evergreen/config.yml | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index 956026c9bf8..2138ed8a6f5 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -991,18 +991,12 @@ tasks: - .evergreen/run-search-index-management-tests.sh - name: test-bson-latest-server-7.0.0 - tags: - - "bson-compat" - - "driver-7.0.0" commands: - command: expansions.update type: setup params: updates: - - { key: VERSION, value: "7.0" } - - { key: TOPOLOGY, value: "replica_set" } - - { key: AUTH, value: "auth" } - - { key: SSL, value: "ssl" } + - { key: VERSION, value: "latest" } - { key: NODE_LTS_VERSION, value: '24'} - { key: PACKAGE, value: "https://github.com/mongodb/js-bson#HEAD" } - func: install dependencies diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 26a5e7042aa..4f448d38a2c 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -915,18 +915,12 @@ tasks: args: - .evergreen/run-search-index-management-tests.sh - name: test-bson-latest-server-7.0.0 - tags: - - bson-compat - - driver-7.0.0 commands: - command: expansions.update type: setup params: updates: - - {key: VERSION, value: '7.0'} - - {key: TOPOLOGY, value: replica_set} - - {key: AUTH, value: auth} - - {key: SSL, value: ssl} + - {key: VERSION, value: latest} - {key: NODE_LTS_VERSION, value: '24'} - {key: PACKAGE, value: https://github.com/mongodb/js-bson#HEAD} - func: install dependencies From 41be451f7ffe1d8e795b24ec6f6223f36c82ae1f Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Fri, 30 Jan 2026 10:28:54 -0800 Subject: [PATCH 10/16] add tasks for runnning integ tests against every topology --- .evergreen/config.in.yml | 118 +++++++++++++++++++++++++++++++-------- .evergreen/config.yml | 109 +++++++++++++++++++++++++++++------- 2 files changed, 182 insertions(+), 45 deletions(-) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index 2138ed8a6f5..aa30354980d 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -34,21 +34,6 @@ functions: directory: "src" shallow_clone: true # speed things up by limiting clone depth to 100 - # Checkout the desired source revision if specified - - command: shell.exec - params: - working_dir: src - shell: bash - script: | - set -euxo pipefail - # Only override if source_rev is set (use | to default to empty) - if [ "${source_rev|}" != "" ]; then - git reset --hard HEAD - git clean -xfd - git fetch origin "${source_rev}" - git checkout "${source_rev}" - fi - # Make an evergreen expansion file with dynamic values - command: subprocess.exec params: @@ -65,6 +50,19 @@ functions: params: file: src/expansion.yml + "switch source": + # Checkout the desired source revision if specified + - command: shell.exec + params: + working_dir: src + shell: bash + script: | + set -euxo pipefail + git reset --hard HEAD + git clean -xfd + git fetch origin "${SOURCE_REV}" + git checkout "${SOURCE_REV}" + "bootstrap mongo-orchestration": - command: subprocess.exec params: @@ -990,22 +988,93 @@ tasks: args: - .evergreen/run-search-index-management-tests.sh - - name: test-bson-latest-server-7.0.0 + - name: test-bson-latest-server-7.0.0-unit-tests commands: - command: expansions.update type: setup params: updates: - - { key: VERSION, value: "latest" } - - { key: NODE_LTS_VERSION, value: '24'} - - { key: PACKAGE, value: "https://github.com/mongodb/js-bson#HEAD" } + - {key: VERSION, value: latest} + - {key: NODE_LTS_VERSION, value: '20.19.0'} - func: install dependencies - - func: bootstrap mongo-orchestration - - func: fetch source + - func: switch source + vars: + SOURCE_REV: refs/tags/v7.0.0 - func: install package + vars: + PACKAGE: https://github.com/mongodb/js-bson#HEAD - func: log state - func: run unit tests + - name: test-bson-latest-server-7.0.0-server-tests + commands: + - command: expansions.update + type: setup + params: + updates: + - {key: VERSION, value: latest} + - {key: TOPOLOGY, value: server} + - {key: AUTH, value: noauth} + - {key: SSL, value: nossl} + - {key: CLIENT_ENCRYPTION, value: 'false'} + - {key: NODE_LTS_VERSION, value: '20.19.0'} + - func: install dependencies + - func: bootstrap mongo-orchestration + - func: switch source + vars: + SOURCE_REV: refs/tags/v7.0.0 + - func: install package + vars: + PACKAGE: https://github.com/mongodb/js-bson#HEAD + - func: log state + - func: run tests + + - name: test-bson-latest-server-7.0.0-replica_set-tests + commands: + - command: expansions.update + type: setup + params: + updates: + - {key: VERSION, value: latest} + - {key: TOPOLOGY, value: replica_set} + - {key: AUTH, value: noauth} + - {key: SSL, value: nossl} + - {key: CLIENT_ENCRYPTION, value: 'false'} + - {key: NODE_LTS_VERSION, value: '20.19.0'} + - func: install dependencies + - func: bootstrap mongo-orchestration + - func: switch source + vars: + SOURCE_REV: refs/tags/v7.0.0 + - func: install package + vars: + PACKAGE: https://github.com/mongodb/js-bson#HEAD + - func: log state + - func: run tests + + - name: test-bson-latest-server-7.0.0-sharded_cluster-tests + commands: + - command: expansions.update + type: setup + params: + updates: + - {key: VERSION, value: latest} + - {key: TOPOLOGY, value: sharded_cluster} + - {key: AUTH, value: noauth} + - {key: SSL, value: nossl} + - {key: CLIENT_ENCRYPTION, value: 'false'} + - {key: NODE_LTS_VERSION, value: '20.19.0'} + - func: install dependencies + - func: bootstrap mongo-orchestration + - func: switch source + vars: + SOURCE_REV: refs/tags/v7.0.0 + - func: install package + vars: + PACKAGE: https://github.com/mongodb/js-bson#HEAD + - func: log state + - func: run tests + task_groups: - name: test_gcpkms_task_group setup_group_can_fail_task: true @@ -1291,7 +1360,8 @@ buildvariants: - name: BSON compatibility tests display_name: BSON compatibility tests run_on: rhel80-large - expansions: - source_rev: refs/tags/v7.0.0 tasks: - - test-bson-latest-server-7.0.0 + - test-bson-latest-server-7.0.0-unit-tests + - test-bson-latest-server-7.0.0-server-tests + - test-bson-latest-server-7.0.0-replica_set-tests + - test-bson-latest-server-7.0.0-sharded_cluster-tests diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 4f448d38a2c..1b4afba7963 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -17,19 +17,6 @@ functions: params: directory: src shallow_clone: true - - command: shell.exec - params: - working_dir: src - shell: bash - script: | - set -euxo pipefail - # Only override if source_rev is set (use | to default to empty) - if [ "${source_rev|}" != "" ]; then - git reset --hard HEAD - git clean -xfd - git fetch origin "${source_rev}" - git checkout "${source_rev}" - fi - command: subprocess.exec params: working_dir: src @@ -42,6 +29,17 @@ functions: - command: expansions.update params: file: src/expansion.yml + switch source: + - command: shell.exec + params: + working_dir: src + shell: bash + script: | + set -euxo pipefail + git reset --hard HEAD + git clean -xfd + git fetch origin "${SOURCE_REV}" + git checkout "${SOURCE_REV}" bootstrap mongo-orchestration: - command: subprocess.exec params: @@ -914,21 +912,89 @@ tasks: add_expansions_to_env: true args: - .evergreen/run-search-index-management-tests.sh - - name: test-bson-latest-server-7.0.0 + - name: test-bson-latest-server-7.0.0-unit-tests commands: - command: expansions.update type: setup params: updates: - {key: VERSION, value: latest} - - {key: NODE_LTS_VERSION, value: '24'} - - {key: PACKAGE, value: https://github.com/mongodb/js-bson#HEAD} + - {key: NODE_LTS_VERSION, value: 20.19.0} - func: install dependencies - - func: bootstrap mongo-orchestration - - func: fetch source + - func: switch source + vars: + SOURCE_REV: refs/tags/v7.0.0 - func: install package + vars: + PACKAGE: https://github.com/mongodb/js-bson#HEAD - func: log state - func: run unit tests + - name: test-bson-latest-server-7.0.0-server-tests + commands: + - command: expansions.update + type: setup + params: + updates: + - {key: VERSION, value: latest} + - {key: TOPOLOGY, value: server} + - {key: AUTH, value: noauth} + - {key: SSL, value: nossl} + - {key: CLIENT_ENCRYPTION, value: 'false'} + - {key: NODE_LTS_VERSION, value: 20.19.0} + - func: install dependencies + - func: bootstrap mongo-orchestration + - func: switch source + vars: + SOURCE_REV: refs/tags/v7.0.0 + - func: install package + vars: + PACKAGE: https://github.com/mongodb/js-bson#HEAD + - func: log state + - func: run tests + - name: test-bson-latest-server-7.0.0-replica_set-tests + commands: + - command: expansions.update + type: setup + params: + updates: + - {key: VERSION, value: latest} + - {key: TOPOLOGY, value: replica_set} + - {key: AUTH, value: noauth} + - {key: SSL, value: nossl} + - {key: CLIENT_ENCRYPTION, value: 'false'} + - {key: NODE_LTS_VERSION, value: 20.19.0} + - func: install dependencies + - func: bootstrap mongo-orchestration + - func: switch source + vars: + SOURCE_REV: refs/tags/v7.0.0 + - func: install package + vars: + PACKAGE: https://github.com/mongodb/js-bson#HEAD + - func: log state + - func: run tests + - name: test-bson-latest-server-7.0.0-sharded_cluster-tests + commands: + - command: expansions.update + type: setup + params: + updates: + - {key: VERSION, value: latest} + - {key: TOPOLOGY, value: sharded_cluster} + - {key: AUTH, value: noauth} + - {key: SSL, value: nossl} + - {key: CLIENT_ENCRYPTION, value: 'false'} + - {key: NODE_LTS_VERSION, value: 20.19.0} + - func: install dependencies + - func: bootstrap mongo-orchestration + - func: switch source + vars: + SOURCE_REV: refs/tags/v7.0.0 + - func: install package + vars: + PACKAGE: https://github.com/mongodb/js-bson#HEAD + - func: log state + - func: run tests - name: test-latest-server tags: - latest @@ -3436,10 +3502,11 @@ buildvariants: - name: BSON compatibility tests display_name: BSON compatibility tests run_on: rhel80-large - expansions: - source_rev: refs/tags/v7.0.0 tasks: - - test-bson-latest-server-7.0.0 + - test-bson-latest-server-7.0.0-unit-tests + - test-bson-latest-server-7.0.0-server-tests + - test-bson-latest-server-7.0.0-replica_set-tests + - test-bson-latest-server-7.0.0-sharded_cluster-tests - name: rhel80-large-iron display_name: rhel8 Node20.19.0 run_on: rhel80-large From 6cea79c28d90e1850c2a8f8afbddc885104826bf Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Fri, 30 Jan 2026 12:25:37 -0800 Subject: [PATCH 11/16] rename tasks --- .evergreen/config.in.yml | 8 ++++---- .evergreen/config.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index aa30354980d..0a7691fcbcb 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -988,7 +988,7 @@ tasks: args: - .evergreen/run-search-index-management-tests.sh - - name: test-bson-latest-server-7.0.0-unit-tests + - name: test-bson-latest-driver-7.0.0-unit-tests commands: - command: expansions.update type: setup @@ -1006,7 +1006,7 @@ tasks: - func: log state - func: run unit tests - - name: test-bson-latest-server-7.0.0-server-tests + - name: test-bson-latest-driver-7.0.0-server-tests commands: - command: expansions.update type: setup @@ -1029,7 +1029,7 @@ tasks: - func: log state - func: run tests - - name: test-bson-latest-server-7.0.0-replica_set-tests + - name: test-bson-latest-driver-7.0.0-replica_set-tests commands: - command: expansions.update type: setup @@ -1052,7 +1052,7 @@ tasks: - func: log state - func: run tests - - name: test-bson-latest-server-7.0.0-sharded_cluster-tests + - name: test-bson-latest-driver-7.0.0-sharded_cluster-tests commands: - command: expansions.update type: setup diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 1b4afba7963..aca746324d3 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -912,7 +912,7 @@ tasks: add_expansions_to_env: true args: - .evergreen/run-search-index-management-tests.sh - - name: test-bson-latest-server-7.0.0-unit-tests + - name: test-bson-latest-driver-7.0.0-unit-tests commands: - command: expansions.update type: setup @@ -929,7 +929,7 @@ tasks: PACKAGE: https://github.com/mongodb/js-bson#HEAD - func: log state - func: run unit tests - - name: test-bson-latest-server-7.0.0-server-tests + - name: test-bson-latest-driver-7.0.0-server-tests commands: - command: expansions.update type: setup @@ -951,7 +951,7 @@ tasks: PACKAGE: https://github.com/mongodb/js-bson#HEAD - func: log state - func: run tests - - name: test-bson-latest-server-7.0.0-replica_set-tests + - name: test-bson-latest-driver-7.0.0-replica_set-tests commands: - command: expansions.update type: setup @@ -973,7 +973,7 @@ tasks: PACKAGE: https://github.com/mongodb/js-bson#HEAD - func: log state - func: run tests - - name: test-bson-latest-server-7.0.0-sharded_cluster-tests + - name: test-bson-latest-driver-7.0.0-sharded_cluster-tests commands: - command: expansions.update type: setup From 27e1d5fe2bf553a687ab9b87f106d695fcde4718 Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Fri, 30 Jan 2026 12:28:13 -0800 Subject: [PATCH 12/16] rename everywhere --- .evergreen/config.in.yml | 8 ++++---- .evergreen/config.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index 0a7691fcbcb..9948ba35222 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -1361,7 +1361,7 @@ buildvariants: display_name: BSON compatibility tests run_on: rhel80-large tasks: - - test-bson-latest-server-7.0.0-unit-tests - - test-bson-latest-server-7.0.0-server-tests - - test-bson-latest-server-7.0.0-replica_set-tests - - test-bson-latest-server-7.0.0-sharded_cluster-tests + - test-bson-latest-driver-7.0.0-unit-tests + - test-bson-latest-driver-7.0.0-server-tests + - test-bson-latest-driver-7.0.0-replica_set-tests + - test-bson-latest-driver-7.0.0-sharded_cluster-tests diff --git a/.evergreen/config.yml b/.evergreen/config.yml index aca746324d3..be2183b58df 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -3503,10 +3503,10 @@ buildvariants: display_name: BSON compatibility tests run_on: rhel80-large tasks: - - test-bson-latest-server-7.0.0-unit-tests - - test-bson-latest-server-7.0.0-server-tests - - test-bson-latest-server-7.0.0-replica_set-tests - - test-bson-latest-server-7.0.0-sharded_cluster-tests + - test-bson-latest-driver-7.0.0-unit-tests + - test-bson-latest-driver-7.0.0-server-tests + - test-bson-latest-driver-7.0.0-replica_set-tests + - test-bson-latest-driver-7.0.0-sharded_cluster-tests - name: rhel80-large-iron display_name: rhel8 Node20.19.0 run_on: rhel80-large From f2943081ece2f33e5bf54ae74d5137b106157bf7 Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Fri, 30 Jan 2026 15:06:29 -0800 Subject: [PATCH 13/16] lint fix --- .evergreen/config.in.yml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index 9948ba35222..5d0f2ff4ca4 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -994,8 +994,8 @@ tasks: type: setup params: updates: - - {key: VERSION, value: latest} - - {key: NODE_LTS_VERSION, value: '20.19.0'} + - { key: VERSION, value: latest } + - { key: NODE_LTS_VERSION, value: "20.19.0" } - func: install dependencies - func: switch source vars: @@ -1012,12 +1012,12 @@ tasks: type: setup params: updates: - - {key: VERSION, value: latest} - - {key: TOPOLOGY, value: server} - - {key: AUTH, value: noauth} - - {key: SSL, value: nossl} - - {key: CLIENT_ENCRYPTION, value: 'false'} - - {key: NODE_LTS_VERSION, value: '20.19.0'} + - { key: VERSION, value: latest } + - { key: TOPOLOGY, value: server } + - { key: AUTH, value: noauth } + - { key: SSL, value: nossl } + - { key: CLIENT_ENCRYPTION, value: "false" } + - { key: NODE_LTS_VERSION, value: "20.19.0" } - func: install dependencies - func: bootstrap mongo-orchestration - func: switch source @@ -1035,12 +1035,12 @@ tasks: type: setup params: updates: - - {key: VERSION, value: latest} - - {key: TOPOLOGY, value: replica_set} - - {key: AUTH, value: noauth} - - {key: SSL, value: nossl} - - {key: CLIENT_ENCRYPTION, value: 'false'} - - {key: NODE_LTS_VERSION, value: '20.19.0'} + - { key: VERSION, value: latest } + - { key: TOPOLOGY, value: replica_set } + - { key: AUTH, value: noauth } + - { key: SSL, value: nossl } + - { key: CLIENT_ENCRYPTION, value: "false" } + - { key: NODE_LTS_VERSION, value: "20.19.0" } - func: install dependencies - func: bootstrap mongo-orchestration - func: switch source @@ -1058,12 +1058,12 @@ tasks: type: setup params: updates: - - {key: VERSION, value: latest} - - {key: TOPOLOGY, value: sharded_cluster} - - {key: AUTH, value: noauth} - - {key: SSL, value: nossl} - - {key: CLIENT_ENCRYPTION, value: 'false'} - - {key: NODE_LTS_VERSION, value: '20.19.0'} + - { key: VERSION, value: latest } + - { key: TOPOLOGY, value: sharded_cluster } + - { key: AUTH, value: noauth } + - { key: SSL, value: nossl } + - { key: CLIENT_ENCRYPTION, value: "false" } + - { key: NODE_LTS_VERSION, value: "20.19.0" } - func: install dependencies - func: bootstrap mongo-orchestration - func: switch source From 62a4c900ecfe50b5fe267d775cc7f3f58fcd9071 Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Fri, 30 Jan 2026 16:30:46 -0800 Subject: [PATCH 14/16] don't git clean when switching source --- .evergreen/config.in.yml | 7 +++---- .evergreen/config.yml | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index 5d0f2ff4ca4..f80b66f544c 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -59,7 +59,6 @@ functions: script: | set -euxo pipefail git reset --hard HEAD - git clean -xfd git fetch origin "${SOURCE_REV}" git checkout "${SOURCE_REV}" @@ -1014,7 +1013,7 @@ tasks: updates: - { key: VERSION, value: latest } - { key: TOPOLOGY, value: server } - - { key: AUTH, value: noauth } + - { key: AUTH, value: auth } - { key: SSL, value: nossl } - { key: CLIENT_ENCRYPTION, value: "false" } - { key: NODE_LTS_VERSION, value: "20.19.0" } @@ -1037,7 +1036,7 @@ tasks: updates: - { key: VERSION, value: latest } - { key: TOPOLOGY, value: replica_set } - - { key: AUTH, value: noauth } + - { key: AUTH, value: auth } - { key: SSL, value: nossl } - { key: CLIENT_ENCRYPTION, value: "false" } - { key: NODE_LTS_VERSION, value: "20.19.0" } @@ -1060,7 +1059,7 @@ tasks: updates: - { key: VERSION, value: latest } - { key: TOPOLOGY, value: sharded_cluster } - - { key: AUTH, value: noauth } + - { key: AUTH, value: auth } - { key: SSL, value: nossl } - { key: CLIENT_ENCRYPTION, value: "false" } - { key: NODE_LTS_VERSION, value: "20.19.0" } diff --git a/.evergreen/config.yml b/.evergreen/config.yml index be2183b58df..594933adb66 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -37,7 +37,6 @@ functions: script: | set -euxo pipefail git reset --hard HEAD - git clean -xfd git fetch origin "${SOURCE_REV}" git checkout "${SOURCE_REV}" bootstrap mongo-orchestration: @@ -937,7 +936,7 @@ tasks: updates: - {key: VERSION, value: latest} - {key: TOPOLOGY, value: server} - - {key: AUTH, value: noauth} + - {key: AUTH, value: auth} - {key: SSL, value: nossl} - {key: CLIENT_ENCRYPTION, value: 'false'} - {key: NODE_LTS_VERSION, value: 20.19.0} @@ -959,7 +958,7 @@ tasks: updates: - {key: VERSION, value: latest} - {key: TOPOLOGY, value: replica_set} - - {key: AUTH, value: noauth} + - {key: AUTH, value: auth} - {key: SSL, value: nossl} - {key: CLIENT_ENCRYPTION, value: 'false'} - {key: NODE_LTS_VERSION, value: 20.19.0} @@ -981,7 +980,7 @@ tasks: updates: - {key: VERSION, value: latest} - {key: TOPOLOGY, value: sharded_cluster} - - {key: AUTH, value: noauth} + - {key: AUTH, value: auth} - {key: SSL, value: nossl} - {key: CLIENT_ENCRYPTION, value: 'false'} - {key: NODE_LTS_VERSION, value: 20.19.0} From 1c92e047662da89abaadcfc91ae680068148229c Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Mon, 2 Feb 2026 08:25:37 -0800 Subject: [PATCH 15/16] Update .evergreen/config.in.yml Co-authored-by: Bailey Pearson --- .evergreen/config.in.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index f80b66f544c..29587cdc52c 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -61,6 +61,7 @@ functions: git reset --hard HEAD git fetch origin "${SOURCE_REV}" git checkout "${SOURCE_REV}" + npm i "bootstrap mongo-orchestration": - command: subprocess.exec From e09d9bcac2390992195a215858c1a137b0e63196 Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Mon, 2 Feb 2026 08:50:42 -0800 Subject: [PATCH 16/16] regenerate config.yml --- .evergreen/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 594933adb66..d357b5e855b 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -39,6 +39,7 @@ functions: git reset --hard HEAD git fetch origin "${SOURCE_REV}" git checkout "${SOURCE_REV}" + npm i bootstrap mongo-orchestration: - command: subprocess.exec params: