-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
PYTHON-3920 - Migrate AWS Auth Tests to use AWS Secrets #1367
Conversation
PYTHON-3920 - Migrate AWS Auth Tests to use AWS Secrets
- command: shell.exec | ||
type: test | ||
params: | ||
add_expansions_to_env: true |
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.
These can be simplified to include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
. I tried it out in mongodb/mongo-go-driver#1365
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 particular instance still needs to be updated. :)
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.
for get_aws_secrets
it fails without expansions_to_env
, test-atlas
has been updated to use include_expansions_in_env
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.
Wait so there are things we're missing from the new vault?
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.
get_aws_secrets
is what fetches the secrets from the vault.
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.
Right, okay, so now I'm confused, because that's what I'm doing in the go driver ticket.
.evergreen/config.yml
Outdated
|
||
cd - | ||
|
||
# Write an empty prepare_aws_env so no auth environment variables are set. |
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.
We shouldn't need to do this anymore (perhaps something still needs to change in D-E-T?
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.
Ah, I see how it is used now. I think we can also absorb this logic into run-mongodb-aws-test.sh
. I do like the idea of adding the script in D-E-T as you've done.
.evergreen/config.yml
Outdated
if [ "${skip_EC2_auth_test}" = "true" ]; then | ||
echo "This platform does not support the web identity auth test, skipping..." | ||
exit 0 | ||
fi | ||
set -ex | ||
|
||
# Try to source exported AWS Secrets |
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.
We can probably move this logic into run-mongodb-aws-test.sh
and pass in the test to run (web-identity
in this case).
Nice, I like the direction this is heading. Looks like you still need to convert the last few tests? |
Should all be converted and good to go now! |
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.
Beautiful!
No, I something changed on those tests, I'll open a ticket. |
Is this good to merge then? |
Yes, I opened https://jira.mongodb.org/browse/PYTHON-3951 |
No description provided.