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/Synthetics: Fix invalid Lambda parameter in acceptance test failures #23394

Merged
merged 8 commits into from
Mar 2, 2022

Conversation

johnsonaj
Copy link
Contributor

@johnsonaj johnsonaj commented Feb 26, 2022

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

Closes #23391

Description

  • Retries failed canary creation to allow for IAM policy propagation.

Output from acceptance testing:

% make testacc TESTS=TestAccSyntheticsCanary PKG=synthetics
=== RUN   TestAccSyntheticsCanary_basic
=== PAUSE TestAccSyntheticsCanary_basic
=== RUN   TestAccSyntheticsCanary_artifactEncryption
=== PAUSE TestAccSyntheticsCanary_artifactEncryption
=== RUN   TestAccSyntheticsCanary_runtimeVersion
=== PAUSE TestAccSyntheticsCanary_runtimeVersion
=== RUN   TestAccSyntheticsCanary_startCanary
=== PAUSE TestAccSyntheticsCanary_startCanary
=== RUN   TestAccSyntheticsCanary_StartCanary_codeChanges
=== PAUSE TestAccSyntheticsCanary_StartCanary_codeChanges
=== RUN   TestAccSyntheticsCanary_s3
=== PAUSE TestAccSyntheticsCanary_s3
=== RUN   TestAccSyntheticsCanary_run
=== PAUSE TestAccSyntheticsCanary_run
=== RUN   TestAccSyntheticsCanary_runTracing
=== PAUSE TestAccSyntheticsCanary_runTracing
=== RUN   TestAccSyntheticsCanary_vpc
=== PAUSE TestAccSyntheticsCanary_vpc
=== RUN   TestAccSyntheticsCanary_tags
=== PAUSE TestAccSyntheticsCanary_tags
=== RUN   TestAccSyntheticsCanary_disappears
=== PAUSE TestAccSyntheticsCanary_disappears
=== CONT  TestAccSyntheticsCanary_basic
=== CONT  TestAccSyntheticsCanary_run
=== CONT  TestAccSyntheticsCanary_tags
=== CONT  TestAccSyntheticsCanary_runTracing
=== CONT  TestAccSyntheticsCanary_StartCanary_codeChanges
=== CONT  TestAccSyntheticsCanary_artifactEncryption
=== CONT  TestAccSyntheticsCanary_vpc
=== CONT  TestAccSyntheticsCanary_startCanary
=== CONT  TestAccSyntheticsCanary_s3
=== CONT  TestAccSyntheticsCanary_runtimeVersion
=== CONT  TestAccSyntheticsCanary_disappears
--- PASS: TestAccSyntheticsCanary_disappears (49.04s)
--- PASS: TestAccSyntheticsCanary_artifactEncryption (71.93s)
--- PASS: TestAccSyntheticsCanary_tags (92.03s)
--- PASS: TestAccSyntheticsCanary_s3 (92.79s)
--- PASS: TestAccSyntheticsCanary_startCanary (109.68s)
--- PASS: TestAccSyntheticsCanary_run (111.95s)
--- PASS: TestAccSyntheticsCanary_runtimeVersion (113.63s)
--- PASS: TestAccSyntheticsCanary_runTracing (118.51s)
--- PASS: TestAccSyntheticsCanary_basic (131.31s)
--- PASS: TestAccSyntheticsCanary_StartCanary_codeChanges (290.27s)
--- PASS: TestAccSyntheticsCanary_vpc (2176.74s)
PASS

@github-actions github-actions bot added service/synthetics Issues and PRs that pertain to the synthetics service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/M Managed by automation to categorize the size of a PR. and removed tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/synthetics Issues and PRs that pertain to the synthetics service. labels Feb 26, 2022
@breathingdust breathingdust added service/synthetics Issues and PRs that pertain to the synthetics service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Feb 28, 2022
@johnsonaj johnsonaj force-pushed the t-aws_synthetics_canary_retry branch from 2a7f56b to 14987fb Compare March 1, 2022 15:23
@johnsonaj johnsonaj marked this pull request as ready for review March 1, 2022 16:05
@johnsonaj johnsonaj requested a review from ewbankkit March 1, 2022 17:02
@ewbankkit
Copy link
Contributor

