Skip to content
Merged
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
9 changes: 0 additions & 9 deletions .evergreen/config.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ functions:
include_expansions_in_env:
- MONGODB_URI
- DRIVERS_TOOLS
- MONGODB_AWS_SDK
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
Expand All @@ -440,7 +439,6 @@ functions:
include_expansions_in_env:
- MONGODB_URI
- DRIVERS_TOOLS
- MONGODB_AWS_SDK
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
Expand All @@ -458,7 +456,6 @@ functions:
include_expansions_in_env:
- MONGODB_URI
- DRIVERS_TOOLS
- MONGODB_AWS_SDK
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
Expand All @@ -477,7 +474,6 @@ functions:
include_expansions_in_env:
- MONGODB_URI
- DRIVERS_TOOLS
- MONGODB_AWS_SDK
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
Expand All @@ -495,7 +491,6 @@ functions:
include_expansions_in_env:
- MONGODB_URI
- DRIVERS_TOOLS
- MONGODB_AWS_SDK
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
Expand All @@ -513,7 +508,6 @@ functions:
include_expansions_in_env:
- MONGODB_URI
- DRIVERS_TOOLS
- MONGODB_AWS_SDK
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
Expand All @@ -532,7 +526,6 @@ functions:
include_expansions_in_env:
- MONGODB_URI
- DRIVERS_TOOLS
- MONGODB_AWS_SDK
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
Expand All @@ -549,7 +542,6 @@ functions:
params:
include_expansions_in_env:
- DRIVERS_TOOLS
- MONGODB_AWS_SDK
- PROJECT_DIRECTORY
- MONGODB_BINARIES
- AWS_ACCESS_KEY_ID
Expand Down Expand Up @@ -597,7 +589,6 @@ functions:
- AWS_SESSION_TOKEN
env:
AWS_CREDENTIAL_TYPE: env-creds
MONGODB_AWS_SDK: "true"
working_dir: "src"
binary: bash
args:
Expand Down
99 changes: 0 additions & 99 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,6 @@ functions:
include_expansions_in_env:
- MONGODB_URI
- DRIVERS_TOOLS
- MONGODB_AWS_SDK
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
Expand All @@ -394,7 +393,6 @@ functions:
include_expansions_in_env:
- MONGODB_URI
- DRIVERS_TOOLS
- MONGODB_AWS_SDK
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
Expand All @@ -411,7 +409,6 @@ functions:
include_expansions_in_env:
- MONGODB_URI
- DRIVERS_TOOLS
- MONGODB_AWS_SDK
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
Expand All @@ -429,7 +426,6 @@ functions:
include_expansions_in_env:
- MONGODB_URI
- DRIVERS_TOOLS
- MONGODB_AWS_SDK
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
Expand All @@ -446,7 +442,6 @@ functions:
include_expansions_in_env:
- MONGODB_URI
- DRIVERS_TOOLS
- MONGODB_AWS_SDK
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
Expand All @@ -463,7 +458,6 @@ functions:
include_expansions_in_env:
- MONGODB_URI
- DRIVERS_TOOLS
- MONGODB_AWS_SDK
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
Expand All @@ -481,7 +475,6 @@ functions:
include_expansions_in_env:
- MONGODB_URI
- DRIVERS_TOOLS
- MONGODB_AWS_SDK
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
Expand All @@ -497,7 +490,6 @@ functions:
params:
include_expansions_in_env:
- DRIVERS_TOOLS
- MONGODB_AWS_SDK
- PROJECT_DIRECTORY
- MONGODB_BINARIES
- AWS_ACCESS_KEY_ID
Expand Down Expand Up @@ -542,7 +534,6 @@ functions:
- AWS_SESSION_TOKEN
env:
AWS_CREDENTIAL_TYPE: env-creds
MONGODB_AWS_SDK: 'true'
working_dir: src
binary: bash
args:
Expand Down Expand Up @@ -1660,7 +1651,6 @@ tasks:
- {key: AUTH, value: auth}
- {key: ORCHESTRATION_FILE, value: auth-aws.json}
- {key: TOPOLOGY, value: server}
- {key: MONGODB_AWS_SDK, value: 'true'}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: assume secrets manager role
Expand All @@ -1675,7 +1665,6 @@ tasks:
- {key: AUTH, value: auth}
- {key: ORCHESTRATION_FILE, value: auth-aws.json}
- {key: TOPOLOGY, value: server}
- {key: MONGODB_AWS_SDK, value: 'true'}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: assume secrets manager role
Expand All @@ -1690,7 +1679,6 @@ tasks:
- {key: AUTH, value: auth}
- {key: ORCHESTRATION_FILE, value: auth-aws.json}
- {key: TOPOLOGY, value: server}
- {key: MONGODB_AWS_SDK, value: 'true'}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: assume secrets manager role
Expand All @@ -1705,7 +1693,6 @@ tasks:
- {key: AUTH, value: auth}
- {key: ORCHESTRATION_FILE, value: auth-aws.json}
- {key: TOPOLOGY, value: server}
- {key: MONGODB_AWS_SDK, value: 'true'}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: assume secrets manager role
Expand All @@ -1720,7 +1707,6 @@ tasks:
- {key: AUTH, value: auth}
- {key: ORCHESTRATION_FILE, value: auth-aws.json}
- {key: TOPOLOGY, value: server}
- {key: MONGODB_AWS_SDK, value: 'true'}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: assume secrets manager role
Expand All @@ -1735,7 +1721,6 @@ tasks:
- {key: AUTH, value: auth}
- {key: ORCHESTRATION_FILE, value: auth-aws.json}
- {key: TOPOLOGY, value: server}
- {key: MONGODB_AWS_SDK, value: 'true'}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: assume secrets manager role
Expand All @@ -1750,7 +1735,6 @@ tasks:
- {key: AUTH, value: auth}
- {key: ORCHESTRATION_FILE, value: auth-aws.json}
- {key: TOPOLOGY, value: server}
- {key: MONGODB_AWS_SDK, value: 'true'}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: assume secrets manager role
Expand All @@ -1765,87 +1749,10 @@ tasks:
- {key: AUTH, value: auth}
- {key: ORCHESTRATION_FILE, value: auth-aws.json}
- {key: TOPOLOGY, value: server}
- {key: MONGODB_AWS_SDK, value: 'true'}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: assume secrets manager role
- func: run aws auth test AssumeRoleWithWebIdentity with AWS_ROLE_SESSION_NAME set
- name: aws-latest-auth-test-run-aws-auth-test-with-regular-aws-credentials-no-peer-dependencies
commands:
- command: expansions.update
type: setup
params:
updates:
- {key: VERSION, value: latest}
- {key: AUTH, value: auth}
- {key: ORCHESTRATION_FILE, value: auth-aws.json}
- {key: TOPOLOGY, value: server}
- {key: MONGODB_AWS_SDK, value: 'false'}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: assume secrets manager role
- func: run aws auth test with regular aws credentials
- name: aws-latest-auth-test-run-aws-auth-test-with-assume-role-credentials-no-peer-dependencies
commands:
- command: expansions.update
type: setup
params:
updates:
- {key: VERSION, value: latest}
- {key: AUTH, value: auth}
- {key: ORCHESTRATION_FILE, value: auth-aws.json}
- {key: TOPOLOGY, value: server}
- {key: MONGODB_AWS_SDK, value: 'false'}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: assume secrets manager role
- func: run aws auth test with assume role credentials
- name: aws-latest-auth-test-run-aws-auth-test-with-aws-credentials-as-environment-variables-no-peer-dependencies
commands:
- command: expansions.update
type: setup
params:
updates:
- {key: VERSION, value: latest}
- {key: AUTH, value: auth}
- {key: ORCHESTRATION_FILE, value: auth-aws.json}
- {key: TOPOLOGY, value: server}
- {key: MONGODB_AWS_SDK, value: 'false'}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: assume secrets manager role
- func: run aws auth test with aws credentials as environment variables
- name: >-
aws-latest-auth-test-run-aws-auth-test-with-aws-credentials-and-session-token-as-environment-variables-no-peer-dependencies
commands:
- command: expansions.update
type: setup
params:
updates:
- {key: VERSION, value: latest}
- {key: AUTH, value: auth}
- {key: ORCHESTRATION_FILE, value: auth-aws.json}
- {key: TOPOLOGY, value: server}
- {key: MONGODB_AWS_SDK, value: 'false'}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: assume secrets manager role
- func: run aws auth test with aws credentials and session token as environment variables
- name: aws-latest-auth-test-run-aws-ECS-auth-test-no-peer-dependencies
commands:
- command: expansions.update
type: setup
params:
updates:
- {key: VERSION, value: latest}
- {key: AUTH, value: auth}
- {key: ORCHESTRATION_FILE, value: auth-aws.json}
- {key: TOPOLOGY, value: server}
- {key: MONGODB_AWS_SDK, value: 'false'}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: assume secrets manager role
- func: run aws ECS auth test
- name: run-spec-benchmark-tests-node-server
tags:
- run-spec-benchmark-tests
Expand Down Expand Up @@ -3567,12 +3474,6 @@ buildvariants:
- aws-latest-auth-test-run-aws-ECS-auth-test
- aws-latest-auth-test-run-aws-auth-test-AssumeRoleWithWebIdentity-with-AWS_ROLE_SESSION_NAME-unset
- aws-latest-auth-test-run-aws-auth-test-AssumeRoleWithWebIdentity-with-AWS_ROLE_SESSION_NAME-set
- aws-latest-auth-test-run-aws-auth-test-with-regular-aws-credentials-no-peer-dependencies
- aws-latest-auth-test-run-aws-auth-test-with-assume-role-credentials-no-peer-dependencies
- aws-latest-auth-test-run-aws-auth-test-with-aws-credentials-as-environment-variables-no-peer-dependencies
- >-
aws-latest-auth-test-run-aws-auth-test-with-aws-credentials-and-session-token-as-environment-variables-no-peer-dependencies
- aws-latest-auth-test-run-aws-ECS-auth-test-no-peer-dependencies
- name: ubuntu2204-test-atlas-data-lake
display_name: Atlas Data Lake Tests
run_on: ubuntu2204-large
Expand Down
38 changes: 5 additions & 33 deletions .evergreen/generate_evergreen_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,14 +342,8 @@ for (const VERSION of AWS_AUTH_VERSIONS) {
{ 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 ECS auth test' },
{
func: 'run aws auth test AssumeRoleWithWebIdentity with AWS_ROLE_SESSION_NAME unset',
onlySdk: true
},
{
func: 'run aws auth test AssumeRoleWithWebIdentity with AWS_ROLE_SESSION_NAME set',
onlySdk: true
}
{ func: 'run aws auth test AssumeRoleWithWebIdentity with AWS_ROLE_SESSION_NAME unset' },
{ func: 'run aws auth test AssumeRoleWithWebIdentity with AWS_ROLE_SESSION_NAME set' }
];

const awsTasks = awsFuncs.map(fn => ({
Expand All @@ -359,8 +353,7 @@ for (const VERSION of AWS_AUTH_VERSIONS) {
VERSION,
AUTH: 'auth',
ORCHESTRATION_FILE: 'auth-aws.json',
TOPOLOGY: 'server',
MONGODB_AWS_SDK: 'true'
TOPOLOGY: 'server'
}),
{ func: 'install dependencies' },
{ func: 'bootstrap mongo-orchestration' },
Expand All @@ -369,29 +362,8 @@ for (const VERSION of AWS_AUTH_VERSIONS) {
]
}));

