Skip to content

Commit 854b66e

Browse files
RUBY-3956 Support private S3 "latest" server downloads (#3109)
1 parent 6375dc6 commit 854b66e

5 files changed

Lines changed: 50 additions & 4 deletions

File tree

‎.evergreen/README.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ This directory contains configuration and scripts used to run the driver's
44
test suite in Evergreen, MongoDB's continuous integration system.
55

66

7+
## Downloading "latest" server binaries
8+
9+
`MONGODB_VERSION=latest` (and `latest-build`) downloads an unpublished nightly
10+
build from MongoDB's private `origin-mongodb-server-latest` S3 bucket, so it
11+
requires an AWS identity. In Evergreen the global `pre` block assumes
12+
`aws_test_secrets_role` and `bootstrap-mongo-orchestration` forwards the
13+
resulting credentials into the download subprocess. Locally, including the
14+
Docker test runner, set `AWS_PROFILE` to a profile that has the Drivers test
15+
secrets credentials and refresh it with `aws sso login --profile "$AWS_PROFILE"`:
16+
see the drivers-evergreen-tools
17+
[Secrets Handling](https://github.com/mongodb-labs/drivers-evergreen-tools/blob/master/.evergreen/secrets_handling/README.md)
18+
docs. Any other version, such as `latest-stable` or a pinned release like
19+
`8.0`, is downloaded from the public hosts and needs no AWS access; that is
20+
also the default used by `run-mongodb.sh`.
21+
22+
723
## Scheduled ruby-dev build (RUBY-3731)
824

925
The `ruby-dev` build variant runs the main test suite against the upcoming,

‎.evergreen/config.yml‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ functions:
145145
env:
146146
MONGODB_VERSION: ${MONGODB_VERSION}
147147
include_expansions_in_env: [TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE,
148-
REQUIRE_API_VERSION, LOAD_BALANCER]
148+
REQUIRE_API_VERSION, LOAD_BALANCER,
149+
# Needed to download "latest"/"latest-build" from the private S3
150+
# bucket (DRIVERS-3628). Any other version needs no AWS access.
151+
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
149152
args: ["${DRIVERS_TOOLS}/.evergreen/run-mongodb.sh", "start"]
150153
- command: expansions.update
151154
params:
@@ -166,6 +169,9 @@ functions:
166169
params:
167170
shell: bash
168171
working_dir: "src"
172+
# Needed to download "latest"/"latest-build" from the private S3
173+
# bucket (DRIVERS-3628). Any other version needs no AWS access.
174+
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
169175
script: |
170176
${PREPARE_SHELL}
171177
export CSOT_SPEC_TESTS=1
@@ -178,6 +184,9 @@ functions:
178184
params:
179185
shell: bash
180186
working_dir: "src"
187+
# Needed to download "latest"/"latest-build" from the private S3
188+
# bucket (DRIVERS-3628). Any other version needs no AWS access.
189+
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
181190
script: |
182191
${PREPARE_SHELL}
183192
export OTEL_SPEC_TESTS=1
@@ -280,6 +289,9 @@ functions:
280289
params:
281290
shell: bash
282291
working_dir: "src"
292+
# Needed to download "latest"/"latest-build" from the private S3
293+
# bucket (DRIVERS-3628). Any other version needs no AWS access.
294+
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
283295
script: |
284296
${PREPARE_SHELL}
285297
TEST_CMD="bundle exec rake driver_bench" PERFORMANCE_RESULTS_FILE="$PROJECT_DIRECTORY/perf.json" .evergreen/run-tests.sh
@@ -302,6 +314,9 @@ functions:
302314
params:
303315
shell: bash
304316
working_dir: "src"
317+
# Needed to download "latest"/"latest-build" from the private S3
318+
# bucket (DRIVERS-3628). Any other version needs no AWS access.
319+
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
305320
script: |
306321
${PREPARE_SHELL}
307322
if [ -n "${FLE}" ]; then

‎.evergreen/config/common.yml.erb‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ functions:
142142
env:
143143
MONGODB_VERSION: ${MONGODB_VERSION}
144144
include_expansions_in_env: [TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE,
145-
REQUIRE_API_VERSION, LOAD_BALANCER]
145+
REQUIRE_API_VERSION, LOAD_BALANCER,
146+
# Needed to download "latest"/"latest-build" from the private S3
147+
# bucket (DRIVERS-3628). Any other version needs no AWS access.
148+
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
146149
args: ["${DRIVERS_TOOLS}/.evergreen/run-mongodb.sh", "start"]
147150
- command: expansions.update
148151
params:
@@ -163,6 +166,9 @@ functions:
163166
params:
164167
shell: bash
165168
working_dir: "src"
169+
# Needed to download "latest"/"latest-build" from the private S3
170+
# bucket (DRIVERS-3628). Any other version needs no AWS access.
171+
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
166172
script: |
167173
${PREPARE_SHELL}
168174
export CSOT_SPEC_TESTS=1
@@ -175,6 +181,9 @@ functions:
175181
params:
176182
shell: bash
177183
working_dir: "src"
184+
# Needed to download "latest"/"latest-build" from the private S3
185+
# bucket (DRIVERS-3628). Any other version needs no AWS access.
186+
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
178187
script: |
179188
${PREPARE_SHELL}
180189
export OTEL_SPEC_TESTS=1
@@ -277,6 +286,9 @@ functions:
277286
params:
278287
shell: bash
279288
working_dir: "src"
289+
# Needed to download "latest"/"latest-build" from the private S3
290+
# bucket (DRIVERS-3628). Any other version needs no AWS access.
291+
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
280292
script: |
281293
${PREPARE_SHELL}
282294
TEST_CMD="bundle exec rake driver_bench" PERFORMANCE_RESULTS_FILE="$PROJECT_DIRECTORY/perf.json" .evergreen/run-tests.sh
@@ -299,6 +311,9 @@ functions:
299311
params:
300312
shell: bash
301313
working_dir: "src"
314+
# Needed to download "latest"/"latest-build" from the private S3
315+
# bucket (DRIVERS-3628). Any other version needs no AWS access.
316+
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
302317
script: |
303318
${PREPARE_SHELL}
304319
if [ -n "${FLE}" ]; then

‎.mod/drivers-evergreen-tools‎

‎spec/shared‎

0 commit comments

Comments
 (0)