Skip to content

Commit 5f27c26

Browse files
committed
more cleanup
1 parent fd4bc37 commit 5f27c26

File tree

3 files changed

+112
-139
lines changed

3 files changed

+112
-139
lines changed

.evergreen/config.yml

Lines changed: 71 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ exec_timeout_secs: 3600
2020

2121
# What to do when evergreen hits the timeout (`post:` tasks are run automatically)
2222
timeout:
23-
- command: shell.exec
23+
- command: subprocess.exec
2424
params:
25-
shell: "bash"
26-
script: |
27-
ls -la
25+
binary: bash
26+
args: [ls, -la]
27+
2828
functions:
2929
setup-system:
3030
# Executes clone and applies the submitted patch, if any
@@ -101,24 +101,24 @@ functions:
101101
bucket: ${aws_bucket}
102102
permissions: public-read
103103
content_type: ${content_type|text/plain}
104-
display_name: "test_suite.tgz"
104+
display_name: test_suite.tgz
105105

106106
bootstrap-mongohoused:
107107
- command: subprocess.exec
108108
params:
109-
binary: "bash"
109+
binary: bash
110110
args:
111111
- ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/pull-mongohouse-image.sh
112112
- command: subprocess.exec
113113
params:
114-
binary: "bash"
114+
binary: bash
115115
args:
116116
- ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/run-mongohouse-image.sh
117117

