-
Notifications
You must be signed in to change notification settings - Fork 342
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
ec2_vol: boto3 migration (migrating ansible/ansible#45500 to amazon.aws) #53
Conversation
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.
Thanks for porting this over and getting this boto3-update moving again. A couple of minor niggles while you're still working on this
a858d2c
to
ea952a4
Compare
ca56f37
to
1eb1607
Compare
Just wanted to say I'm still working on this PR. |
@tremble I've been working on integrating the paginator for I'm able to gather results using something like this:
I'm just a little lost on how to integrate the preceding back into |
603ba40
to
694958d
Compare
@tremble Ok, I think I have the paginator working now. I tested the changes against my EC2 instance and the playbook appeared to work. Other than implementing the paginator and some minor formatting fixes, there were three things left: ansible/ansible#45500 (comment) I'll keep moving forward with the requested changes. |
a6e4f6f
to
14294ac
Compare
@s-hertel Regarding ansible/ansible#45500 (comment), do you mean removing |
bbec1b3
to
5631456
Compare
5631456
to
ba73a4b
Compare
In my AWS environment, |
Interesting, they're working for me. I wonder if there's something going on due to the way CI works... |
@tremble 🤔 |
I've done some digging and it looks like the ec2 instance isn't reporting the new volume in its description. This is after the waiter's done its thing. By the time I run ec2_instance_info after the failed test it's showing up. I suspect that this is a very subtle race condition in the AWS APIs. |
So... I've got something that seems to work: de6a699 Looks like this is a race condition of some variety: Basically the waiter which looks at the volume returns with "I'm attached to something" before the instance description includes the new volume. |
@tremble Thanks for investigating the testing oddity. I applied your diff. |
Thanks for working on getting this boto3 migration in :) |
@tremble Looks like there's still one test failing, but the rest are passing! 🎉 |
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.
2 last minor changes and then I think we're ready to get this merged.
In theory we could also make more use of AWSRetry, but I'd rather see this merged and I'll CC you on the relevant change so you could see how it would work.
Volume waiter is courtesy of @tremble
ca792cc
to
bd08fd2
Compare
@tremble 👍 |
Thanks for seeing this through. Scratch one more module off the boto v2 list. |
…s#53) * Adds module aws_direct_connect_confirm_connection DirectConnect connections that are created by a Hosted provider require approval by users. This module simply finds the DirectConnect connection and confirms it if it's in the 'ordering' state. * Adding unit tests * Correcting test cases * Correct linting issue * Switch to AWSRetry decorator to correct test cases
…s#53) * Adds module aws_direct_connect_confirm_connection DirectConnect connections that are created by a Hosted provider require approval by users. This module simply finds the DirectConnect connection and confirms it if it's in the 'ordering' state. * Adding unit tests * Correcting test cases * Correct linting issue * Switch to AWSRetry decorator to correct test cases
…s#53) * Adds module aws_direct_connect_confirm_connection DirectConnect connections that are created by a Hosted provider require approval by users. This module simply finds the DirectConnect connection and confirms it if it's in the 'ordering' state. * Adding unit tests * Correcting test cases * Correct linting issue * Switch to AWSRetry decorator to correct test cases
SUMMARY
In order to keep the boto3 migration work in ansible/ansible#45500 alive, I attempted to add
the changes that were reviewed previously into a new PR.
ansible/ansible#45500 and some of the changes made in this PR were courtesy of @zeenlym.
ISSUE TYPE
COMPONENT NAME
plugins/modules/ec2_vol.py