diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index 2b5fa1eada..29587cdc52 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -50,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 fetch origin "${SOURCE_REV}" + git checkout "${SOURCE_REV}" + npm i + "bootstrap mongo-orchestration": - command: subprocess.exec params: @@ -703,6 +716,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: @@ -955,6 +988,93 @@ tasks: args: - .evergreen/run-search-index-management-tests.sh + - name: test-bson-latest-driver-7.0.0-unit-tests + commands: + - command: expansions.update + type: setup + params: + updates: + - { key: VERSION, value: latest } + - { key: NODE_LTS_VERSION, value: "20.19.0" } + - func: install dependencies + - 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-driver-7.0.0-server-tests + commands: + - command: expansions.update + type: setup + params: + updates: + - { key: VERSION, value: latest } + - { key: TOPOLOGY, value: server } + - { key: AUTH, value: auth } + - { 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-driver-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: auth } + - { 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-driver-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: auth } + - { 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 @@ -1237,3 +1357,11 @@ buildvariants: run_on: ubuntu2204-small tasks: - .alpine-fle + - name: BSON compatibility tests + display_name: BSON compatibility tests + run_on: rhel80-large + tasks: + - 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 399010513e..d357b5e855 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -29,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 fetch origin "${SOURCE_REV}" + git checkout "${SOURCE_REV}" + npm i bootstrap mongo-orchestration: - command: subprocess.exec params: @@ -639,6 +650,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: @@ -882,6 +912,89 @@ tasks: add_expansions_to_env: true args: - .evergreen/run-search-index-management-tests.sh + - name: test-bson-latest-driver-7.0.0-unit-tests + commands: + - command: expansions.update + type: setup + params: + updates: + - {key: VERSION, value: latest} + - {key: NODE_LTS_VERSION, value: 20.19.0} + - func: install dependencies + - 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-driver-7.0.0-server-tests + commands: + - command: expansions.update + type: setup + params: + updates: + - {key: VERSION, value: latest} + - {key: TOPOLOGY, value: server} + - {key: AUTH, value: auth} + - {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-driver-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: auth} + - {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-driver-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: auth} + - {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 @@ -3386,6 +3499,14 @@ buildvariants: run_on: ubuntu2204-small tasks: - .alpine-fle + - name: BSON compatibility tests + display_name: BSON compatibility tests + run_on: rhel80-large + tasks: + - 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