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

tests/service/ec2: Various Tests Returning InvalidVpcID.NotFound Without Context #17458

Closed
bflad opened this issue Feb 4, 2021 · 4 comments · Fixed by #22776
Closed

tests/service/ec2: Various Tests Returning InvalidVpcID.NotFound Without Context #17458

bflad opened this issue Feb 4, 2021 · 4 comments · Fixed by #22776
Labels
service/ec2 Issues and PRs that pertain to the ec2 service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Feb 4, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

During last night's test run there are quite a few occurrences of InvalidVpcID.NotFound errors being returned without saying what resource was affected:

=== CONT  TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate
resource_aws_cloudwatch_metric_alarm_test.go:50: Step 1/5 error: Error running apply:
Error: InvalidVpcID.NotFound: The vpc ID 'vpc-06df3c67f05b290f9' does not exist
  status code: 400, request id: 7937d108-11e7-44f8-8dda-b3cda2c3c2c7
--- FAIL: TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate (29.71s)

=== CONT  TestAccAWSDBInstance_subnetGroup
resource_aws_db_instance_test.go:206: Step 1/2 error: Error running apply:
Error: InvalidVpcID.NotFound: The vpc ID 'vpc-04a0eac03492ad4ac' does not exist
  status code: 400, request id: 418149f2-9ce2-446c-8464-7113c1657865
--- FAIL: TestAccAWSDBInstance_subnetGroup (8.11s)

=== CONT  TestAccAwsDxGatewayAssociationProposal_disappears
resource_aws_dx_gateway_association_proposal_test.go:165: Step 1/1 error: Error running apply:
Error: InvalidVpcID.NotFound: The vpc ID 'vpc-037a7d930d06d0510' does not exist
  status code: 400, request id: ea500ab3-8f33-4fd6-8a7d-8e5ba04d3c1d
--- FAIL: TestAccAwsDxGatewayAssociationProposal_disappears (82.86s)

=== CONT  TestAccAWSEcsService_withServiceRegistries_container
resource_aws_ecs_service_test.go:1119: Step 1/1 error: Error running apply:
Error: InvalidVpcID.NotFound: The vpc ID 'vpc-0a1e9057a0d7002c8' does not exist
  status code: 400, request id: 9d832640-5827-4620-9e39-d552db03d9f0
--- FAIL: TestAccAWSEcsService_withServiceRegistries_container (18.89s)

=== CONT  TestAccAWSEIPAssociation_networkInterface
resource_aws_eip_association_test.go:43: Step 1/2 error: Error running apply:
Error: InvalidVpcID.NotFound: The vpc ID 'vpc-0c74d5cbeba64f82e' does not exist
  status code: 400, request id: 1bca75e9-4614-4312-a74e-eda54a43e66b
--- FAIL: TestAccAWSEIPAssociation_networkInterface (10.21s)

The cause for the error is likely EC2 eventual consistency issues when operating at 20 test concurrency, but the lack of context makes it hard to fix the affected resources. Without looking, it is possible there is a single or multiple resources affected, but this issue is for fixing the error messaging to follow better practices instead of returning a bare error.

Once the TeamCity run completes, the debug logs will also be available.

Affected Resource(s)

  • TBD

References

@bflad bflad added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ec2 Issues and PRs that pertain to the ec2 service. technical-debt Addresses areas of the codebase that need refactoring or redesign. labels Feb 4, 2021
@bflad bflad added this to the Roadmap milestone Feb 4, 2021
@bflad
Copy link
Contributor Author

bflad commented Feb 5, 2021

Relevant resources and API calls:

  • (2x) aws_vpc: ec2/DescribeVpcClassicLink
  • aws_vpc: ec2/DescribeVpcs (waiting to become available)
  • (2x) aws_vpc: ec2/DescribeVpcAttribute

DescribeVpcAttribute error message updates are covered by #17461 -- the others will need to be separately addressed.

@anGie44
Copy link
Contributor

anGie44 commented Jan 26, 2022

Fixed with #22253

@github-actions
Copy link

This functionality has been released in v4.0.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 issue 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 similar to this, 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 May 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/ec2 Issues and PRs that pertain to the ec2 service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants