From 3b04de6f9e65a96d79fcfc5e48a4f731bf70c809 Mon Sep 17 00:00:00 2001 From: emadum Date: Wed, 27 Jan 2021 13:34:57 -0500 Subject: [PATCH 1/4] chore(ci): fix aws auth tests --- .evergreen/config.yml | 10 ++++++++++ .evergreen/config.yml.in | 9 +++++++++ .evergreen/generate_evergreen_tasks.js | 1 + .evergreen/run-mongodb-aws-ecs-test.sh | 2 +- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 38afe9b80b..4419bfd957 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -243,6 +243,14 @@ functions: "iam_auth_ec2_instance_profile" : "${iam_auth_ec2_instance_profile}" } EOF + upgrade boto3 aws library for python: + - command: shell.exec + type: test + params: + working_dir: src + silent: true + script: | + pip install --upgrade boto3 run aws auth test with regular aws credentials: - command: shell.exec type: test @@ -1342,6 +1350,7 @@ tasks: ORCHESTRATION_FILE: auth-aws.json TOPOLOGY: server - func: add aws auth variables to file + - func: upgrade boto3 aws library for python - 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 EC2 credentials @@ -1358,6 +1367,7 @@ tasks: ORCHESTRATION_FILE: auth-aws.json TOPOLOGY: server - func: add aws auth variables to file + - func: upgrade boto3 aws library for python - 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 EC2 credentials diff --git a/.evergreen/config.yml.in b/.evergreen/config.yml.in index 97685e1b6b..c9d2cb62fe 100644 --- a/.evergreen/config.yml.in +++ b/.evergreen/config.yml.in @@ -274,6 +274,15 @@ functions: } EOF + "upgrade boto3 aws library for python": + - command: shell.exec + type: test + params: + working_dir: "src" + silent: true + script: | + pip install --upgrade boto3 + "run aws auth test with regular aws credentials": - command: shell.exec type: test diff --git a/.evergreen/generate_evergreen_tasks.js b/.evergreen/generate_evergreen_tasks.js index 7f8ac42b35..7b1d9135ef 100644 --- a/.evergreen/generate_evergreen_tasks.js +++ b/.evergreen/generate_evergreen_tasks.js @@ -303,6 +303,7 @@ AWS_AUTH_VERSIONS.forEach(VERSION => { } }, { func: 'add aws auth variables to file' }, + { func: 'upgrade boto3 aws library for python' }, { 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 EC2 credentials' }, diff --git a/.evergreen/run-mongodb-aws-ecs-test.sh b/.evergreen/run-mongodb-aws-ecs-test.sh index 54989bfe42..baf933bca0 100755 --- a/.evergreen/run-mongodb-aws-ecs-test.sh +++ b/.evergreen/run-mongodb-aws-ecs-test.sh @@ -16,5 +16,5 @@ export NVM_DIR="${PROJECT_DIRECTORY}/node-artifacts/nvm" set -x # run the tests -npm install aws4 +npm install aws4 MONGODB_URI=$MONGODB_URI MONGODB_UNIFIED_TOPOLOGY=1 npx mocha test/functional/mongodb_aws.test.js From 9017a474bb03d91712362b2842ae04f82d9f86c8 Mon Sep 17 00:00:00 2001 From: emadum Date: Wed, 27 Jan 2021 19:36:05 -0500 Subject: [PATCH 2/4] review feedback --- .evergreen/config.yml | 10 ++++++---- .evergreen/config.yml.in | 7 ++++++- .evergreen/generate_evergreen_tasks.js | 1 - 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 4419bfd957..9fdada6078 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -67,8 +67,8 @@ functions: script: > ${PREPARE_SHELL} - git clone git://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS - + git clone --branch DRIVERS-1462/aws-auth-upgrade-boto3 --single-branch \ + git://github.com/emadum/drivers-evergreen-tools.git $DRIVERS_TOOLS echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config bootstrap mongo-orchestration: @@ -259,6 +259,7 @@ functions: script: | ${PREPARE_SHELL} cd ${DRIVERS_TOOLS}/.evergreen/auth_aws + . ./activate_venv.sh ${MONGODB_BINARIES}/mongo aws_e2e_regular_aws.js - command: shell.exec type: test @@ -287,6 +288,7 @@ functions: script: | ${PREPARE_SHELL} cd ${DRIVERS_TOOLS}/.evergreen/auth_aws + . ./activate_venv.sh ${MONGODB_BINARIES}/mongo aws_e2e_assume_role.js - command: shell.exec type: test @@ -319,6 +321,7 @@ functions: script: | ${PREPARE_SHELL} cd ${DRIVERS_TOOLS}/.evergreen/auth_aws + . ./activate_venv.sh ${MONGODB_BINARIES}/mongo aws_e2e_ec2.js - command: shell.exec type: test @@ -391,6 +394,7 @@ functions: EOF cat setup.js + . ./activate_venv.sh mongo --nodb setup.js aws_e2e_ecs.js run-ocsp-test: - command: shell.exec @@ -1350,7 +1354,6 @@ tasks: ORCHESTRATION_FILE: auth-aws.json TOPOLOGY: server - func: add aws auth variables to file - - func: upgrade boto3 aws library for python - 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 EC2 credentials @@ -1367,7 +1370,6 @@ tasks: ORCHESTRATION_FILE: auth-aws.json TOPOLOGY: server - func: add aws auth variables to file - - func: upgrade boto3 aws library for python - 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 EC2 credentials diff --git a/.evergreen/config.yml.in b/.evergreen/config.yml.in index c9d2cb62fe..d58208ba89 100644 --- a/.evergreen/config.yml.in +++ b/.evergreen/config.yml.in @@ -85,7 +85,8 @@ functions: params: script: | ${PREPARE_SHELL} - git clone git://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS + git clone --branch DRIVERS-1462/aws-auth-upgrade-boto3 --single-branch \ + git://github.com/emadum/drivers-evergreen-tools.git $DRIVERS_TOOLS echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config "bootstrap mongo-orchestration": @@ -291,6 +292,7 @@ functions: script: | ${PREPARE_SHELL} cd ${DRIVERS_TOOLS}/.evergreen/auth_aws + . ./activate_venv.sh ${MONGODB_BINARIES}/mongo aws_e2e_regular_aws.js - command: shell.exec type: test @@ -320,6 +322,7 @@ functions: script: | ${PREPARE_SHELL} cd ${DRIVERS_TOOLS}/.evergreen/auth_aws + . ./activate_venv.sh ${MONGODB_BINARIES}/mongo aws_e2e_assume_role.js - command: shell.exec type: test @@ -353,6 +356,7 @@ functions: script: | ${PREPARE_SHELL} cd ${DRIVERS_TOOLS}/.evergreen/auth_aws + . ./activate_venv.sh ${MONGODB_BINARIES}/mongo aws_e2e_ec2.js - command: shell.exec type: test @@ -428,6 +432,7 @@ functions: EOF cat setup.js + . ./activate_venv.sh mongo --nodb setup.js aws_e2e_ecs.js "run-ocsp-test": diff --git a/.evergreen/generate_evergreen_tasks.js b/.evergreen/generate_evergreen_tasks.js index 7b1d9135ef..7f8ac42b35 100644 --- a/.evergreen/generate_evergreen_tasks.js +++ b/.evergreen/generate_evergreen_tasks.js @@ -303,7 +303,6 @@ AWS_AUTH_VERSIONS.forEach(VERSION => { } }, { func: 'add aws auth variables to file' }, - { func: 'upgrade boto3 aws library for python' }, { 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 EC2 credentials' }, From 3da1e2c73ddf56fe85b322d017ed0a333a2a7fbe Mon Sep 17 00:00:00 2001 From: emadum Date: Wed, 27 Jan 2021 20:17:35 -0500 Subject: [PATCH 3/4] cleanup --- .evergreen/config.yml | 8 -------- .evergreen/config.yml.in | 9 --------- 2 files changed, 17 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 9fdada6078..4c2f43855d 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -243,14 +243,6 @@ functions: "iam_auth_ec2_instance_profile" : "${iam_auth_ec2_instance_profile}" } EOF - upgrade boto3 aws library for python: - - command: shell.exec - type: test - params: - working_dir: src - silent: true - script: | - pip install --upgrade boto3 run aws auth test with regular aws credentials: - command: shell.exec type: test diff --git a/.evergreen/config.yml.in b/.evergreen/config.yml.in index d58208ba89..de8476f395 100644 --- a/.evergreen/config.yml.in +++ b/.evergreen/config.yml.in @@ -275,15 +275,6 @@ functions: } EOF - "upgrade boto3 aws library for python": - - command: shell.exec - type: test - params: - working_dir: "src" - silent: true - script: | - pip install --upgrade boto3 - "run aws auth test with regular aws credentials": - command: shell.exec type: test From ec398ac7fccbccd929806c1e2b9a5ad88a001cae Mon Sep 17 00:00:00 2001 From: emadum Date: Fri, 29 Jan 2021 10:57:31 -0500 Subject: [PATCH 4/4] point back to main drivers-evergreen-tools --- .evergreen/config.yml | 4 ++-- .evergreen/config.yml.in | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 4c2f43855d..ae43d8dbf3 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -67,8 +67,8 @@ functions: script: > ${PREPARE_SHELL} - git clone --branch DRIVERS-1462/aws-auth-upgrade-boto3 --single-branch \ - git://github.com/emadum/drivers-evergreen-tools.git $DRIVERS_TOOLS + git clone git://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS + echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config bootstrap mongo-orchestration: diff --git a/.evergreen/config.yml.in b/.evergreen/config.yml.in index de8476f395..79a2322172 100644 --- a/.evergreen/config.yml.in +++ b/.evergreen/config.yml.in @@ -85,8 +85,7 @@ functions: params: script: | ${PREPARE_SHELL} - git clone --branch DRIVERS-1462/aws-auth-upgrade-boto3 --single-branch \ - git://github.com/emadum/drivers-evergreen-tools.git $DRIVERS_TOOLS + git clone git://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config "bootstrap mongo-orchestration":