Skip to content

Commit beb4558

Browse files
remove NPM_VERSION from ci config; make LATEST_LTS_VERSION required for CI tasks
1 parent 4b50596 commit beb4558

File tree

4 files changed

+13
-39
lines changed

4 files changed

+13
-39
lines changed

.evergreen/ci_matrix_constants.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const MONGODB_VERSIONS = ['latest', 'rapid', '8.0', '7.0', '6.0', '5.0', '4.4', '4.2'];
22
const versions = [
3-
{ codeName: 'iron', versionNumber: '20.19.0', npmVersion: 'latest' },
4-
{ codeName: 'jod', versionNumber: 22, npmVersion: 'latest' }
3+
{ codeName: 'iron', versionNumber: '20.19.0' },
4+
{ codeName: 'jod', versionNumber: 22 }
55
];
66
const NODE_VERSIONS = versions.map(({ versionNumber }) => versionNumber).sort();
77
const LOWEST_LTS = NODE_VERSIONS[0];

.evergreen/config.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,7 +1844,6 @@ tasks:
18441844
params:
18451845
updates:
18461846
- {key: NODE_LTS_VERSION, value: 20.19.0}
1847-
- {key: NPM_VERSION, value: latest}
18481847
- func: install dependencies
18491848
- func: run unit tests
18501849
- name: run-unit-tests-node-22
@@ -1856,7 +1855,6 @@ tasks:
18561855
params:
18571856
updates:
18581857
- {key: NODE_LTS_VERSION, value: '22'}
1859-
- {key: NPM_VERSION, value: latest}
18601858
- func: install dependencies
18611859
- func: run unit tests
18621860
- name: run-lint-checks
@@ -1879,7 +1877,6 @@ tasks:
18791877
params:
18801878
updates:
18811879
- {key: NODE_LTS_VERSION, value: '22'}
1882-
- {key: NPM_VERSION, value: '9'}
18831880
- func: install dependencies
18841881
- func: check resource management
18851882
- name: test-explicit-resource-management-feature-integration
@@ -1906,7 +1903,6 @@ tasks:
19061903
params:
19071904
updates:
19081905
- {key: NODE_LTS_VERSION, value: 20.19.0}
1909-
- {key: NPM_VERSION, value: '9'}
19101906
- {key: TS_VERSION, value: next}
19111907
- {key: TYPES_VERSION, value: 22.15.3}
19121908
- func: install dependencies
@@ -1921,7 +1917,6 @@ tasks:
19211917
params:
19221918
updates:
19231919
- {key: NODE_LTS_VERSION, value: 20.19.0}
1924-
- {key: NPM_VERSION, value: '9'}
19251920
- {key: TS_VERSION, value: current}
19261921
- {key: TYPES_VERSION, value: 22.15.3}
19271922
- func: install dependencies
@@ -1936,7 +1931,6 @@ tasks:
19361931
params:
19371932
updates:
19381933
- {key: NODE_LTS_VERSION, value: 20.19.0}
1939-
- {key: NPM_VERSION, value: '9'}
19401934
- {key: TS_VERSION, value: '4.4'}
19411935
- {key: TYPES_VERSION, value: 18.11.9}
19421936
- func: install dependencies
@@ -1951,7 +1945,6 @@ tasks:
19511945
params:
19521946
updates:
19531947
- {key: NODE_LTS_VERSION, value: 20.19.0}
1954-
- {key: NPM_VERSION, value: '9'}
19551948
- {key: TS_VERSION, value: current}
19561949
- {key: TYPES_VERSION, value: 22.15.3}
19571950
- func: install dependencies
@@ -1974,7 +1967,6 @@ tasks:
19741967
params:
19751968
updates:
19761969
- {key: NODE_LTS_VERSION, value: 20.19.0}
1977-
- {key: NPM_VERSION, value: '9'}
19781970
- {key: VERSION, value: '5.0'}
19791971
- {key: TOPOLOGY, value: replica_set}
19801972
- {key: CLIENT_ENCRYPTION, value: 'true'}
@@ -1992,7 +1984,6 @@ tasks:
19921984
params:
19931985
updates:
19941986
- {key: NODE_LTS_VERSION, value: 20.19.0}
1995-
- {key: NPM_VERSION, value: '9'}
19961987
- {key: VERSION, value: rapid}
19971988
- {key: TOPOLOGY, value: replica_set}
19981989
- {key: CLIENT_ENCRYPTION, value: 'true'}
@@ -2010,7 +2001,6 @@ tasks:
20102001
params:
20112002
updates:
20122003
- {key: NODE_LTS_VERSION, value: 20.19.0}
2013-
- {key: NPM_VERSION, value: '9'}
20142004
- {key: VERSION, value: latest}
20152005
- {key: TOPOLOGY, value: replica_set}
20162006
- {key: CLIENT_ENCRYPTION, value: 'true'}
@@ -2028,7 +2018,6 @@ tasks:
20282018
params:
20292019
updates:
20302020
- {key: NODE_LTS_VERSION, value: 20.19.0}
2031-
- {key: NPM_VERSION, value: '9'}
20322021
- {key: VERSION, value: '7.0'}
20332022
- {key: TOPOLOGY, value: replica_set}
20342023
- {key: CLIENT_ENCRYPTION, value: 'true'}
@@ -2449,7 +2438,7 @@ tasks:
24492438
type: setup
24502439
params:
24512440
updates:
2452-
- {key: NPM_VERSION, value: '9'}
2441+
- {key: NODE_LTS_VERSION, value: 20.19.0}
24532442
- {key: VERSION, value: rapid}
24542443
- {key: TOPOLOGY, value: server}
24552444
- func: install dependencies
@@ -2464,7 +2453,7 @@ tasks:
24642453
type: setup
24652454
params:
24662455
updates:
2467-
- {key: NPM_VERSION, value: '9'}
2456+
- {key: NODE_LTS_VERSION, value: 20.19.0}
24682457
- {key: VERSION, value: rapid}
24692458
- {key: AUTH, value: auth}
24702459
- {key: ORCHESTRATION_FILE, value: auth-aws.json}
@@ -2874,7 +2863,6 @@ buildvariants:
28742863
run_on: rhel80-large
28752864
expansions:
28762865
NODE_LTS_VERSION: 20.19.0
2877-
NPM_VERSION: latest
28782866
CLIENT_ENCRYPTION: 'true'
28792867
TEST_CSFLE: 'true'
28802868
tasks:
@@ -2930,7 +2918,6 @@ buildvariants:
29302918
run_on: rhel80-large
29312919
expansions:
29322920
NODE_LTS_VERSION: 22
2933-
NPM_VERSION: latest
29342921
CLIENT_ENCRYPTION: 'true'
29352922
TEST_CSFLE: 'true'
29362923
tasks:
@@ -3039,7 +3026,6 @@ buildvariants:
30393026
run_on: windows-vsCurrent-large
30403027
expansions:
30413028
NODE_LTS_VERSION: 20.19.0
3042-
NPM_VERSION: latest
30433029
CLIENT_ENCRYPTION: 'false'
30443030
TEST_CSFLE: 'false'
30453031
tasks:
@@ -3085,7 +3071,6 @@ buildvariants:
30853071
run_on: windows-vsCurrent-large
30863072
expansions:
30873073
NODE_LTS_VERSION: 22
3088-
NPM_VERSION: latest
30893074
CLIENT_ENCRYPTION: 'false'
30903075
TEST_CSFLE: 'false'
30913076
tasks:
@@ -3133,7 +3118,6 @@ buildvariants:
31333118
CLIENT_ENCRYPTION: true
31343119
RUN_WITH_MONGOCRYPTD: true
31353120
NODE_LTS_VERSION: 20.19.0
3136-
NPM_VERSION: 9
31373121
tasks:
31383122
- test-latest-csfle-mongocryptd
31393123
- test-rapid-csfle-mongocryptd
@@ -3150,7 +3134,6 @@ buildvariants:
31503134
CLIENT_ENCRYPTION: true
31513135
RUN_WITH_MONGOCRYPTD: true
31523136
NODE_LTS_VERSION: 20.19.0
3153-
NPM_VERSION: 9
31543137
tasks:
31553138
- test-latest-csfle-mongocryptd
31563139
- test-rapid-csfle-mongocryptd

