Skip to content

Commit 3359737

Browse files
authored
RUBY-3652 Remove serverless testing (mongodb#2942)
* RUBY-3652 Remove serverless testing * don't kill all server sessions for the atlas full tests
1 parent 96d5cf5 commit 3359737

File tree

7 files changed

+58
-275
lines changed

7 files changed

+58
-275
lines changed

.evergreen/config.yml

Lines changed: 0 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -120,19 +120,7 @@ functions:
120120
export ATLAS_FREE_TIER_URI="${atlas_free_tier_uri}"
121121
export ATLAS_TLS11_URI="${atlas_tls11_uri}"
122122
export ATLAS_TLS12_URI="${atlas_tls12_uri}"
123-
export ATLAS_SERVERLESS_URI="${atlas_serverless_uri}"
124-
export ATLAS_SERVERLESS_LB_URI="${atlas_serverless_lb_uri}"
125-
export ATLAS_X509_CERT_BASE64="${atlas_x509_cert_base64}"
126-
export ATLAS_X509_URI="${atlas_x509}"
127-
export ATLAS_X509_DEV_CERT_BASE64="${atlas_x509_dev_cert_base64}"
128-
export ATLAS_X509_DEV_URI="${atlas_x509_dev}"
129123
export RVM_RUBY="${RVM_RUBY}"
130-
131-
export SERVERLESS_DRIVERS_GROUP="${SERVERLESS_DRIVERS_GROUP}"
132-
export SERVERLESS_API_PUBLIC_KEY="${SERVERLESS_API_PUBLIC_KEY}"
133-
export SERVERLESS_API_PRIVATE_KEY="${SERVERLESS_API_PRIVATE_KEY}"
134-
export SERVERLESS_ATLAS_USER="${SERVERLESS_ATLAS_USER}"
135-
export SERVERLESS_ATLAS_PASSWORD="${SERVERLESS_ATLAS_PASSWORD}"
136124
EOT
137125
138126
# See what we've done
@@ -364,17 +352,6 @@ functions:
364352
script: |
365353
rm -f .env.private
366354
367-
"build and test docker image":
368-
- command: shell.exec
369-
type: test
370-
params:
371-
shell: bash
372-
working_dir: "src"
373-
script: |
374-
${PREPARE_SHELL}
375-
set -x
376-
.evergreen/test-on-docker -d ${os} MONGODB_VERSION=${mongodb-version} TOPOLOGY=${topology} RVM_RUBY=${ruby} -s .evergreen/run-tests.sh TEST_CMD=true ${PRELOAD_ARG}
377-
378355
"run benchmarks":
379356
- command: shell.exec
380357
type: test
@@ -405,23 +382,6 @@ functions:
405382
fi
406383
.evergreen/run-tests.sh
407384
408-
"run tests via docker":
409-
- command: shell.exec
410-
type: test
411-
params:
412-
shell: bash
413-
working_dir: "src"
414-
script: |
415-
${PREPARE_SHELL}
416-
# Needed for generating temporary aws credentials.
417-
if [ -n "${FLE}" ];
418-
then
419-
export AWS_ACCESS_KEY_ID="${fle_aws_key}"
420-
export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}"
421-
export AWS_DEFAULT_REGION="${fle_aws_region}"
422-
fi
423-
.evergreen/run-tests-docker.sh
424-
425385
"run AWS auth tests":
426386
- command: shell.exec
427387
type: test
@@ -442,16 +402,6 @@ functions:
442402
${PREPARE_SHELL}
443403
.evergreen/run-tests-kerberos-unit.sh
444404
445-
"run Kerberos integration tests":
446-
- command: shell.exec
447-
type: test
448-
params:
449-
shell: bash
450-
working_dir: "src"
451-
script: |
452-
${PREPARE_SHELL}
453-
.evergreen/run-tests-kerberos-integration.sh
454-
455405
"run Atlas tests":
456406
- command: shell.exec
457407
type: test
@@ -471,24 +421,6 @@ functions:
471421
ATLAS_X509_DEV_URI="${atlas_x509_dev}" \
472422
.evergreen/run-tests-atlas.sh
473423
474-
"run serverless tests":
475-
- command: shell.exec
476-
type: test
477-
params:
478-
shell: bash
479-
working_dir: "src"
480-
script: |
481-
${PREPARE_SHELL}
482-
# Needed for generating temporary aws credentials.
483-
if [ -n "${FLE}" ];
484-
then
485-
export AWS_ACCESS_KEY_ID="${fle_aws_key}"
486-
export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}"
487-
export AWS_DEFAULT_REGION="${fle_aws_region}"
488-
fi
489-
490-
CRYPT_SHARED_LIB_PATH="${CRYPT_SHARED_LIB_PATH}" SERVERLESS=1 SSL=ssl RVM_RUBY="${RVM_RUBY}" SINGLE_MONGOS="${SINGLE_MONGOS}" SERVERLESS_URI="${SERVERLESS_URI}" FLE="${FLE}" SERVERLESS_MONGODB_VERSION="${SERVERLESS_MONGODB_VERSION}" .evergreen/run-tests-serverless.sh
491-
492424
pre:
493425
- func: "fetch source"
494426
- func: "create expansions"
@@ -502,35 +434,6 @@ post:
502434
- func: "upload test results to s3"
503435