const awsNoPeerDependenciesTasks = awsFuncs
.filter(fn => fn.onlySdk !== true)
.map(fn => ({
name: `${name(fn.func)}-no-peer-dependencies`,
commands: [
updateExpansions({
VERSION: VERSION,
AUTH: 'auth',
ORCHESTRATION_FILE: 'auth-aws.json',
TOPOLOGY: 'server',
MONGODB_AWS_SDK: 'false'
}),
{ func: 'install dependencies' },
{ func: 'bootstrap mongo-orchestration' },
{ func: 'assume secrets manager role' },
{ func: fn.func }
]
}));

const allAwsTasks = awsTasks.concat(awsNoPeerDependenciesTasks);

TASKS.push(...allAwsTasks);
AWS_AUTH_TASKS.push(...allAwsTasks.map(t => t.name));
TASKS.push(...awsTasks);
AWS_AUTH_TASKS.push(...awsTasks.map(t => t.name));
}

const BUILD_VARIANTS = [];
Expand Down
2 changes: 0 additions & 2 deletions .evergreen/prepare-mongodb-aws-ecs-auth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mkdir -p $ECS_SRC_DIR/.evergreen
set -ex

# write test file
echo "export MONGODB_AWS_SDK=$MONGODB_AWS_SDK" >>$PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh
echo "if [ $MONGODB_AWS_SDK = 'false' ]; then rm -rf ./node_modules/@aws-sdk/credential-providers; fi" >>$PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh
echo "npm run check:aws" >>$PROJECT_DIRECTORY/.evergreen/run-mongodb-aws-ecs-test.sh

# copy test file to AWS ecs test directory
Expand Down
3 changes: 0 additions & 3 deletions .evergreen/setup-mongodb-aws-auth-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ set +x
if [ -z ${MONGODB_URI+omitted} ]; then echo "MONGODB_URI is unset" && exit 1; fi
if [ -z ${DRIVERS_TOOLS+omitted} ]; then echo "DRIVERS_TOOLS is unset" && exit 1; fi
if [ -z ${AWS_CREDENTIAL_TYPE+omitted} ]; then echo "AWS_CREDENTIAL_TYPE is unset" && exit 1; fi
if [ -z ${MONGODB_AWS_SDK+omitted} ]; then echo "MONGODB_AWS_SDK is unset" && exit 1; fi

bash $DRIVERS_TOOLS/.evergreen/auth_aws/setup-secrets.sh

Expand All @@ -25,7 +24,5 @@ cd $BEFORE

npm install --no-save aws4

if [ $MONGODB_AWS_SDK = 'false' ]; then rm -rf ./node_modules/@aws-sdk/credential-providers; fi

# revert to show test output
set -x
Loading