-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
chore(ci): fix aws auth tests #2720
Conversation
.evergreen/config.yml
Outdated
working_dir: src | ||
silent: true | ||
script: | | ||
pip install --upgrade boto3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will upgrade boto3 for the entire system. This is bad practice because it can break applications that use the system python and even break future Evergreen tasks that run on this machine. Instead you should create and use a virtualenv, like this:
# The aws_e2e_assume_role script requires python3 with boto3.
virtualenv -p ${python3_binary} mongovenv
if [ "Windows_NT" = "$OS" ]; then
. mongovenv/Scripts/activate
else
. mongovenv/bin/activate
fi
pip install --upgrade boto3
Since this is a virtualenv you'll need to activate it before running each JS script, eg:
# The mongovenv was created earlier.
if [ "Windows_NT" = "$OS" ]; then
. mongovenv/Scripts/activate
else
. mongovenv/bin/activate
fi
cd ${DRIVERS_TOOLS}/.evergreen/auth_aws
${MONGODB_BINARIES}/mongo aws_e2e_regular_aws.js
Ideally the drivers-evergreen-tools auth testing scripts would take care of these problems so that all drivers don't need to add this finicky boilerplate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, and thanks for fixing this bug! I was able to fix it in pymongo too: mongodb/mongo-python-driver#562
Note: depends on mongodb-labs/drivers-evergreen-tools#138 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Upgrades the
boto3
python dependency used in the AWS auth tests by means of the newly addedactivate_venv.sh
script.NODE-3056
What changed?
Are there any files to ignore?