% make testacc TESTS=TestAccSyntheticsCanary_ PKG=synthetics
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/synthetics/... -v -count 1 -parallel 20 -run='TestAccSyntheticsCanary_'  -timeout 180m
=== RUN   TestAccSyntheticsCanary_basic
=== PAUSE TestAccSyntheticsCanary_basic
=== RUN   TestAccSyntheticsCanary_artifactEncryption
=== PAUSE TestAccSyntheticsCanary_artifactEncryption
=== RUN   TestAccSyntheticsCanary_runtimeVersion
=== PAUSE TestAccSyntheticsCanary_runtimeVersion
=== RUN   TestAccSyntheticsCanary_startCanary
=== PAUSE TestAccSyntheticsCanary_startCanary
=== RUN   TestAccSyntheticsCanary_StartCanary_codeChanges
=== PAUSE TestAccSyntheticsCanary_StartCanary_codeChanges
=== RUN   TestAccSyntheticsCanary_s3
=== PAUSE TestAccSyntheticsCanary_s3
=== RUN   TestAccSyntheticsCanary_run
=== PAUSE TestAccSyntheticsCanary_run
=== RUN   TestAccSyntheticsCanary_runTracing
=== PAUSE TestAccSyntheticsCanary_runTracing
=== RUN   TestAccSyntheticsCanary_vpc
=== PAUSE TestAccSyntheticsCanary_vpc
=== RUN   TestAccSyntheticsCanary_tags
=== PAUSE TestAccSyntheticsCanary_tags
=== RUN   TestAccSyntheticsCanary_disappears
=== PAUSE TestAccSyntheticsCanary_disappears
=== CONT  TestAccSyntheticsCanary_basic
=== CONT  TestAccSyntheticsCanary_run
=== CONT  TestAccSyntheticsCanary_startCanary
=== CONT  TestAccSyntheticsCanary_disappears
=== CONT  TestAccSyntheticsCanary_StartCanary_codeChanges
=== CONT  TestAccSyntheticsCanary_runtimeVersion
=== CONT  TestAccSyntheticsCanary_vpc
=== CONT  TestAccSyntheticsCanary_tags
=== CONT  TestAccSyntheticsCanary_runTracing
=== CONT  TestAccSyntheticsCanary_s3
=== CONT  TestAccSyntheticsCanary_artifactEncryption
--- PASS: TestAccSyntheticsCanary_disappears (61.70s)
--- PASS: TestAccSyntheticsCanary_s3 (65.49s)
=== CONT  TestAccSyntheticsCanary_StartCanary_codeChanges
    canary_test.go:224: Step 3/3 error: Error running apply: exit status 1
        
        Error: error stopping Synthetics Canary (tf-acc-test-jtkguqi7): ConflictException: Canary is in a state that can't be stopped: STOPPED
        
          with aws_synthetics_canary.test,
          on terraform_plugin_test.tf line 110, in resource "aws_synthetics_canary" "test":
         110: resource "aws_synthetics_canary" "test" {
        
=== CONT  TestAccSyntheticsCanary_startCanary
    canary_test.go:176: Step 3/4 error: Error running apply: exit status 1
        
        Error: error stopping Synthetics Canary (tf-acc-test-9nfyoxjh): ConflictException: Canary is in a state that can't be stopped: STOPPED
        
          with aws_synthetics_canary.test,
          on terraform_plugin_test.tf line 110, in resource "aws_synthetics_canary" "test":
         110: resource "aws_synthetics_canary" "test" {
        
=== CONT  TestAccSyntheticsCanary_StartCanary_codeChanges
    testing_new.go:70: Error running post-test destroy, there may be dangling resources: exit status 1
        
        Error: error stopping Synthetics Canary (tf-acc-test-jtkguqi7): ConflictException: Canary is in a state that can't be stopped: STOPPED
        
--- FAIL: TestAccSyntheticsCanary_StartCanary_codeChanges (74.97s)
=== CONT  TestAccSyntheticsCanary_startCanary
    testing_new.go:70: Error running post-test destroy, there may be dangling resources: exit status 1
        
        Error: error stopping Synthetics Canary (tf-acc-test-9nfyoxjh): ConflictException: Canary is in a state that can't be stopped: STOPPED
        
--- FAIL: TestAccSyntheticsCanary_startCanary (75.10s)
--- PASS: TestAccSyntheticsCanary_artifactEncryption (93.06s)
--- PASS: TestAccSyntheticsCanary_basic (107.19s)
--- PASS: TestAccSyntheticsCanary_tags (110.31s)
--- PASS: TestAccSyntheticsCanary_runTracing (111.80s)
--- PASS: TestAccSyntheticsCanary_runtimeVersion (116.66s)
--- PASS: TestAccSyntheticsCanary_run (125.78s)
--- PASS: TestAccSyntheticsCanary_vpc (2151.63s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/synthetics	2156.169s
FAIL
make: *** [testacc] Error 1

Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

@johnsonaj johnsonaj merged commit be00b26 into main Mar 2, 2022
@johnsonaj johnsonaj deleted the t-aws_synthetics_canary_retry branch March 2, 2022 21:11
@github-actions github-actions bot added this to the v4.4.0 milestone Mar 2, 2022
github-actions bot pushed a commit that referenced this pull request Mar 2, 2022
@github-actions
Copy link

github-actions bot commented Mar 4, 2022

This functionality has been released in v4.4.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 May 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/synthetics Issues and PRs that pertain to the synthetics service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
3 participants