Skip to content

Commit e3ea809

Browse files
make CLIENT_ENCRYPTION required and provide it everywhere
1 parent f8f9145 commit e3ea809

File tree

3 files changed

+52
-12
lines changed

3 files changed

+52
-12
lines changed

.evergreen/config.yml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,6 +1744,8 @@ tasks:
17441744
- {key: TOPOLOGY, value: sharded_cluster}
17451745
- {key: AUTH, value: auth}
17461746
- {key: LOAD_BALANCER, value: 'true'}
1747+
- {key: CLIENT_ENCRYPTION, value: 'true'}
1748+
- {key: TEST_CSFLE, value: 'true'}
17471749
- func: install dependencies
17481750
- func: bootstrap mongo-orchestration
17491751
- func: start-load-balancer
@@ -1763,6 +1765,8 @@ tasks:
17631765
- {key: TOPOLOGY, value: sharded_cluster}
17641766
- {key: AUTH, value: auth}
17651767
- {key: LOAD_BALANCER, value: 'true'}
1768+
- {key: CLIENT_ENCRYPTION, value: 'true'}
1769+
- {key: TEST_CSFLE, value: 'true'}
17661770
- func: install dependencies
17671771
- func: bootstrap mongo-orchestration
17681772
- func: start-load-balancer
@@ -1782,6 +1786,8 @@ tasks:
17821786
- {key: TOPOLOGY, value: sharded_cluster}
17831787
- {key: AUTH, value: auth}
17841788
- {key: LOAD_BALANCER, value: 'true'}
1789+
- {key: CLIENT_ENCRYPTION, value: 'true'}
1790+
- {key: TEST_CSFLE, value: 'true'}
17851791
- func: install dependencies
17861792
- func: bootstrap mongo-orchestration
17871793
- func: start-load-balancer
@@ -1801,6 +1807,8 @@ tasks:
18011807
- {key: TOPOLOGY, value: sharded_cluster}
18021808
- {key: AUTH, value: auth}
18031809
- {key: LOAD_BALANCER, value: 'true'}
1810+
- {key: CLIENT_ENCRYPTION, value: 'true'}
1811+
- {key: TEST_CSFLE, value: 'true'}
18041812
- func: install dependencies
18051813
- func: bootstrap mongo-orchestration
18061814
- func: start-load-balancer
@@ -1820,6 +1828,8 @@ tasks:
18201828
- {key: TOPOLOGY, value: sharded_cluster}
18211829
- {key: AUTH, value: auth}
18221830
- {key: LOAD_BALANCER, value: 'true'}
1831+
- {key: CLIENT_ENCRYPTION, value: 'true'}
1832+
- {key: TEST_CSFLE, value: 'true'}
18231833
- func: install dependencies
18241834
- func: bootstrap mongo-orchestration
18251835
- func: start-load-balancer
@@ -1839,6 +1849,8 @@ tasks:
18391849
- {key: TOPOLOGY, value: sharded_cluster}
18401850
- {key: AUTH, value: auth}
18411851
- {key: LOAD_BALANCER, value: 'true'}
1852+
- {key: CLIENT_ENCRYPTION, value: 'true'}
1853+
- {key: TEST_CSFLE, value: 'true'}
18421854
- func: install dependencies
18431855
- func: bootstrap mongo-orchestration
18441856
- func: start-load-balancer
@@ -1933,6 +1945,8 @@ tasks:
19331945
- {key: TOPOLOGY, value: replica_set}
19341946
- {key: AUTH, value: auth}
19351947
- {key: COMPRESSOR, value: snappy}
1948+
- {key: CLIENT_ENCRYPTION, value: 'false'}
1949+
- {key: TEST_CSFLE, value: 'false'}
19361950
- func: install dependencies
19371951
- func: bootstrap mongo-orchestration
19381952
- func: run-compression-tests
@@ -1949,6 +1963,8 @@ tasks:
19491963
- {key: TOPOLOGY, value: replica_set}
19501964
- {key: AUTH, value: auth}
19511965
- {key: COMPRESSOR, value: zstd}
1966+
- {key: CLIENT_ENCRYPTION, value: 'false'}
1967+
- {key: TEST_CSFLE, value: 'false'}
19521968
- func: install dependencies
19531969
- func: bootstrap mongo-orchestration
19541970
- func: install package
@@ -1968,6 +1984,8 @@ tasks:
19681984
- {key: TOPOLOGY, value: replica_set}
19691985
- {key: AUTH, value: auth}
19701986
- {key: COMPRESSOR, value: zstd}
1987+
- {key: CLIENT_ENCRYPTION, value: 'false'}
1988+
- {key: TEST_CSFLE, value: 'false'}
19711989
- func: install dependencies
19721990
- func: bootstrap mongo-orchestration
19731991
- func: run-compression-tests
@@ -4627,7 +4645,8 @@ buildvariants:
46274645
expansions:
46284646
NODE_LTS_VERSION: 16
46294647
NPM_VERSION: 9
4630-
CLIENT_ENCRYPTION: true
4648+
CLIENT_ENCRYPTION: 'true'
4649+
TEST_CSFLE: 'true'
46314650
tasks:
46324651
- test-latest-server
46334652
- test-latest-replica_set
@@ -4687,7 +4706,8 @@ buildvariants:
46874706
expansions:
46884707
NODE_LTS_VERSION: 18
46894708
NPM_VERSION: 10
4690-
CLIENT_ENCRYPTION: true
4709+
CLIENT_ENCRYPTION: 'true'
4710+
TEST_CSFLE: 'true'
46914711
tasks:
46924712
- test-latest-server
46934713
- test-latest-replica_set
@@ -4747,7 +4767,8 @@ buildvariants:
47474767
expansions:
47484768
NODE_LTS_VERSION: 20
47494769
NPM_VERSION: latest
4750-
CLIENT_ENCRYPTION: true
4770+
CLIENT_ENCRYPTION: 'true'
4771+
TEST_CSFLE: 'true'
47514772
tasks:
47524773
- test-latest-server
47534774
- test-latest-replica_set
@@ -4807,7 +4828,8 @@ buildvariants:
48074828
expansions:
48084829
NODE_LTS_VERSION: 22
48094830
NPM_VERSION: latest
4810-
CLIENT_ENCRYPTION: true
4831+
CLIENT_ENCRYPTION: 'true'
4832+
TEST_CSFLE: 'true'
48114833
tasks:
48124834
- test-latest-server
48134835
- test-latest-replica_set
@@ -4926,6 +4948,8 @@ buildvariants:
49264948
expansions:
49274949
NODE_LTS_VERSION: 16
49284950
NPM_VERSION: 9
4951+
CLIENT_ENCRYPTION: 'false'
4952+
TEST_CSFLE: 'false'
49294953
tasks:
49304954
- test-latest-server
49314955
- test-latest-replica_set
@@ -4973,6 +4997,8 @@ buildvariants:
49734997
expansions:
49744998
NODE_LTS_VERSION: 18
49754999
NPM_VERSION: 10
5000+
CLIENT_ENCRYPTION: 'false'
5001+
TEST_CSFLE: 'false'
49765002
tasks:
49775003
- test-latest-server
49785004
- test-latest-replica_set
@@ -5020,6 +5046,8 @@ buildvariants:
50205046
expansions:
50215047
NODE_LTS_VERSION: 20
50225048
NPM_VERSION: latest
5049+
CLIENT_ENCRYPTION: 'false'
5050+
TEST_CSFLE: 'false'
50235051
tasks:
50245052
- test-latest-server
50255053
- test-latest-replica_set
@@ -5067,6 +5095,8 @@ buildvariants:
50675095
expansions:
50685096
NODE_LTS_VERSION: 22
50695097
NPM_VERSION: latest
5098+
CLIENT_ENCRYPTION: 'false'
5099+
TEST_CSFLE: 'false'
50705100
tasks:
50715101
- test-latest-server
50725102
- test-latest-replica_set