504436
task_groups:
505-
- name: serverless_task_group
506-
setup_group_can_fail_task: true
507-
setup_group_timeout_secs: 1800 # 30 minutes
508-
setup_group:
509-
- func: "fetch source"
510-
- func: "create expansions"
511-
- command: ec2.assume_role
512-
params:
513-
role_arn: ${aws_test_secrets_role}
514-
- command: shell.exec
515-
params:
516-
shell: "bash"
517-
script: |
518-
${PREPARE_SHELL}
519-
bash ${DRIVERS_TOOLS}/.evergreen/serverless/setup-secrets.sh
520-
bash ${DRIVERS_TOOLS}/.evergreen/serverless/create-instance.sh
521-
- command: expansions.update
522-
params:
523-
file: serverless-expansion.yml
524-
teardown_task:
525-
- command: shell.exec
526-
params:
527-
script: |
528-
${PREPARE_SHELL}
529-
bash ${DRIVERS_TOOLS}/.evergreen/serverless/delete-instance.sh
530-
- func: "upload test results"
531-
tasks:
532-
- "test-serverless"
533-
534437
- name: testatlas_full_task_group
535438
setup_group_can_fail_task: true
536439
setup_group_timeout_secs: 1800 # 30 minutes
@@ -716,26 +619,12 @@ tasks:
716619
- name: "test-atlas"
717620
commands:
718621
- func: "run Atlas tests"
719-
- name: "test-serverless"
720-
commands:
721-
- func: "export FLE credentials"
722-
- func: "run serverless tests"
723-
- name: "test-docker"
724-
commands:
725-
- func: "build and test docker image"
726622
- name: "test-mlaunch"
727623
commands:
728624
- func: "run tests"
729625
- name: "driver-bench"
730626
commands:
731627
- func: "run benchmarks"
732-
- name: "test-via-docker"
733-
commands:
734-
- func: "run tests via docker"
735-
- name: "test-kerberos-integration"
736-
commands:
737-
- func: "export Kerberos credentials"
738-
- func: "run Kerberos integration tests"
739628
- name: "test-kerberos"
740629
commands:
741630
- func: "run Kerberos unit tests"
@@ -746,10 +635,6 @@ tasks:
746635
commands:
747636
- func: "export FLE credentials"
748637
- func: "run tests"
749-
- name: "test-fle-via-docker"
750-
commands:
751-
- func: "export FLE credentials"
752-
- func: "run tests via docker"
753638
- name: "test-aws-auth"
754639
commands:
755640
- func: "export AWS auth credentials"

.evergreen/config/common.yml.erb