.evergreen/generate_evergreen_tasks.js

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ AWS_LAMBDA_HANDLER_TASKS.push({
285285
tags: ['latest', 'lambda'],
286286
commands: [
287287
updateExpansions({
288-
NPM_VERSION: 9,
288+
NODE_LTS_VERSION: LOWEST_LTS,
289289
VERSION: 'rapid',
290290
TOPOLOGY: 'server'
291291
}),
@@ -301,7 +301,7 @@ AWS_LAMBDA_HANDLER_TASKS.push({
301301
tags: ['latest', 'lambda'],
302302
commands: [
303303
updateExpansions({
304-
NPM_VERSION: 9,
304+
NODE_LTS_VERSION: LOWEST_LTS,
305305
VERSION: 'rapid',
306306
AUTH: 'auth',
307307
ORCHESTRATION_FILE: 'auth-aws.json',
@@ -395,10 +395,7 @@ for (const {
395395
const nodeLtsDisplayName = `Node${NODE_LTS_VERSION}`;
396396
const name = `${osName}-${NODE_LTS_VERSION >= 20 ? nodeLtsDisplayName : nodeLTSCodeName}`;
397397
const display_name = `${osDisplayName} ${nodeLtsDisplayName}`;
398-
const NPM_VERSION = versions.find(
399-
({ versionNumber }) => versionNumber === NODE_LTS_VERSION
400-
).npmVersion;
401-
const expansions = { NODE_LTS_VERSION, NPM_VERSION };
398+
const expansions = { NODE_LTS_VERSION };
402399
const taskNames = tasks.map(({ name }) => name);
403400

404401
expansions.CLIENT_ENCRYPTION = String(!!clientEncryption);
@@ -455,8 +452,7 @@ for (const nodeVersion of [LOWEST_LTS, LATEST_LTS]) {
455452
expansions: {
456453
CLIENT_ENCRYPTION: true,
457454
RUN_WITH_MONGOCRYPTD: true,
458-
NODE_LTS_VERSION: LOWEST_LTS,
459-
NPM_VERSION: 9
455+
NODE_LTS_VERSION: LOWEST_LTS
460456
},
461457
tasks: MONGOCRYPTD_CSFLE_TASKS.map(task => task.name)
462458
});
@@ -475,14 +471,13 @@ BUILD_VARIANTS.push({
475471

476472
const unitTestTasks = Array.from(
477473
(function* () {
478-
for (const { versionNumber: NODE_LTS_VERSION, npmVersion: NPM_VERSION } of versions) {
474+
for (const { versionNumber: NODE_LTS_VERSION } of versions) {
479475
yield {
480476
name: `run-unit-tests-node-${NODE_LTS_VERSION}`,
481477
tags: ['unit-tests'],
482478
commands: [
483479
updateExpansions({
484-
NODE_LTS_VERSION,
485-
NPM_VERSION
480+
NODE_LTS_VERSION
486481
}),
487482
{ func: 'install dependencies' },
488483
{ func: 'run unit tests' }
@@ -512,8 +507,7 @@ SINGLETON_TASKS.push(
512507
tags: ['resource-management'],
513508
commands: [
514509
updateExpansions({
515-
NODE_LTS_VERSION: LATEST_LTS,
516-
NPM_VERSION: 9
510+
NODE_LTS_VERSION: LATEST_LTS
517511
}),
518512
{ func: 'install dependencies' },
519513
{ func: 'check resource management' }
@@ -545,7 +539,6 @@ function* makeTypescriptTasks() {
545539
commands: [
546540
updateExpansions({
547541
NODE_LTS_VERSION: LOWEST_LTS,
548-
NPM_VERSION: 9,
549542
TS_VERSION,
550543
TYPES_VERSION
551544
}),
@@ -561,7 +554,6 @@ function* makeTypescriptTasks() {
561554
commands: [
562555
updateExpansions({
563556
NODE_LTS_VERSION: LOWEST_LTS,
564-
NPM_VERSION: 9,
565557
TS_VERSION,
566558
TYPES_VERSION
567559
}),
@@ -625,7 +617,6 @@ for (const serverVersion of ['5.0', 'rapid', 'latest']) {
625617
commands: [
626618
updateExpansions({
627619
NODE_LTS_VERSION: LOWEST_LTS,
628-
NPM_VERSION: 9,
629620
VERSION: serverVersion,
630621
TOPOLOGY: 'replica_set',
631622
CLIENT_ENCRYPTION: true
@@ -645,7 +636,6 @@ customDependencyTests.push({
645636
commands: [
646637
updateExpansions({
647638
NODE_LTS_VERSION: LOWEST_LTS,
648-
NPM_VERSION: 9,
649639
VERSION: '7.0',
650640
TOPOLOGY: 'replica_set',
651641
CLIENT_ENCRYPTION: true

.evergreen/install-dependencies.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ set -o errexit # Exit the script with error if any of the commands fail
55
## a nodejs major version (i.e., 16)
66
## 'latest'
77
## a full nodejs version, in the format v<major>.<minor>.patch
8-
export NODE_LTS_VERSION=${NODE_LTS_VERSION:-16}
8+
if [ -z ${NODE_LTS_VERSION+omitted} ]; then echo "NODE_LTS_VERSION is unset" && exit 1; fi
9+
910
# npm version can be defined in the environment for cases where we need to install
1011
# a version lower than latest to support EOL Node versions. When not provided will
1112
# be handled by this script in drivers tools.

0 commit comments

Comments
 (0)