.evergreen/generate_evergreen_tasks.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ TASKS.push(
148148
VERSION: ver,
149149
TOPOLOGY: 'sharded_cluster',
150150
AUTH: 'auth',
151-
LOAD_BALANCER: 'true'
151+
LOAD_BALANCER: 'true',
152+
CLIENT_ENCRYPTION: 'true',
153+
TEST_CSFLE: 'true'
152154
}),
153155
{ func: 'install dependencies' },
154156
{ func: 'bootstrap mongo-orchestration' },
@@ -242,7 +244,9 @@ TASKS.push({
242244
VERSION: 'latest',
243245
TOPOLOGY: 'replica_set',
244246
AUTH: 'auth',
245-
COMPRESSOR: 'snappy'
247+
COMPRESSOR: 'snappy',
248+
CLIENT_ENCRYPTION: 'false',
249+
TEST_CSFLE: 'false'
246250
}),
247251
{ func: 'install dependencies' },
248252
{ func: 'bootstrap mongo-orchestration' },
@@ -258,7 +262,9 @@ TASKS.push({
258262
VERSION: 'latest',
259263
TOPOLOGY: 'replica_set',
260264
AUTH: 'auth',
261-
COMPRESSOR: 'zstd'
265+
COMPRESSOR: 'zstd',
266+
CLIENT_ENCRYPTION: 'false',
267+
TEST_CSFLE: 'false'
262268
}),
263269
{ func: 'install dependencies' },
264270
{ func: 'bootstrap mongo-orchestration' },
@@ -280,7 +286,9 @@ TASKS.push({
280286
VERSION: 'latest',
281287
TOPOLOGY: 'replica_set',
282288
AUTH: 'auth',
283-
COMPRESSOR: 'zstd'
289+
COMPRESSOR: 'zstd',
290+
CLIENT_ENCRYPTION: 'false',
291+
TEST_CSFLE: 'false'
284292
}),
285293
{ func: 'install dependencies' },
286294
{ func: 'bootstrap mongo-orchestration' },
@@ -445,9 +453,8 @@ for (const {
445453
const expansions = { NODE_LTS_VERSION, NPM_VERSION };
446454
const taskNames = tasks.map(({ name }) => name);
447455

448-
if (clientEncryption) {
449-
expansions.CLIENT_ENCRYPTION = true;
450-
}
456+
expansions.CLIENT_ENCRYPTION = String(!!clientEncryption)
457+
expansions.TEST_CSFLE = expansions.CLIENT_ENCRYPTION
451458

452459
BUILD_VARIANTS.push({ name, display_name, run_on, expansions, tasks: taskNames });
453460
}

.evergreen/run-tests.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ TEST_NPM_SCRIPT=${TEST_NPM_SCRIPT:-check:integration-coverage}
1717
COMPRESSOR=${COMPRESSOR:-}
1818
SKIP_DEPS=${SKIP_DEPS:-true}
1919

20-
if [[ -n "${CLIENT_ENCRYPTION}" ]]; then
20+
if [ "${CLIENT_ENCRYPTION}" == "true" ]; then
2121
export RUN_WITH_MONGOCRYPTD
2222
source .evergreen/setup-fle.sh
23+
elif [ "${CLIENT_ENCRYPTION}" != "false" ]; then
24+
echo "Invalid configuration for CLIENT_ENCRYPTION: ${CLIENT_ENCRYPTION}"
25+
exit 1
2326
fi
2427

2528
# ssl setup

0 commit comments

Comments
 (0)