Skip to content

PYTHON-5157 Convert aws tests to use python scripts #2180

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

Merged
merged 39 commits into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
f4d8274
PYTHON-5157 Convert aws tests to use python scripts
blink1073 Feb 26, 2025
750404f
incorporate changes from drivers-tools
blink1073 Feb 26, 2025
480ea9b
cleanup
blink1073 Feb 26, 2025
1a191b5
fix checkout
blink1073 Feb 26, 2025
8dd60bb
fix ecs
blink1073 Feb 26, 2025
75b5d50
fix invocation
blink1073 Feb 26, 2025
b6bffc8
fix invocation
blink1073 Feb 26, 2025
6778a83
fix setup
blink1073 Feb 26, 2025
b2b6934
fix setup
blink1073 Feb 26, 2025
7dd27f1
cleanup
blink1073 Feb 26, 2025
56bc17d
debug
blink1073 Feb 26, 2025
ca7722f
debug
blink1073 Feb 26, 2025
26b0adf
remove aws creds
blink1073 Feb 26, 2025
90bbb2f
restore aws creds
blink1073 Feb 26, 2025
a3152fc
fix windows and macos handling
blink1073 Feb 26, 2025
72879de
fix test skips
blink1073 Feb 26, 2025
1c0b1f5
debug
blink1073 Feb 26, 2025
4afcf72
debug
blink1073 Feb 26, 2025
ab6d2b2
debug
blink1073 Feb 26, 2025
15810ba
debug
blink1073 Feb 26, 2025
06f27c9
windows fix
blink1073 Feb 27, 2025
9c7a50b
fix teardown
blink1073 Feb 27, 2025
36e63e9
debug
blink1073 Feb 27, 2025
e3d17bf
windows debug
blink1073 Feb 27, 2025
612eb74
windows debug
blink1073 Feb 27, 2025
73ad059
fix teardown windows
blink1073 Feb 27, 2025
d0e3552
fix teardown
blink1073 Feb 27, 2025
ab1772f
handle macos
blink1073 Feb 28, 2025
83fc521
Merge branch 'master' of github.com:mongodb/mongo-python-driver into …
blink1073 Mar 2, 2025
d54bcc3
clean up aws auth server start
blink1073 Mar 2, 2025
c34594d
Merge branch 'master' of github.com:mongodb/mongo-python-driver into …
blink1073 Mar 4, 2025
422852c
use upstream
blink1073 Mar 4, 2025
c06364e
fix test run logic
blink1073 Mar 4, 2025
68f7828
disable fail-fast
blink1073 Mar 4, 2025
db30a35
Merge branch 'master' into PYTHON-5157
blink1073 Mar 4, 2025
f3daf04
separate tasks
blink1073 Mar 5, 2025
f6234c2
fix selectors
blink1073 Mar 5, 2025
352b047
use upstream
blink1073 Mar 5, 2025
824abcf
Merge branch 'PYTHON-5157' of github.com:blink1073/mongo-python-drive…
blink1073 Mar 5, 2025
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
239 changes: 1 addition & 238 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ functions:
params:
binary: bash
include_expansions_in_env: [VERSION, TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE, LOAD_BALANCER,
STORAGE_ENGINE, REQUIRE_API_VERSION, DRIVERS_TOOLS, TEST_CRYPT_SHARED]
STORAGE_ENGINE, REQUIRE_API_VERSION, DRIVERS_TOOLS, TEST_CRYPT_SHARED, AUTH_AWS]
args:
- src/.evergreen/scripts/bootstrap-mongo-orchestration.sh
- command: expansions.update
Expand Down Expand Up @@ -295,100 +295,6 @@ functions:
- .evergreen/scripts/run-with-env.sh
- .evergreen/scripts/run-atlas-tests.sh

"get aws auth secrets":
- command: subprocess.exec
type: test
params:
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
binary: bash
args:
- ${DRIVERS_TOOLS}/.evergreen/auth_aws/setup-secrets.sh

"run aws auth test with regular aws credentials":
- command: subprocess.exec
type: test
params:
include_expansions_in_env: ["DRIVERS_TOOLS", "skip_EC2_auth_test"]
binary: bash
working_dir: "src"
args:
- .evergreen/scripts/run-with-env.sh
- .evergreen/scripts/run-mongodb-aws-test.sh
- regular

