-
Notifications
You must be signed in to change notification settings - Fork 341
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: backport fix incorrectly returned changed result #486
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.
While testing #485 I discovered that the tests were disabled and there's a slight bug here I've added the fix I used.
recheck |
recheck |
1 failed pylint check, all on files not touched in this PR:
|
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.
@lowlydba Thank you for taking time to work on this.
recheck |
1 similar comment
recheck |
@lowlydba I didn't see what error was there before but FYI there's a widespread issue with 2.9 sanity checks after a |
recheck |
1 similar comment
recheck |
Co-authored-by: Mark Chappell <[email protected]>
Co-authored-by: Mark Chappell <[email protected]>
Co-authored-by: Mark Chappell <[email protected]>
recheck Only error was a timeout in |
@tremble should be ready to be gated! 🎉 |
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!
Thanks for your patience, and this PR @lowlydba! |
The integrations tests seems failing:
|
Some of the previous check runs also seemed a bit flaky w/r/t timeouts or slow attachments of volumes (the volume being in "attaching" state instead of "attached", for example). I think the root cause is actually this one:
|
Gate and Check are the same tests, the difference is that check runs when you submit the code, so can suffer from bit-rot, gate checks that your code still works against the latest code base and then immediately merges the code, so no further changes happen before your code is merged. The ec2_vol and ec2_instance checks have historically been flakey (race conditions etc). |
Another flake for the same test I mentioned above. I noticed the "Attach volume" test was already set to accept "attaching", "attached" as valid results, so it seems fair to update the "Attach volume (idempotent)" to have the same assertion criteria. I believe this will greatly reduce the flakiness of this particular test. |
SUMMARY
Backport version of #483
When
modify_volume
is used but no new disk is being attached, the module incorrectly reports that no change has occurred even when disks have been modified (iops, throughput, type, etc.). This is due to the attach function overwriting the changed variable even if no disks are attached.Fixes #482
The integration test has been fixed so that when the gp3 modifications are tested, the volume is already in an attached state (previously detached) when reporting back
changed
. The detach tests are moved further down now, allowing this case to be properly covered by the existing assert:amazon.aws/tests/integration/targets/ec2_vol/tasks/tests.yml
Lines 384 to 387 in e8df917
ISSUE TYPE
COMPONENT NAME
ec2_vol
Depends-On: #491