Skip to content

Commit 1a9c0f8

Browse files
RUBY-3727 Use orchestration in simple configurations (#2966)
1 parent 0b3078e commit 1a9c0f8

File tree

8 files changed

+257
-213
lines changed

8 files changed

+257
-213
lines changed

.evergreen/config.yml

Lines changed: 100 additions & 107 deletions
Large diffs are not rendered by default.

.evergreen/config/axes.yml.erb

Lines changed: 32 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
11
axes:
2-
3-
- id: preload
4-
display_name: Preload server
5-
values:
6-
- id: nopreload
7-
display_name: Do not preload
8-
- id: preload
9-
display_name: Preload
10-
variables:
11-
PRELOAD_ARG: -p
12-
132
- id: "mongodb-version"
143
display_name: MongoDB Version
154
values:
@@ -63,23 +52,29 @@ axes:
6352
- id: "standalone"
6453
display_name: Standalone
6554
variables:
66-
TOPOLOGY: standalone
55+
TOPOLOGY: server
56+
MLAUNCH_TOPOLOGY: standalone
6757
- id: "replica-set"
6858
display_name: Replica Set
6959
variables:
70-
TOPOLOGY: replica-set
60+
TOPOLOGY: replica_set
61+
MLAUNCH_TOPOLOGY: replica-set
7162
- id: "replica-set-single-node"
7263
display_name: Replica Set (Single Node)
7364
variables:
7465
TOPOLOGY: replica-set-single-node
66+
MLAUNCH_TOPOLOGY: replica-set-single-node
7567
- id: "sharded-cluster"
7668
display_name: Sharded
7769
variables:
78-
TOPOLOGY: sharded-cluster
70+
TOPOLOGY: sharded_cluster
71+
MLAUNCH_TOPOLOGY: sharded-cluster
7972
- id: "load-balanced"
8073
display_name: Load Balanced
8174
variables:
82-
TOPOLOGY: load-balanced
75+
TOPOLOGY: sharded_cluster
76+
MLAUNCH_TOPOLOGY: sharded-cluster
77+
LOAD_BALANCED: 'true'
8378

8479
- id: "single-mongos"
8580
display_name: Single Mongos
@@ -96,22 +91,22 @@ axes:
9691
display_name: Auth SSL
9792
variables:
9893
AUTH: "auth"
99-
SSL: "ssl"
94+
SSL: "yes"
10095
- id: "auth-and-nossl"
10196
display_name: Auth NoSSL
10297
variables:
10398
AUTH: "auth"
10499
- id: "noauth-and-ssl"
105100
display_name: NoAuth SSL
106101
variables:
107-
SSL: "ssl"
102+
SSL: "yes"
108103
- id: "noauth-and-nossl"
109104
display_name: NoAuth NoSSL
110105
- id: "x509"
111106
display_name: X.509
112107
variables:
113108
AUTH: "x509"
114-
SSL: "ssl"
109+
SSL: "yes"
115110
- id: kerberos
116111
display_name: Kerberos
117112
variables:
@@ -140,6 +135,14 @@ axes:
140135
- id: "ruby"
141136
display_name: Ruby Version
142137
values:
138+
- id: "ruby-dev"
139+
display_name: ruby-dev
140+
variables:
141+
RVM_RUBY: "ruby-dev"
142+
- id: "ruby-3.5"
143+
display_name: ruby-3.5
144+
variables:
145+
RVM_RUBY: "ruby-3.5"
143146
- id: "ruby-3.4"
144147
display_name: ruby-3.4
145148
variables:
@@ -168,25 +171,22 @@ axes:
168171
display_name: ruby-2.7
169172
variables:
170173
RVM_RUBY: "ruby-2.7"
171-
- id: "ruby-head"
172-
display_name: ruby-head
173-
variables:
174-
RVM_RUBY: "ruby-head"
175-
- id: "jruby-9.3"
176-
display_name: jruby-9.3
174+
- id: "jruby-10"
175+
display_name: jruby-10
177176
variables:
178-
RVM_RUBY: "jruby-9.3"
177+
RVM_RUBY: "jruby-10"
179178
- id: "jruby-9.4"
180179
display_name: jruby-9.4
181180
variables:
182181
RVM_RUBY: "jruby-9.4"
182+
- id: "jruby-9.3"
183+
display_name: jruby-9.3
184+
variables:
185+
RVM_RUBY: "jruby-9.3"
183186

184187
- id: "os"
185188
display_name: OS
186189
values:
187-
- id: debian11
188-
display_name: "Debian 11"
189-
run_on: debian11-small
190190
- id: ubuntu2404
191191
display_name: "Ubuntu 24.04"
192192
run_on: ubuntu2404-small
@@ -205,16 +205,9 @@ axes:
205205
- id: ubuntu1804
206206
display_name: "Ubuntu 18.04"
207207
run_on: ubuntu1804-small
208-
209-
- id: docker-distro
210-
display_name: Docker Distro
211-
values:
212-
<% %w(debian11 ubuntu2204).each do |distro| %>
213-
- id: <%= distro %>
214-
display_name: <%= distro %>
215-
variables:
216-
DOCKER_DISTRO: <%= distro %>
217-
<% end %>
208+
- id: debian11
209+
display_name: "Debian 11"
210+
run_on: debian11-small
218211

219212
- id: "compressor"
220213
display_name: Compressor
@@ -304,15 +297,6 @@ axes:
304297
variables:
305298
BSON: min
306299

307-
- id: storage-engine
308-
display_name: Storage Engine
309-
values:
310-
- id: mmapv1
311-
display_name: MMAPv1
312-
run_on: ubuntu2004-small
313-
variables:
314-
MMAPV1: 'true'
315-
316300
- id: "fle"
317301
display_name: FLE
318302
values:
@@ -403,5 +387,6 @@ axes:
403387
display_name: Yes
404388
variables:
405389
API_VERSION_REQUIRED: 1
390+
REQUIRE_API_VERSION: 1
406391
- id: no
407392
display_name: No

.evergreen/config/common.yml.erb

Lines changed: 54 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pre_error_fails_task: true
1010
# Actual testing tasks are marked with `type: test`
1111
command_type: system
1212

13-
# Protect ourself against rogue test case, or curl gone wild, that runs forever.
13+
# Protect ourselves against rogue test case, or curl gone wild, that runs forever.
1414
exec_timeout_secs: 5400
1515

1616
# What to do when evergreen hits the timeout (`post:` tasks are run automatically)
@@ -21,6 +21,11 @@ timeout:
2121
true
2222

2323
functions:
24+
assume-test-secrets-ec2-role:
25+
- command: ec2.assume_role
26+
params:
27+
role_arn: ${aws_test_secrets_role}
28+
2429
"fetch source":
2530
# Executes git clone and applies the submitted patch, if any
2631
- command: git.get_project
@@ -34,7 +39,7 @@ functions:
3439

3540
git submodule update --init --recursive
3641

37-
"create expansions":
42+
setup-system:
3843
# Make an evergreen expansion file with dynamic values
3944
- command: shell.exec
4045
params:
@@ -85,6 +90,7 @@ functions:
8590
export AUTH=${AUTH}
8691
export SSL=${SSL}
8792
export TOPOLOGY=${TOPOLOGY}
93+
export MLAUNCH_TOPOLOGY=${MLAUNCH_TOPOLOGY}
8894
export COMPRESSOR=${COMPRESSOR}
8995
export RVM_RUBY="${RVM_RUBY}"
9096
export MONGODB_VERSION=${MONGODB_VERSION}
@@ -122,12 +128,30 @@ functions:
122128

123129
# See what we've done
124130
cat expansion.yml
125-
126131
# Load the expansion file to make an evergreen variable with the current
127132
# unique version
128133
- command: expansions.update
129134
params:
130135
file: src/expansion.yml
136+
- command: subprocess.exec
137+
params:
138+
binary: bash
139+
include_expansions_in_env: ["PROJECT_DIRECTORY"]
140+
args:
141+
- "${DRIVERS_TOOLS}/.evergreen/setup.sh"
142+
143+
bootstrap-mongo-orchestration:
144+
- command: subprocess.exec
145+
params:
146+
binary: bash
147+
env:
148+
MONGODB_VERSION: ${MONGODB_VERSION}
149+
include_expansions_in_env: [TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE,
150+
REQUIRE_API_VERSION, LOAD_BALANCER]
151+
args: ["${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh"]
152+
- command: expansions.update
153+
params:
154+
file: mo-expansion.yml
131155

132156
"export AWS auth credentials":
133157
- command: shell.exec
@@ -176,6 +200,8 @@ functions:
176200
export AWS_DEFAULT_REGION="${fle_aws_region}"
177201
fi
178202
export CSOT_SPEC_TESTS=1
203+
unset TOPOLOGY
204+
export TOPOLOGY=${MLAUNCH_TOPOLOGY}
179205
TEST_CMD="bundle exec rspec spec/spec_tests/client_side_operations_timeout_spec.rb --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml" \
180206
.evergreen/run-tests.sh
181207

@@ -252,40 +278,6 @@ functions:
252278
content_type: ${content_type|application/x-gzip}
253279
display_name: "mongodb-logs.tar.gz"
254280

255-
"upload working dir":
256-
- command: archive.targz_pack
257-
params:
258-
target: "working-dir.tar.gz"
259-
source_dir: ${PROJECT_DIRECTORY}/
260-
include:
261-
- "./**"
262-
- command: s3.put
263-
params:
264-
aws_key: ${aws_key}
265-
aws_secret: ${aws_secret}
266-
local_file: working-dir.tar.gz
267-
remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${version_id}/${build_id}/artifacts/${task_id}-${execution}-working-dir.tar.gz
268-
bucket: mciuploads
269-
permissions: public-read
270-
content_type: ${content_type|application/x-gzip}
271-
display_name: "working-dir.tar.gz"
272-
- command: archive.targz_pack
273-
params:
274-
target: "drivers-dir.tar.gz"
275-
source_dir: ${DRIVERS_TOOLS}
276-
include:
277-
- "./**"
278-
- command: s3.put
279-
params:
280-
aws_key: ${aws_key}
281-
aws_secret: ${aws_secret}
282-
local_file: drivers-dir.tar.gz
283-
remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${version_id}/${build_id}/artifacts/${task_id}-${execution}-drivers-dir.tar.gz
284-
bucket: mciuploads
285-
permissions: public-read
286-
content_type: ${content_type|application/x-gzip}
287-
display_name: "drivers-dir.tar.gz"
288-
289281
"upload test results to s3":
290282
- command: s3.put
291283
params:
@@ -357,11 +349,22 @@ functions:
357349
working_dir: "src"
358350
script: |
359351
${PREPARE_SHELL}
352+
unset TOPOLOGY
353+
export TOPOLOGY=${MLAUNCH_TOPOLOGY}
360354
TEST_CMD="bundle exec rake driver_bench" PERFORMANCE_RESULTS_FILE="$PROJECT_DIRECTORY/perf.json" .evergreen/run-tests.sh
361355
- command: perf.send
362356
params:
363357
file: "${PROJECT_DIRECTORY}/perf.json"
364358

359+
"run tests with orchestration and drivers tools":
360+
- command: subprocess.exec
361+
type: test
362+
params:
363+
binary: bash
364+
working_dir: "src"
365+
include_expansions_in_env: [MONGODB_URI, AUTH, SSL, TOPOLOGY, COMPRESSOR, RVM_RUBY]
366+
args:
367+
- ".evergreen/run-tests-new.sh"
365368
"run tests":
366369
- command: shell.exec
367370
type: test
@@ -377,6 +380,8 @@ functions:
377380
export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}"
378381
export AWS_DEFAULT_REGION="${fle_aws_region}"
379382
fi
383+
unset TOPOLOGY
384+
export TOPOLOGY=${MLAUNCH_TOPOLOGY}
380385
.evergreen/run-tests.sh
381386

382387
"run AWS auth tests":
@@ -387,6 +392,8 @@ functions:
387392
working_dir: "src"
388393
script: |
389394
${PREPARE_SHELL}
395+
unset TOPOLOGY
396+
export TOPOLOGY=${MLAUNCH_TOPOLOGY}
390397
.evergreen/run-tests-aws-auth.sh
391398

392399
"run Kerberos unit tests":
@@ -419,13 +426,12 @@ functions:
419426
.evergreen/run-tests-atlas.sh
420427

421428
pre:
429+
- func: assume-test-secrets-ec2-role
422430
- func: "fetch source"
423-
- func: "create expansions"
431+
- func: setup-system
424432

425433
post:
426434
- func: "delete private environment"
427-
# Removed, causing timeouts
428-
# - func: "upload working dir"
429435
- func: "upload mo artifacts"
430436
- func: "upload test results"
431437
- func: "upload test results to s3"
@@ -436,7 +442,7 @@ task_groups:
436442
setup_group_timeout_secs: 1800 # 30 minutes
437443
setup_group:
438444
- func: fetch source
439-
- func: create expansions
445+
- func: setup-system
440446
- command: shell.exec
441447
params:
442448
shell: "bash"
@@ -486,7 +492,7 @@ task_groups:
486492
setup_group_timeout_secs: 1800 # 30 minutes
487493
setup_group:
488494
- func: fetch source
489-
- func: create expansions
495+
- func: setup-system
490496
- command: shell.exec
491497
params:
492498
shell: "bash"
@@ -536,7 +542,7 @@ task_groups:
536542
setup_group_timeout_secs: 1800 # 30 minutes
537543
setup_group:
538544
- func: fetch source
539-
- func: "create expansions"
545+
- func: setup-system
540546
- command: shell.exec
541547
params:
542548
shell: "bash"
@@ -573,7 +579,7 @@ task_groups:
573579
setup_group_timeout_secs: 1800 # 30 minutes
574580
setup_group:
575581
- func: fetch source
576-
- func: "create expansions"
582+
- func: setup-system
577583
- command: shell.exec
578584
params:
579585
shell: "bash"
@@ -613,6 +619,10 @@ task_groups:
613619
- testazurekms-task
614620

615621
tasks:
622+
- name: "run-main-test-suite"
623+
commands:
624+
- func: bootstrap-mongo-orchestration
625+
- func: "run tests with orchestration and drivers tools"
616626
- name: "test-atlas"
617627
commands:
618628
- func: "run Atlas tests"

0 commit comments

Comments
 (0)