-
Notifications
You must be signed in to change notification settings - Fork 343
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_eni: Fix idempotency when security_groups is specified #337
ec2_eni: Fix idempotency when security_groups is specified #337
Conversation
If `security_groups` attribute is specified - module always returns `Changed` = `True`. Example: ``` - amazon.aws.ec2_eni: name: my-eni security_groups: - my-sg subnet_id: subnet-123456 ``` Will always return `Changed` = `True`. This PR fixes that.
Strange. Integration tests fail with the following error:
The line in question is:
It has nothing to do with the changes I made. Has this integration test worked previously? |
recheck |
1 similar comment
recheck |
The test fails with the following error:
I think I hit a wall in trying to fix it. I'm inclined to remove lines in 60 and 155 in
and
My thinking here is that the appropriate validation is done by the subsequent lines:
and
Would that be acceptable? |
ansible.netcommon.ipaddr feels like something we should have available to us during testing, many of our modules return IP addresses, and being able to validate this seems like core testing functionality. Originally we had
While I think it's reasonable to minimise our test dependencies, supported collections (like ansible.netcommon) feel like something we should have available to us. @goneri thoughts? |
I realize that everyone is probably busy after release 1.5.0, but still wanted to follow up on this. What's the best way to proceed? |
@tremble @ichekaldin I have no objection to adding ansible.netcommon back to tests/requirements.yml. It looks like these tests was missed when we recently removed ansible.netcommon from the requirements after other, unrelated usages were removed. Collections in that file will be installed to the test environment when integration tests run. |
recheck |
recheck |
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.
Hi @ichekaldin apologies, just needed to be reviewed once the CI was passing.
recheck |
gate job isn't running because one of the zuul changes hasn't merged, we'll get that merged asap |
AWS jobs depend on ansible.netcommon See: ansible-collections/amazon.aws#337 (comment)
@jillr Looks like the zuul changes are merged. Could this be merged as well? |
@ichekaldin - Apologies for any spam, trying to kick the CI |
'check' was automatically cancelled because gate's now running - as long as gate passes it should merge. |
@tremble looks like the gate test fails with this:
|
@tremble Thank you! |
SUMMARY
If
security_groups
attribute is specified - module always returnsChanged
=True
.Fixes #255.
ISSUE TYPE
COMPONENT NAME
ec2_eni
ADDITIONAL INFORMATION
Example:
Will always return
Changed
=True
.