Skip to content

RUBY-3652 Remove serverless testing #2942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 0 additions & 111 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,7 @@ functions:
export ATLAS_FREE_TIER_URI="${atlas_free_tier_uri}"
export ATLAS_TLS11_URI="${atlas_tls11_uri}"
export ATLAS_TLS12_URI="${atlas_tls12_uri}"
export ATLAS_SERVERLESS_URI="${atlas_serverless_uri}"
export ATLAS_SERVERLESS_LB_URI="${atlas_serverless_lb_uri}"
export RVM_RUBY="${RVM_RUBY}"

export SERVERLESS_DRIVERS_GROUP="${SERVERLESS_DRIVERS_GROUP}"
export SERVERLESS_API_PUBLIC_KEY="${SERVERLESS_API_PUBLIC_KEY}"
export SERVERLESS_API_PRIVATE_KEY="${SERVERLESS_API_PRIVATE_KEY}"
export SERVERLESS_ATLAS_USER="${SERVERLESS_ATLAS_USER}"
export SERVERLESS_ATLAS_PASSWORD="${SERVERLESS_ATLAS_PASSWORD}"
EOT

# See what we've done
Expand Down Expand Up @@ -360,17 +352,6 @@ functions:
script: |
rm -f .env.private

"build and test docker image":
- command: shell.exec
type: test
params:
shell: bash
working_dir: "src"
script: |
${PREPARE_SHELL}
set -x
.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}

"run benchmarks":
- command: shell.exec
type: test
Expand Down Expand Up @@ -401,23 +382,6 @@ functions:
fi
.evergreen/run-tests.sh

"run tests via docker":
- command: shell.exec
type: test
params:
shell: bash
working_dir: "src"
script: |
${PREPARE_SHELL}
# Needed for generating temporary aws credentials.
if [ -n "${FLE}" ];
then
export AWS_ACCESS_KEY_ID="${fle_aws_key}"
export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}"
export AWS_DEFAULT_REGION="${fle_aws_region}"
fi
.evergreen/run-tests-docker.sh

"run AWS auth tests":
- command: shell.exec
type: test
Expand All @@ -438,16 +402,6 @@ functions:
${PREPARE_SHELL}
.evergreen/run-tests-kerberos-unit.sh

"run Kerberos integration tests":
- command: shell.exec
type: test
params:
shell: bash
working_dir: "src"
script: |
${PREPARE_SHELL}
.evergreen/run-tests-kerberos-integration.sh

"run Atlas tests":
- command: shell.exec
type: test
Expand All @@ -458,24 +412,6 @@ functions:
${PREPARE_SHELL}
MONGODB_URI="${MONGODB_URI}" .evergreen/run-tests-atlas.sh

"run serverless tests":
- command: shell.exec
type: test
params:
shell: bash
working_dir: "src"
script: |
${PREPARE_SHELL}
# Needed for generating temporary aws credentials.
if [ -n "${FLE}" ];
then
export AWS_ACCESS_KEY_ID="${fle_aws_key}"
export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}"
export AWS_DEFAULT_REGION="${fle_aws_region}"
fi

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

pre:
- func: "fetch source"
- func: "create expansions"
Expand All @@ -489,35 +425,6 @@ post:
- func: "upload test results to s3"

task_groups:
- name: serverless_task_group
setup_group_can_fail_task: true
setup_group_timeout_secs: 1800 # 30 minutes
setup_group:
- func: "fetch source"
- func: "create expansions"
- command: ec2.assume_role
params:
role_arn: ${aws_test_secrets_role}
- command: shell.exec
params:
shell: "bash"
script: |
${PREPARE_SHELL}
bash ${DRIVERS_TOOLS}/.evergreen/serverless/setup-secrets.sh
bash ${DRIVERS_TOOLS}/.evergreen/serverless/create-instance.sh
- command: expansions.update
params:
file: serverless-expansion.yml
teardown_task:
- command: shell.exec
params:
script: |
${PREPARE_SHELL}
bash ${DRIVERS_TOOLS}/.evergreen/serverless/delete-instance.sh
- func: "upload test results"
tasks:
- "test-serverless"

- name: testatlas_task_group
setup_group_can_fail_task: true
setup_group_timeout_secs: 1800 # 30 minutes
Expand Down Expand Up @@ -753,26 +660,12 @@ tasks:
- name: "test-atlas"
commands:
- func: "run Atlas tests"
- name: "test-serverless"
commands:
- func: "export FLE credentials"
- func: "run serverless tests"
- name: "test-docker"
commands:
- func: "build and test docker image"
- name: "test-mlaunch"
commands:
- func: "run tests"
- name: "driver-bench"
commands:
- func: "run benchmarks"
- name: "test-via-docker"
commands:
- func: "run tests via docker"
- name: "test-kerberos-integration"
commands:
- func: "export Kerberos credentials"
- func: "run Kerberos integration tests"
- name: "test-kerberos"
commands:
- func: "run Kerberos unit tests"
Expand All @@ -783,10 +676,6 @@ tasks:
commands:
- func: "export FLE credentials"
- func: "run tests"
- name: "test-fle-via-docker"
commands:
- func: "export FLE credentials"
- func: "run tests via docker"
- name: "test-aws-auth"
commands:
- func: "export AWS auth credentials"
Expand Down
111 changes: 0 additions & 111 deletions .evergreen/config/common.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,7 @@ functions:
export ATLAS_FREE_TIER_URI="${atlas_free_tier_uri}"
export ATLAS_TLS11_URI="${atlas_tls11_uri}"
export ATLAS_TLS12_URI="${atlas_tls12_uri}"
export ATLAS_SERVERLESS_URI="${atlas_serverless_uri}"
export ATLAS_SERVERLESS_LB_URI="${atlas_serverless_lb_uri}"
export RVM_RUBY="${RVM_RUBY}"

