Skip to content

Commit 9151d48

Browse files
test(NODE-7400): Test Node Driver 7.0.0 against latest version of BSON library (#4853)
Co-authored-by: Bailey Pearson <bailey.pearson@mongodb.com> Co-authored-by: Bailey Pearson <bailey.pearson@gmail.com>
1 parent 59c2557 commit 9151d48

File tree

2 files changed

+249
-0
lines changed

2 files changed

+249
-0
lines changed

.evergreen/config.in.yml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,19 @@ functions:
5050
params:
5151
file: src/expansion.yml
5252

53+
"switch source":
54+
# Checkout the desired source revision if specified
55+
- command: shell.exec
56+
params:
57+
working_dir: src
58+
shell: bash
59+
script: |
60+
set -euxo pipefail
61+
git reset --hard HEAD
62+
git fetch origin "${SOURCE_REV}"
63+
git checkout "${SOURCE_REV}"
64+
npm i
65+
5366
"bootstrap mongo-orchestration":
5467
- command: subprocess.exec
5568
params:
@@ -703,6 +716,26 @@ functions:
703716
args:
704717
- .evergreen/docker/alpine.sh
705718

719+
"log state":
720+
- command: shell.exec
721+
params:
722+
working_dir: "src"
723+
shell: bash
724+
script: |-
725+
set -o errexit
726+
set -o pipefail
727+
728+
echo "=== Driver state ==="
729+
echo "Current commit:"
730+
git rev-parse HEAD
731+
echo
732+
echo "Current branch / status:"
733+
git status --short --branch || true
734+
echo
735+
echo "npm ls (full):"
736+
npm ls
737+
echo "=== end log state ==="
738+
706739
tasks:
707740
- name: "test-gcpkms-task"
708741
commands:
@@ -955,6 +988,93 @@ tasks:
955988
args:
956989
- .evergreen/run-search-index-management-tests.sh
957990

991+
- name: test-bson-latest-driver-7.0.0-unit-tests
992+
commands:
993+
- command: expansions.update
994+
type: setup
995+
params:
996+
updates:
997+
- { key: VERSION, value: latest }
998+
- { key: NODE_LTS_VERSION, value: "20.19.0" }
999+
- func: install dependencies
1000+
- func: switch source
1001+
vars:
1002+
SOURCE_REV: refs/tags/v7.0.0
1003+
- func: install package
1004+
vars:
1005+
PACKAGE: https://github.com/mongodb/js-bson#HEAD
1006+
- func: log state
1007+
- func: run unit tests
1008+
1009+
- name: test-bson-latest-driver-7.0.0-server-tests
1010+
commands:
1011+
- command: expansions.update
1012+
type: setup
1013+
params:
1014+
updates:
1015+
- { key: VERSION, value: latest }
1016+
- { key: TOPOLOGY, value: server }
1017+
- { key: AUTH, value: auth }
1018+
- { key: SSL, value: nossl }
1019+
- { key: CLIENT_ENCRYPTION, value: "false" }
1020+
- { key: NODE_LTS_VERSION, value: "20.19.0" }
1021+
- func: install dependencies
1022+
- func: bootstrap mongo-orchestration
1023+
- func: switch source
1024+
vars:
1025+
SOURCE_REV: refs/tags/v7.0.0
1026+
- func: install package
1027+
vars:
1028+
PACKAGE: https://github.com/mongodb/js-bson#HEAD
1029+
- func: log state
1030+
- func: run tests
1031+
1032+
- name: test-bson-latest-driver-7.0.0-replica_set-tests
1033+
commands:
1034+
- command: expansions.update
1035+
type: setup
1036+
params:
1037+
updates:
1038+
- { key: VERSION, value: latest }
1039+
- { key: TOPOLOGY, value: replica_set }
1040+
- { key: AUTH, value: auth }
1041+
- { key: SSL, value: nossl }
1042+
- { key: CLIENT_ENCRYPTION, value: "false" }
1043+
- { key: NODE_LTS_VERSION, value: "20.19.0" }
1044+
- func: install dependencies
1045+
- func: bootstrap mongo-orchestration
1046+
- func: switch source
1047+
vars:
1048+
SOURCE_REV: refs/tags/v7.0.0
1049+
- func: install package
1050+
vars:
1051+
PACKAGE: https://github.com/mongodb/js-bson#HEAD
1052+
- func: log state
1053+
- func: run tests
1054+
1055+
- name: test-bson-latest-driver-7.0.0-sharded_cluster-tests
1056+
commands:
1057+
- command: expansions.update
1058+
type: setup
1059+
params:
1060+
updates:
1061+
- { key: VERSION, value: latest }
1062+
- { key: TOPOLOGY, value: sharded_cluster }
1063+
- { key: AUTH, value: auth }
1064+
- { key: SSL, value: nossl }
1065+
- { key: CLIENT_ENCRYPTION, value: "false" }
1066+
- { key: NODE_LTS_VERSION, value: "20.19.0" }
1067+
- func: install dependencies
1068+
- func: bootstrap mongo-orchestration
1069+
- func: switch source
1070+
vars:
1071+
SOURCE_REV: refs/tags/v7.0.0
1072+
- func: install package
1073+
vars:
1074+
PACKAGE: https://github.com/mongodb/js-bson#HEAD
1075+
- func: log state
1076+
- func: run tests
1077+
9581078
task_groups:
9591079
- name: test_gcpkms_task_group
9601080
setup_group_can_fail_task: true
@@ -1237,3 +1357,11 @@ buildvariants:
12371357
run_on: ubuntu2204-small
12381358
tasks:
12391359
- .alpine-fle
1360+
- name: BSON compatibility tests
1361+
display_name: BSON compatibility tests
1362+
run_on: rhel80-large
1363+
tasks:
1364+
- test-bson-latest-driver-7.0.0-unit-tests
1365+
- test-bson-latest-driver-7.0.0-server-tests
1366+
- test-bson-latest-driver-7.0.0-replica_set-tests
1367+
- test-bson-latest-driver-7.0.0-sharded_cluster-tests

.evergreen/config.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ functions:
2929
- command: expansions.update
3030
params:
3131
file: src/expansion.yml
32+
switch source:
33+
- command: shell.exec
34+
params:
35+
working_dir: src
36+
shell: bash
37+
script: |
38+
set -euxo pipefail
39+
git reset --hard HEAD
40+
git fetch origin "${SOURCE_REV}"
41+
git checkout "${SOURCE_REV}"
42+
npm i
3243
bootstrap mongo-orchestration:
3344
- command: subprocess.exec
3445
params:
@@ -639,6 +650,25 @@ functions:
639650
add_expansions_to_env: true
640651
args:
641652
- .evergreen/docker/alpine.sh
653+
log state:
654+
- command: shell.exec
655+
params:
656+
working_dir: src
657+
shell: bash
658+
script: |-
659+
set -o errexit
660+
set -o pipefail
661+
662+
echo "=== Driver state ==="
663+
echo "Current commit:"
664+
git rev-parse HEAD
665+
echo
666+
echo "Current branch / status:"
667+
git status --short --branch || true
668+
echo
669+
echo "npm ls (full):"
670+
npm ls
671+
echo "=== end log state ==="
642672
tasks:
643673
- name: test-gcpkms-task
644674
commands:
@@ -882,6 +912,89 @@ tasks:
882912
add_expansions_to_env: true
883913
args:
884914
- .evergreen/run-search-index-management-tests.sh
915+
- name: test-bson-latest-driver-7.0.0-unit-tests
916+
commands:
917+
- command: expansions.update
918+
type: setup
919+
params:
920+
updates:
921+
- {key: VERSION, value: latest}
922+
- {key: NODE_LTS_VERSION, value: 20.19.0}
923+
- func: install dependencies
924+
- func: switch source
925+
vars:
926+
SOURCE_REV: refs/tags/v7.0.0
927+
- func: install package
928+
vars:
929+
PACKAGE: https://github.com/mongodb/js-bson#HEAD
930+
- func: log state
931+
- func: run unit tests
932+
- name: test-bson-latest-driver-7.0.0-server-tests
933+
commands:
934+
- command: expansions.update
935+
type: setup
936+
params:
937+
updates:
938+
- {key: VERSION, value: latest}
939+
- {key: TOPOLOGY, value: server}
940+
- {key: AUTH, value: auth}
941+
- {key: SSL, value: nossl}
942+
- {key: CLIENT_ENCRYPTION, value: 'false'}
943+
- {key: NODE_LTS_VERSION, value: 20.19.0}
944+
- func: install dependencies
945+
- func: bootstrap mongo-orchestration
946+
- func: switch source
947+
vars:
948+
SOURCE_REV: refs/tags/v7.0.0
949+
- func: install package
950+
vars:
951+
PACKAGE: https://github.com/mongodb/js-bson#HEAD
952+
- func: log state
953+
- func: run tests
954+
- name: test-bson-latest-driver-7.0.0-replica_set-tests
955+
commands:
956+
- command: expansions.update
957+
type: setup
958+
params:
959+
updates:
960+
- {key: VERSION, value: latest}
961+
- {key: TOPOLOGY, value: replica_set}
962+
- {key: AUTH, value: auth}
963+
- {key: SSL, value: nossl}
964+
- {key: CLIENT_ENCRYPTION, value: 'false'}
965+
- {key: NODE_LTS_VERSION, value: 20.19.0}
966+
- func: install dependencies
967+
- func: bootstrap mongo-orchestration
968+
- func: switch source
969+
vars:
970+
SOURCE_REV: refs/tags/v7.0.0
971+
- func: install package
972+
vars:
973+
PACKAGE: https://github.com/mongodb/js-bson#HEAD
974+
- func: log state
975+
- func: run tests
976+
- name: test-bson-latest-driver-7.0.0-sharded_cluster-tests
977+
commands:
978+
- command: expansions.update
979+
type: setup
980+
params:
981+
updates:
982+
- {key: VERSION, value: latest}
983+
- {key: TOPOLOGY, value: sharded_cluster}
984+
- {key: AUTH, value: auth}
985+
- {key: SSL, value: nossl}
986+
- {key: CLIENT_ENCRYPTION, value: 'false'}
987+
- {key: NODE_LTS_VERSION, value: 20.19.0}
988+
- func: install dependencies
989+
- func: bootstrap mongo-orchestration
990+
- func: switch source
991+
vars:
992+
SOURCE_REV: refs/tags/v7.0.0
993+
- func: install package
994+
vars:
995+
PACKAGE: https://github.com/mongodb/js-bson#HEAD
996+
- func: log state
997+
- func: run tests
885998
- name: test-latest-server
886999
tags:
8871000
- latest
@@ -3386,6 +3499,14 @@ buildvariants:
33863499
run_on: ubuntu2204-small
33873500
tasks:
33883501
- .alpine-fle
3502+
- name: BSON compatibility tests
3503+
display_name: BSON compatibility tests
3504+
run_on: rhel80-large
3505+
tasks:
3506+
- test-bson-latest-driver-7.0.0-unit-tests
3507+
- test-bson-latest-driver-7.0.0-server-tests
3508+
- test-bson-latest-driver-7.0.0-replica_set-tests
3509+
- test-bson-latest-driver-7.0.0-sharded_cluster-tests
33893510
- name: rhel80-large-iron
33903511
display_name: rhel8 Node20.19.0
33913512
run_on: rhel80-large

0 commit comments

Comments
 (0)