"run aws auth test with assume role credentials":
- command: subprocess.exec
type: test
params:
include_expansions_in_env: ["DRIVERS_TOOLS", "skip_EC2_auth_test"]
binary: bash
working_dir: "src"
args:
- .evergreen/scripts/run-with-env.sh
- .evergreen/scripts/run-mongodb-aws-test.sh
- assume-role

"run aws auth test with aws EC2 credentials":
- command: subprocess.exec
type: test
params:
include_expansions_in_env: ["DRIVERS_TOOLS", "skip_EC2_auth_test"]
binary: bash
working_dir: "src"
args:
- .evergreen/scripts/run-with-env.sh
- .evergreen/scripts/run-mongodb-aws-test.sh
- ec2

"run aws auth test with aws web identity credentials":
- # Test with and without AWS_ROLE_SESSION_NAME set.
- command: subprocess.exec
type: test
params:
include_expansions_in_env: ["DRIVERS_TOOLS", "skip_EC2_auth_test"]
binary: bash
working_dir: "src"
args:
- .evergreen/scripts/run-with-env.sh
- .evergreen/scripts/run-mongodb-aws-test.sh
- web-identity
- command: subprocess.exec
type: test
params:
include_expansions_in_env: [ "DRIVERS_TOOLS", "skip_EC2_auth_test" ]
binary: bash
working_dir: "src"
env:
AWS_ROLE_SESSION_NAME: test
args:
- .evergreen/scripts/run-with-env.sh
- .evergreen/scripts/run-mongodb-aws-test.sh
- web-identity

"run aws auth test with aws credentials as environment variables":
- command: subprocess.exec
type: test
params:
include_expansions_in_env: ["DRIVERS_TOOLS", "skip_EC2_auth_test"]
binary: bash
working_dir: "src"
args:
- .evergreen/scripts/run-with-env.sh
- .evergreen/scripts/run-mongodb-aws-test.sh
- env-creds

"run aws auth test with aws credentials and session token as environment variables":
- command: subprocess.exec
type: test
params:
include_expansions_in_env: ["DRIVERS_TOOLS", "skip_EC2_auth_test"]
binary: bash
working_dir: "src"
args:
- .evergreen/scripts/run-with-env.sh
- .evergreen/scripts/run-mongodb-aws-test.sh
- session-creds

"run oidc auth test with test credentials":
- command: subprocess.exec
type: test
Expand All @@ -411,16 +317,6 @@ functions:
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-oidc-remote-test.sh

"run aws ECS auth test":
- command: subprocess.exec
type: test
params:
binary: bash
working_dir: "src"
args:
- .evergreen/scripts/run-with-env.sh
- .evergreen/scripts/run-aws-ecs-auth-test.sh

"cleanup":
- command: subprocess.exec
params:
Expand All @@ -431,13 +327,6 @@ functions:
- .evergreen/scripts/cleanup.sh

"teardown system":
- command: subprocess.exec
params:
binary: bash
working_dir: "src"
args:
# Ensure the instance profile is reassigned for aws tests.
- ${DRIVERS_TOOLS}/.evergreen/auth_aws/teardown.sh
- command: subprocess.exec
params:
binary: bash
Expand Down Expand Up @@ -1159,132 +1048,6 @@ tasks:
OCSP_ALGORITHM: "ecdsa"
OCSP_TLS_SHOULD_SUCCEED: "false"

- name: "aws-auth-test-4.4"
commands:
- func: "bootstrap mongo-orchestration"
vars:
AUTH: "auth"
ORCHESTRATION_FILE: "auth-aws.json"
TOPOLOGY: "server"
VERSION: "4.4"
- func: "assume ec2 role"
- func: "get aws auth secrets"
- func: "run aws auth test with regular aws credentials"
- func: "run aws auth test with assume role credentials"
- func: "run aws auth test with aws credentials as environment variables"
- func: "run aws auth test with aws credentials and session token as environment variables"
- func: "run aws auth test with aws EC2 credentials"
- func: "run aws auth test with aws web identity credentials"
- func: "run aws ECS auth test"