Lines changed: 0 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,7 @@ functions:
117117
export ATLAS_FREE_TIER_URI="${atlas_free_tier_uri}"
118118
export ATLAS_TLS11_URI="${atlas_tls11_uri}"
119119
export ATLAS_TLS12_URI="${atlas_tls12_uri}"
120-
export ATLAS_SERVERLESS_URI="${atlas_serverless_uri}"
121-
export ATLAS_SERVERLESS_LB_URI="${atlas_serverless_lb_uri}"
122-
export ATLAS_X509_CERT_BASE64="${atlas_x509_cert_base64}"
123-
export ATLAS_X509_URI="${atlas_x509}"
124-
export ATLAS_X509_DEV_CERT_BASE64="${atlas_x509_dev_cert_base64}"
125-
export ATLAS_X509_DEV_URI="${atlas_x509_dev}"
126120
export RVM_RUBY="${RVM_RUBY}"
127-
128-
export SERVERLESS_DRIVERS_GROUP="${SERVERLESS_DRIVERS_GROUP}"
129-
export SERVERLESS_API_PUBLIC_KEY="${SERVERLESS_API_PUBLIC_KEY}"
130-
export SERVERLESS_API_PRIVATE_KEY="${SERVERLESS_API_PRIVATE_KEY}"
131-
export SERVERLESS_ATLAS_USER="${SERVERLESS_ATLAS_USER}"
132-
export SERVERLESS_ATLAS_PASSWORD="${SERVERLESS_ATLAS_PASSWORD}"
133121
EOT
134122

135123
# See what we've done
@@ -361,17 +349,6 @@ functions:
361349
script: |
362350
rm -f .env.private
363351

364-
"build and test docker image":
365-
- command: shell.exec
366-
type: test
367-
params:
368-
shell: bash
369-
working_dir: "src"
370-
script: |
371-
${PREPARE_SHELL}
372-
set -x
373-
.evergreen/test-on-docker -d ${os} MONGODB_VERSION=${mongodb-version} TOPOLOGY=${topology} RVM_RUBY=${ruby} -s .evergreen/run-tests.sh TEST_CMD=true ${PRELOAD_ARG}
374-
375352
"run benchmarks":
376353
- command: shell.exec
377354
type: test
@@ -402,23 +379,6 @@ functions:
402379
fi
403380
.evergreen/run-tests.sh
404381

405-
"run tests via docker":
406-
- command: shell.exec
407-
type: test
408-
params:
409-
shell: bash
410-
working_dir: "src"
411-
script: |
412-
${PREPARE_SHELL}
413-
# Needed for generating temporary aws credentials.
414-
if [ -n "${FLE}" ];
415-
then
416-
export AWS_ACCESS_KEY_ID="${fle_aws_key}"
417-
export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}"
418-
export AWS_DEFAULT_REGION="${fle_aws_region}"
419-
fi
420-
.evergreen/run-tests-docker.sh
421-
422382
"run AWS auth tests":
423383
- command: shell.exec
424384
type: test
@@ -439,16 +399,6 @@ functions:
439399
${PREPARE_SHELL}
440400
.evergreen/run-tests-kerberos-unit.sh
441401

442-
"run Kerberos integration tests":
443-
- command: shell.exec
444-
type: test
445-
params:
446-
shell: bash
447-
working_dir: "src"
448-
script: |
449-
${PREPARE_SHELL}
450-
.evergreen/run-tests-kerberos-integration.sh
451-
452402
"run Atlas tests":
453403
- command: shell.exec
454404
type: test
@@ -468,24 +418,6 @@ functions:
468418
ATLAS_X509_DEV_URI="${atlas_x509_dev}" \
469419
.evergreen/run-tests-atlas.sh
470420

471-
"run serverless tests":
472-
- command: shell.exec
473-
type: test
474-
params:
475-
shell: bash
476-
working_dir: "src"
477-
script: |
478-
${PREPARE_SHELL}
479-
# Needed for generating temporary aws credentials.
480-
if [ -n "${FLE}" ];
481-
then
482-
export AWS_ACCESS_KEY_ID="${fle_aws_key}"
483-
export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}"
484-
export AWS_DEFAULT_REGION="${fle_aws_region}"
485-
fi
486-
487-
CRYPT_SHARED_LIB_PATH="${CRYPT_SHARED_LIB_PATH}" SERVERLESS=1 SSL=ssl RVM_RUBY="${RVM_RUBY}" SINGLE_MONGOS="${SINGLE_MONGOS}" SERVERLESS_URI="${SERVERLESS_URI}" FLE="${FLE}" SERVERLESS_MONGODB_VERSION="${SERVERLESS_MONGODB_VERSION}" .evergreen/run-tests-serverless.sh
488-
489421
pre:
490422
- func: "fetch source"
491423
- func: "create expansions"
@@ -499,35 +431,6 @@ post:
499431
- func: "upload test results to s3"
500432