export SERVERLESS_DRIVERS_GROUP="${SERVERLESS_DRIVERS_GROUP}"
export SERVERLESS_API_PUBLIC_KEY="${SERVERLESS_API_PUBLIC_KEY}"
export SERVERLESS_API_PRIVATE_KEY="${SERVERLESS_API_PRIVATE_KEY}"
export SERVERLESS_ATLAS_USER="${SERVERLESS_ATLAS_USER}"
export SERVERLESS_ATLAS_PASSWORD="${SERVERLESS_ATLAS_PASSWORD}"
EOT

# See what we've done
Expand Down Expand Up @@ -357,17 +349,6 @@ functions:
script: |
rm -f .env.private

"build and test docker image":
- command: shell.exec
type: test
params:
shell: bash
working_dir: "src"
script: |
${PREPARE_SHELL}
set -x
.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}

"run benchmarks":
- command: shell.exec
type: test
Expand Down Expand Up @@ -398,23 +379,6 @@ functions:
fi
.evergreen/run-tests.sh

"run tests via docker":
- command: shell.exec
type: test
params:
shell: bash
working_dir: "src"
script: |
${PREPARE_SHELL}
# Needed for generating temporary aws credentials.
if [ -n "${FLE}" ];
then
export AWS_ACCESS_KEY_ID="${fle_aws_key}"
export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}"
export AWS_DEFAULT_REGION="${fle_aws_region}"
fi
.evergreen/run-tests-docker.sh

"run AWS auth tests":
- command: shell.exec
type: test
Expand All @@ -435,16 +399,6 @@ functions:
${PREPARE_SHELL}
.evergreen/run-tests-kerberos-unit.sh

"run Kerberos integration tests":
- command: shell.exec
type: test
params:
shell: bash
working_dir: "src"
script: |
${PREPARE_SHELL}
.evergreen/run-tests-kerberos-integration.sh

"run Atlas tests":
- command: shell.exec
type: test
Expand All @@ -455,24 +409,6 @@ functions:
${PREPARE_SHELL}
MONGODB_URI="${MONGODB_URI}" .evergreen/run-tests-atlas.sh

"run serverless tests":
- command: shell.exec
type: test
params:
shell: bash
working_dir: "src"
script: |
${PREPARE_SHELL}
# Needed for generating temporary aws credentials.
if [ -n "${FLE}" ];
then
export AWS_ACCESS_KEY_ID="${fle_aws_key}"
export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}"
export AWS_DEFAULT_REGION="${fle_aws_region}"
fi

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

pre:
- func: "fetch source"
- func: "create expansions"
Expand All @@ -486,35 +422,6 @@ post:
- func: "upload test results to s3"

task_groups:
- name: serverless_task_group
setup_group_can_fail_task: true
setup_group_timeout_secs: 1800 # 30 minutes
setup_group:
- func: "fetch source"
- func: "create expansions"
- command: ec2.assume_role
params:
role_arn: ${aws_test_secrets_role}
- command: shell.exec
params:
shell: "bash"
script: |
${PREPARE_SHELL}
bash ${DRIVERS_TOOLS}/.evergreen/serverless/setup-secrets.sh
bash ${DRIVERS_TOOLS}/.evergreen/serverless/create-instance.sh
- command: expansions.update
params:
file: serverless-expansion.yml
teardown_task:
- command: shell.exec
params:
script: |
${PREPARE_SHELL}
bash ${DRIVERS_TOOLS}/.evergreen/serverless/delete-instance.sh
- func: "upload test results"
tasks:
- "test-serverless"

- name: testatlas_task_group
setup_group_can_fail_task: true
setup_group_timeout_secs: 1800 # 30 minutes
Expand Down Expand Up @@ -750,26 +657,12 @@ tasks:
- name: "test-atlas"
commands:
- func: "run Atlas tests"
- name: "test-serverless"
commands:
- func: "export FLE credentials"
- func: "run serverless tests"
- name: "test-docker"
commands:
- func: "build and test docker image"
- name: "test-mlaunch"
commands:
- func: "run tests"
- name: "driver-bench"
commands:
- func: "run benchmarks"
- name: "test-via-docker"
commands:
- func: "run tests via docker"
- name: "test-kerberos-integration"
commands:
- func: "export Kerberos credentials"
- func: "run Kerberos integration tests"
- name: "test-kerberos"
commands:
- func: "run Kerberos unit tests"
Expand All @@ -780,10 +673,6 @@ tasks:
commands:
- func: "export FLE credentials"
- func: "run tests"
- name: "test-fle-via-docker"
commands:
- func: "export FLE credentials"
- func: "run tests via docker"
- name: "test-aws-auth"
commands:
- func: "export AWS auth credentials"
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/run-tests-atlas-full.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set_env_ruby
bundle_install

ATLAS_URI=$MONGODB_URI \
SERVERLESS=1 \
KILL_ALL_SERVER_SESSIONS=0 \
EXAMPLE_TIMEOUT=600 \
bundle exec rspec -fd spec/integration/search_indexes_prose_spec.rb

Expand Down
12 changes: 5 additions & 7 deletions spec/runners/crud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,12 @@ def define_spec_tests_with_requirements(spec, &block)
if req.topologies
require_topology *req.topologies
end
if SpecConfig.instance.serverless? && req.serverless == :forbid
before(:all) do
skip "Serverless forbidden"
end
end
if !SpecConfig.instance.serverless? && req.serverless == :require

# Once `serverless: require` is no longer present in any specs,
# this can be removed.
if req.serverless == :require
before(:all) do
skip "Serverless required"
skip 'Serverless tests are no longer enabled, per RUBY-3652'
end
end

Expand Down
Loading