118118
bootstrap-mongo-orchestration:
119119
- command: subprocess.exec
120120
params:
121-
binary: "bash"
121+
binary: bash
122122
env:
123123
MONGODB_VERSION: ${VERSION}
124124
include_expansions_in_env: [TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE,
@@ -131,7 +131,7 @@ functions:
131131
ocsp-bootstrap-mongo-orchestration:
132132
- command: subprocess.exec
133133
params:
134-
binary: "bash"
134+
binary: bash
135135
env:
136136
MONGODB_VERSION: ${VERSION}
137137
include_expansions_in_env: [TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE]
@@ -143,18 +143,18 @@ functions:
143143
teardown:
144144
- command: subprocess.exec
145145
params:
146-
binary: "bash"
146+
binary: bash
147147
args:
148148
# Ensure the instance profile is reassigned for aws tests.
149149
- ${DRIVERS_TOOLS}/.evergreen/auth_aws/teardown.sh
150150
- command: subprocess.exec
151151
params:
152-
binary: "bash"
152+
binary: bash
153153
args:
154154
- ${DRIVERS_TOOLS}/.evergreen/csfle/teardown.sh
155155
- command: subprocess.exec
156156
params:
157-
binary: "bash"
157+
binary: bash
158158
args:
159159
- ${DRIVERS_TOOLS}/.evergreen/teardown.sh
160160

@@ -170,7 +170,7 @@ functions:
170170
binary: bash
171171
env:
172172
OIDC: oidc
173-
include_expansions_in_env: ["DRIVERS_TOOLS", "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
173+
include_expansions_in_env: [DRIVERS_TOOLS, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
174174
args: ["${RUN_TASK}", test-oidc]
175175

176176
run-task:
@@ -204,40 +204,40 @@ functions:
204204
- command: subprocess.exec
205205
type: test
206206
params:
207-
binary: "bash"
207+
binary: bash
208208
env:
209-
BASE_SHA: ${revision}
210-
HEAD_SHA: ${github_commit}
209+
BASE_SHA: "${revision}"
210+
HEAD_SHA: "${github_commit}"
211211
args: ["${RUN_TASK}", api-report]
212212

213213
"add PR labels":
214214
- command: subprocess.exec
215215
type: test
216216
params:
217-
binary: "bash"
217+
binary: bash
218218
env:
219-
COMMIT: ${github_commit}
220-
PR_TASK: "apply-labels"
219+
COMMIT: "${github_commit}"
220+
PR_TASK: apply-labels
221221
args: ["${RUN_TASK}", pr-task]
222222

223223
"add PR reviewer":
224224
- command: subprocess.exec
225225
type: test
226226
params:
227-
binary: "bash"
227+
binary: bash
228228
env:
229-
COMMIT: ${github_commit}
230-
PR_TASK: "assign-reviewer"
229+
COMMIT: "${github_commit}"
230+
PR_TASK: assign-reviewer
231231
args: ["${RUN_TASK}", pr-task]
232232

233233
"backport pr":
234234
- command: subprocess.exec
235235
type: test
236236
params:
237-
binary: "bash"
237+
binary: bash
238238
env:
239-
COMMIT: ${github_commit}
240-
PR_TASK: "backport-pr"
239+
COMMIT: "${github_commit}"
240+
PR_TASK: backport-pr
241241
args: ["${RUN_TASK}", pr-task]
242242

243243
send-perf-data:
@@ -252,13 +252,13 @@ functions:
252252
- command: subprocess.exec
253253
type: test
254254
params:
255-
binary: "bash"
256-
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
255+
binary: bash
256+
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
257257
args: ["${RUN_TASK}", setup-test, --, enterprise-plain]
258258
- command: subprocess.exec
259259
type: test
260260
params:
261-
binary: "bash"
261+
binary: bash
262262
args: ["${RUN_TASK}", --silent, evg-test-enterprise-auth]
263263

264264
run-enterprise-gssapi-auth-tests:
@@ -268,13 +268,13 @@ functions:
268268
- command: subprocess.exec
269269
type: test
270270
params:
271-
binary: "bash"
272-
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
271+
binary: bash
272+
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
273273
args: ["${RUN_TASK}", setup-test, --, enterprise-gssapi]
274274
- command: subprocess.exec
275275
type: test
276276
params:
277-
binary: "bash"
277+
binary: bash
278278
args: ["${RUN_TASK}", --silent, evg-test-enterprise-auth]
279279

280280
run-atlas-test:
@@ -284,13 +284,13 @@ functions:
284284
- command: subprocess.exec
285285
type: test
286286
params:
287-
binary: "bash"
288-
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
287+
binary: bash
288+
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
289289
args: ["${RUN_TASK}", setup-test, --, atlas-connect]
290290
- command: subprocess.exec
291291
type: test
292292
params:
293-
binary: "bash"
293+
binary: bash
294294
args: ["${RUN_TASK}", test-atlas-connect]
295295

296296
run-ocsp-test:
@@ -316,49 +316,30 @@ functions:
316316
- command: subprocess.exec
317317
type: test
318318
params:
319-
binary: "bash"
319+
binary: bash
320320
env:
321-
GO_BUILD_TAGS: "cse"
322-
include_expansions_in_env: ["AUTH", "SSL", "MONGODB_URI", "TOPOLOGY",
323-
"MONGO_GO_DRIVER_COMPRESSOR", "REQUIRE_API_VERSION",
324-
"SKIP_CRYPT_SHARED_LIB", "CRYPT_SHARED_LIB_PATH"]
321+
GO_BUILD_TAGS: cse
322+
include_expansions_in_env: [AUTH, SSL, MONGODB_URI, TOPOLOGY, MONGO_GO_DRIVER_COMPRESSOR,
323+
REQUIRE_API_VERSION, SKIP_CRYPT_SHARED_LIB, CRYPT_SHARED_LIB_PATH]
325324
args: ["${RUN_TASK}", setup-test]
326325
- command: subprocess.exec
327326
type: test
328327
params:
329-
binary: "bash"
328+
binary: bash
330329
args: ["${RUN_TASK}", evg-test-versioned-api]
331330

332331
run-load-balancer-tests:
333-
- command: shell.exec
332+
- command: subprocess.exec
334333
type: test
335334
params:
336-
shell: "bash"
337-
working_dir: src/go.mongodb.org/mongo-driver
338-
script: |
339-
# Verify that the required LB URI expansions are set to ensure that the test runner can correctly connect to
340-
# the LBs.
341-
if [ -z "${SINGLE_MONGOS_LB_URI}" ]; then
342-
echo "SINGLE_MONGOS_LB_URI must be set for testing against LBs"
343-
exit 1
344-
fi
345-
if [ -z "${MULTI_MONGOS_LB_URI}" ]; then
346-
echo "MULTI_MONGOS_LB_URI must be set for testing against LBs"
347-
exit 1
348-
fi
349-
350-
# Per the LB testing spec, the URI of an LB fronting a single mongos should be used to configure internal
351-
# testing Client instances, so we set MONGODB_URI to SINGLE_MONGOS_LB_URI.
352-
AUTH="${AUTH}" \
353-
SSL="${SSL}" \
354-
MONGODB_URI="${SINGLE_MONGOS_LB_URI}" \
355-
TOPOLOGY="${TOPOLOGY}" \
356-
MONGO_GO_DRIVER_COMPRESSOR=${MONGO_GO_DRIVER_COMPRESSOR} \
357-
${RUN_TASK} setup-test
358-
359-
SINGLE_MONGOS_LB_URI="${SINGLE_MONGOS_LB_URI}" \
360-
MULTI_MONGOS_LB_URI="${MULTI_MONGOS_LB_URI}" \
361-
${RUN_TASK} evg-test-load-balancers
335+
binary: bash
336+
include_expansions_in_env: [SINGLE_MONGOS_LB_URI, MULTI_MONGOS_LB_URI, AUTH, SSL, MONGO_GO_DRIVER_COMPRESSOR]
337+
args: ["${RUN_TASK}", setup-test, --, load-balancer]
338+
- command: subprocess.exec
339+
type: test
340+
params:
341+
binary: bash
342+
args: ["${RUN_TASK}", evg-test-load-balancers]
362343

363344
run-serverless-tests:
364345
- command: subprocess.exec
@@ -482,7 +463,8 @@ functions:
482463
type: test
483464
params:
484465
binary: "bash"
485-
include_expansions_in_env: ["TEST_INDEX_URI"]
466+
env:
467+
TEST_SEARCH_INDEX: "${MONGODB_URI}"
486468
args: ["${RUN_TASK}", evg-test-search-index]
487469

488470
add-aws-auth-variables-to-file:
@@ -512,17 +494,12 @@ functions:
512494
args: ["${RUN_TASK}", evg-test-aws, --, assume-role]
513495

514496
run-aws-auth-test-with-aws-EC2-credentials:
515-
- command: shell.exec
497+
- command: subprocess.exec
516498
type: test
517499
params:
518-
shell: "bash"
519-
working_dir: src/go.mongodb.org/mongo-driver
520-
script: |
521-
if [ "${SKIP_EC2_AUTH_TEST}" = "true" ]; then
522-
echo "This platform does not support the EC2 auth test, skipping..."
523-
exit 0
524-
fi
525-
${RUN_TASK} evg-test-aws -- ec2
500+
binary: bash
501+
include_expansions_in_env: [SKIP_EC2_AUTH_TEST]
502+
args: ["${RUN_TASK}", evg-test-aws, --, ec2]
526503

527504
run-aws-auth-test-with-aws-credentials-as-environment-variables:
528505
- command: subprocess.exec
@@ -544,33 +521,24 @@ functions:
544521
params:
545522
binary: "bash"
546523
working_dir: src
547-
include_expansions_in_env: ["SKIP_ECS_AUTH_TEST"]
524+
include_expansions_in_env: [SKIP_ECS_AUTH_TEST]
548525
args: ["${RUN_TASK}", evg-test-aws-ecs]
549526

550527
run-aws-auth-test-with-aws-web-identity-credentials:
551-
- command: shell.exec
528+
- command: subprocess.exec
552529
type: test
553530
params:
554-
shell: "bash"
555-
working_dir: src/go.mongodb.org/mongo-driver
556-
script: |
557-
if [ "${SKIP_WEB_IDENTITY_AUTH_TEST}" = "true" ]; then
558-
echo "This platform does not support the web identity auth test, skipping..."
559-
exit 0
560-
fi
561-
${RUN_TASK} evg-test-aws -- web-identity
562-
- command: shell.exec
531+
binary: bash
532+
include_expansions_in_env: [SKIP_WEB_IDENTITY_AUTH_TEST]
533+
args: ["${RUN_TASK}", evg-test-aws, --, web-identity]
534+
- command: subprocess.exec
563535
type: test
564536
params:
565-
shell: "bash"
566-
working_dir: src/go.mongodb.org/mongo-driver
567-
script: |
568-
if [ "${SKIP_WEB_IDENTITY_AUTH_TEST}" = "true" ]; then
569-
echo "This platform does not support the web identity auth test, skipping..."
570-
exit 0
571-
fi
572-
export AWS_ROLE_SESSION_NAME="test"
573-
${RUN_TASK} evg-test-aws -- web-identity
537+
binary: bash
538+
env:
539+
AWS_ROLE_SESSION_NAME: test
540+
include_expansions_in_env: [SKIP_WEB_IDENTITY_AUTH_TEST]
541+
args: ["${RUN_TASK}", evg-test-aws, --, web-identity]
574542

575543
start-cse-servers:
576544
- command: ec2.assume_role
@@ -1910,30 +1878,6 @@ task_groups:
19101878
- command: expansions.update
19111879
params:
19121880
file: serverless-expansion.yml
1913-
- command: shell.exec
1914-
params:
1915-
shell: "bash"
1916-
script: |
1917-
# Find the crypt_shared library file in the current directory and set the CRYPT_SHARED_LIB_PATH to
1918-
# the path of that file. Only look for .so, .dll, or .dylib files to prevent matching any other
1919-
# downloaded files.
1920-
CRYPT_SHARED_LIB_PATH="$(find $(pwd) -maxdepth 1 -type f \
1921-
-name 'mongo_crypt_v1.so' -o \
1922-
-name 'mongo_crypt_v1.dll' -o \
1923-
-name 'mongo_crypt_v1.dylib')"
1924-
1925-
# If we're on Windows, convert the "cygdrive" path to Windows-style paths.
1926-
if [ "Windows_NT" = "$OS" ]; then
1927-
CRYPT_SHARED_LIB_PATH=$(cygpath -m $CRYPT_SHARED_LIB_PATH)
1928-
fi
1929-
1930-
echo "CRYPT_SHARED_LIB_PATH: $CRYPT_SHARED_LIB_PATH" >> crypt-expansion.yml
1931-
1932-
# Load the expansion file to make an evergreen variable with the current unique version
1933-
- command: expansions.update
1934-
params:
1935-
file: crypt-expansion.yml
1936-
19371881
teardown_group:
19381882
- command: subprocess.exec
19391883
params:
@@ -1973,14 +1917,13 @@ task_groups:
19731917
setup_group_timeout_secs: 1800 # 30 minutes
19741918
setup_group:
19751919
- func: setup-system
1976-
- command: shell.exec
1920+
- command: subprocess.exec
19771921
params:
1978-
shell: "bash"
1979-
script: |
1980-
export AZUREKMS_VMNAME_PREFIX="GODRIVER"
1981-
# Get azurekms credentials from the vault.
1982-
. ${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/setup-secrets.sh
1983-
${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/create-and-setup-vm.sh
1922+
binary: bash
1923+
env:
1924+
AZUREKMS_VMNAME_PREFIX: GODRIVER
1925+
args:
1926+
- ${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/setup.sh
19841927
teardown_group:
19851928
- command: subprocess.exec
19861929
params:
@@ -2107,15 +2050,6 @@ task_groups:
21072050
- command: expansions.update
21082051
params:
21092052
file: src/go.mongodb.org/mongo-driver/atlas-expansion.yml
2110-
- command: shell.exec
2111-
params:
2112-
working_dir: src/go.mongodb.org/mongo-driver
2113-
shell: bash
2114-
script: |-
2115-
echo "TEST_INDEX_URI: ${MONGODB_URI}" > atlas-expansion.yml
2116-
- command: expansions.update
2117-
params:
2118-
file: src/go.mongodb.org/mongo-driver/atlas-expansion.yml
21192053
teardown_group:
21202054
- command: subprocess.exec
21212055
params:

0 commit comments

Comments
 (0)