501433
task_groups:
502-
- name: serverless_task_group
503-
setup_group_can_fail_task: true
504-
setup_group_timeout_secs: 1800 # 30 minutes
505-
setup_group:
506-
- func: "fetch source"
507-
- func: "create expansions"
508-
- command: ec2.assume_role
509-
params:
510-
role_arn: ${aws_test_secrets_role}
511-
- command: shell.exec
512-
params:
513-
shell: "bash"
514-
script: |
515-
${PREPARE_SHELL}
516-
bash ${DRIVERS_TOOLS}/.evergreen/serverless/setup-secrets.sh
517-
bash ${DRIVERS_TOOLS}/.evergreen/serverless/create-instance.sh
518-
- command: expansions.update
519-
params:
520-
file: serverless-expansion.yml
521-
teardown_task:
522-
- command: shell.exec
523-
params:
524-
script: |
525-
${PREPARE_SHELL}
526-
bash ${DRIVERS_TOOLS}/.evergreen/serverless/delete-instance.sh
527-
- func: "upload test results"
528-
tasks:
529-
- "test-serverless"
530-
531434
- name: testatlas_full_task_group
532435
setup_group_can_fail_task: true
533436
setup_group_timeout_secs: 1800 # 30 minutes
@@ -713,26 +616,12 @@ tasks:
713616
- name: "test-atlas"
714617
commands:
715618
- func: "run Atlas tests"
716-
- name: "test-serverless"
717-
commands:
718-
- func: "export FLE credentials"
719-
- func: "run serverless tests"
720-
- name: "test-docker"
721-
commands:
722-
- func: "build and test docker image"
723619
- name: "test-mlaunch"
724620
commands:
725621
- func: "run tests"
726622
- name: "driver-bench"
727623
commands:
728624
- func: "run benchmarks"
729-
- name: "test-via-docker"
730-
commands:
731-
- func: "run tests via docker"
732-
- name: "test-kerberos-integration"
733-
commands:
734-
- func: "export Kerberos credentials"
735-
- func: "run Kerberos integration tests"
736625
- name: "test-kerberos"
737626
commands:
738627
- func: "run Kerberos unit tests"
@@ -743,10 +632,6 @@ tasks:
743632
commands:
744633
- func: "export FLE credentials"
745634
- func: "run tests"
746-
- name: "test-fle-via-docker"
747-
commands:
748-
- func: "export FLE credentials"
749-
- func: "run tests via docker"
750635
- name: "test-aws-auth"
751636
commands:
752637
- func: "export AWS auth credentials"

.evergreen/run-tests-atlas-full.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ set_env_ruby
1313
bundle_install
1414

1515
ATLAS_URI=$MONGODB_URI \
16-
SERVERLESS=1 \
16+
KILL_ALL_SERVER_SESSIONS=0 \
1717
EXAMPLE_TIMEOUT=600 \
1818
bundle exec rspec -fd spec/integration/search_indexes_prose_spec.rb
1919

spec/runners/crud.rb

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,12 @@ def define_spec_tests_with_requirements(spec, &block)
224224
if req.topologies
225225
require_topology *req.topologies
226226
end
227-
if SpecConfig.instance.serverless? && req.serverless == :forbid
228-
before(:all) do
229-
skip "Serverless forbidden"
230-
end
231-
end
232-
if !SpecConfig.instance.serverless? && req.serverless == :require
227+
228+
# Once `serverless: require` is no longer present in any specs,
229+
# this can be removed.
230+
if req.serverless == :require
233231
before(:all) do
234-
skip "Serverless required"
232+
skip 'Serverless tests are no longer enabled, per RUBY-3652'
235233
end
236234
end
237235

0 commit comments

Comments
 (0)