Skip to content
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

fix: retry find the association in resourceNetworkACLAssociationRead #26838

Merged
merged 2 commits into from
Mar 16, 2023
Merged

fix: retry find the association in resourceNetworkACLAssociationRead #26838

merged 2 commits into from
Mar 16, 2023

Conversation

ringods
Copy link
Contributor

@ringods ringods commented Sep 16, 2022

Signed-off-by: Ringo De Smet ringo@de-smet.name

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Fixes #23142

Similar to this comment, we have frequent errors returning:

Error: error reading EC2 Network ACL Association (aclassoc-XXXXX): empty result

The change wraps a retry around the function to find the network acl association, until the propagationTimeout (currently 2 minutes). This lowers the nr of emtpy result cases for the network acl association drastically in the setups where we encountered this previously.

Output from acceptance testing:

make testacc TESTS='TestAccVPCNetworkACLAssociation_' PKG=ec2                                                                                                                                                       main ●  01:06 Dur  13:05:43
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCNetworkACLAssociation_'  -timeout 180m
=== RUN   TestAccVPCNetworkACLAssociation_basic
=== PAUSE TestAccVPCNetworkACLAssociation_basic
=== RUN   TestAccVPCNetworkACLAssociation_disappears
=== PAUSE TestAccVPCNetworkACLAssociation_disappears
=== RUN   TestAccVPCNetworkACLAssociation_disappears_NACL
=== PAUSE TestAccVPCNetworkACLAssociation_disappears_NACL
=== RUN   TestAccVPCNetworkACLAssociation_disappears_Subnet
=== PAUSE TestAccVPCNetworkACLAssociation_disappears_Subnet
=== RUN   TestAccVPCNetworkACLAssociation_twoAssociations
=== PAUSE TestAccVPCNetworkACLAssociation_twoAssociations
=== RUN   TestAccVPCNetworkACLAssociation_associateWithDefaultNACL
=== PAUSE TestAccVPCNetworkACLAssociation_associateWithDefaultNACL
=== CONT  TestAccVPCNetworkACLAssociation_basic
=== CONT  TestAccVPCNetworkACLAssociation_disappears_Subnet
=== CONT  TestAccVPCNetworkACLAssociation_disappears_NACL
=== CONT  TestAccVPCNetworkACLAssociation_associateWithDefaultNACL
=== CONT  TestAccVPCNetworkACLAssociation_disappears
=== CONT  TestAccVPCNetworkACLAssociation_twoAssociations
--- PASS: TestAccVPCNetworkACLAssociation_disappears_Subnet (47.24s)
--- PASS: TestAccVPCNetworkACLAssociation_disappears (47.72s)
--- PASS: TestAccVPCNetworkACLAssociation_disappears_NACL (47.73s)
--- PASS: TestAccVPCNetworkACLAssociation_associateWithDefaultNACL (50.77s)
--- PASS: TestAccVPCNetworkACLAssociation_basic (51.21s)
--- PASS: TestAccVPCNetworkACLAssociation_twoAssociations (57.43s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        59.880s
Time: 0h:01m:14s                                                                         

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. size/XS Managed by automation to categorize the size of a PR. service/vpc Issues and PRs that pertain to the vpc service. labels Sep 16, 2022
@ringods ringods marked this pull request as ready for review September 16, 2022 11:23
@ringods ringods changed the title Retry find the association in resourceNetworkACLAssociationRead fix: retry find the association in resourceNetworkACLAssociationRead Sep 16, 2022
@ewbankkit ewbankkit added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Sep 28, 2022
@ringods
Copy link
Contributor Author

ringods commented Oct 11, 2022

Hello @ewbankkit, what is the process to get this PR merged? Is something missing from my PR to have this accepted?

@gdavison gdavison self-assigned this Mar 15, 2023
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🚀

--- PASS: TestAccVPCNetworkACLAssociation_disappears_NACL (65.02s)
--- PASS: TestAccVPCNetworkACLAssociation_disappears (66.04s)
--- PASS: TestAccVPCNetworkACLAssociation_disappears_Subnet (67.43s)
--- PASS: TestAccVPCNetworkACLAssociation_associateWithDefaultNACL (73.75s)
--- PASS: TestAccVPCNetworkACLAssociation_basic (74.16s)
--- PASS: TestAccVPCNetworkACLAssociation_twoAssociations (78.67s)

ringods added 2 commits March 15, 2023 16:57
Signed-off-by: Ringo De Smet <ringo@de-smet.name>
Signed-off-by: Ringo De Smet <ringo@de-smet.name>
@gdavison gdavison merged commit f1a1966 into hashicorp:main Mar 16, 2023
@github-actions github-actions bot added this to the v4.59.0 milestone Mar 16, 2023
@ringods ringods deleted the b-aws_network_acl_association-retry-read branch March 16, 2023 07:14
@github-actions
Copy link

This functionality has been released in v4.59.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/vpc Issues and PRs that pertain to the vpc service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error reading EC2 Network ACL Rule
3 participants