- name: "aws-auth-test-5.0"
commands:
- func: "bootstrap mongo-orchestration"
vars:
AUTH: "auth"
ORCHESTRATION_FILE: "auth-aws.json"
TOPOLOGY: "server"
VERSION: "5.0"
- func: "assume ec2 role"
- func: "get aws auth secrets"
- func: "run aws auth test with regular aws credentials"
- func: "run aws auth test with assume role credentials"
- func: "run aws auth test with aws credentials as environment variables"
- func: "run aws auth test with aws credentials and session token as environment variables"
- func: "run aws auth test with aws EC2 credentials"
- func: "run aws auth test with aws web identity credentials"
- func: "run aws ECS auth test"

- name: "aws-auth-test-6.0"
commands:
- func: "bootstrap mongo-orchestration"
vars:
AUTH: "auth"
ORCHESTRATION_FILE: "auth-aws.json"
TOPOLOGY: "server"
VERSION: "6.0"
- func: "assume ec2 role"
- func: "get aws auth secrets"
- func: "run aws auth test with regular aws credentials"
- func: "run aws auth test with assume role credentials"
- func: "run aws auth test with aws credentials as environment variables"
- func: "run aws auth test with aws credentials and session token as environment variables"
- func: "run aws auth test with aws EC2 credentials"
- func: "run aws auth test with aws web identity credentials"
- func: "run aws ECS auth test"

- name: "aws-auth-test-7.0"
commands:
- func: "bootstrap mongo-orchestration"
vars:
AUTH: "auth"
ORCHESTRATION_FILE: "auth-aws.json"
TOPOLOGY: "server"
VERSION: "7.0"
- func: "assume ec2 role"
- func: "get aws auth secrets"
- func: "run aws auth test with regular aws credentials"
- func: "run aws auth test with assume role credentials"
- func: "run aws auth test with aws credentials as environment variables"
- func: "run aws auth test with aws credentials and session token as environment variables"
- func: "run aws auth test with aws EC2 credentials"
- func: "run aws auth test with aws web identity credentials"
- func: "run aws ECS auth test"

- name: "aws-auth-test-8.0"
commands:
- func: "bootstrap mongo-orchestration"
vars:
AUTH: "auth"
ORCHESTRATION_FILE: "auth-aws.json"
TOPOLOGY: "server"
VERSION: "8.0"
- func: "assume ec2 role"
- func: "get aws auth secrets"
- func: "run aws auth test with regular aws credentials"
- func: "run aws auth test with assume role credentials"
- func: "run aws auth test with aws credentials as environment variables"
- func: "run aws auth test with aws credentials and session token as environment variables"
- func: "run aws auth test with aws EC2 credentials"
- func: "run aws auth test with aws web identity credentials"
- func: "run aws ECS auth test"

- name: "aws-auth-test-rapid"
commands:
- func: "bootstrap mongo-orchestration"
vars:
AUTH: "auth"
ORCHESTRATION_FILE: "auth-aws.json"
TOPOLOGY: "server"
VERSION: "rapid"
- func: "assume ec2 role"
- func: "get aws auth secrets"
- func: "run aws auth test with regular aws credentials"
- func: "run aws auth test with assume role credentials"
- func: "run aws auth test with aws credentials as environment variables"
- func: "run aws auth test with aws credentials and session token as environment variables"
- func: "run aws auth test with aws EC2 credentials"
- func: "run aws auth test with aws web identity credentials"
- func: "run aws ECS auth test"

- name: "aws-auth-test-latest"
commands:
- func: "bootstrap mongo-orchestration"
vars:
AUTH: "auth"
ORCHESTRATION_FILE: "auth-aws.json"
TOPOLOGY: "server"
VERSION: "latest"
- func: "assume ec2 role"
- func: "get aws auth secrets"
- func: "run aws auth test with regular aws credentials"
- func: "run aws auth test with assume role credentials"
- func: "run aws auth test with aws credentials as environment variables"
- func: "run aws auth test with aws credentials and session token as environment variables"
- func: "run aws auth test with aws EC2 credentials"
- func: "run aws auth test with aws web identity credentials"
- func: "run aws ECS auth test"

- name: "oidc-auth-test"
commands:
- func: "run oidc auth test with test credentials"
Expand Down
Loading
Loading