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

[Tech Debt]: codepipeline tests failing with panic #32577

Closed
jar-b opened this issue Jul 18, 2023 · 3 comments · Fixed by #32578
Closed

[Tech Debt]: codepipeline tests failing with panic #32577

jar-b opened this issue Jul 18, 2023 · 3 comments · Fixed by #32578
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/codepipeline Issues and PRs that pertain to the codepipeline service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Milestone

Comments

@jar-b
Copy link
Member

jar-b commented Jul 18, 2023

Description

Several codepipeline acceptance tests are crashing during test PreChecks.

make testacc PKG=codepipeline TESTS=TestAccCodePipeline_basic
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/codepipeline/... -v -count 1 -parallel 20 -run='TestAccCodePipeline_basic'  -timeout 180m
=== RUN   TestAccCodePipeline_basic
=== PAUSE TestAccCodePipeline_basic
=== CONT  TestAccCodePipeline_basic
--- FAIL: TestAccCodePipeline_basic (0.88s)
panic: unknown service package: codepipeline [recovered]
        panic: unknown service package: codepipeline

goroutine 10 [running]:
testing.tRunner.func1.2({0x110c2e820, 0x140032f6800})
        /opt/homebrew/Cellar/go/1.20.5/libexec/src/testing/testing.go:1526 +0x1c8
testing.tRunner.func1()
        /opt/homebrew/Cellar/go/1.20.5/libexec/src/testing/testing.go:1529 +0x384
panic({0x110c2e820, 0x140032f6800})
        /opt/homebrew/Cellar/go/1.20.5/libexec/src/runtime/panic.go:884 +0x204
github.com/hashicorp/terraform-provider-aws/internal/errs.Must[...](...)
        /Users/jaredbaker/development/terraform-provider-aws/internal/errs/must.go:13
github.com/hashicorp/terraform-provider-aws/internal/conns.(*AWSClient).CodePipelineConn(0x14003187608?, {0x112ccc700?, 0x140031116e0?})
        /Users/jaredbaker/development/terraform-provider-aws/internal/conns/awsclient_gen.go:569 +0x60
github.com/hashicorp/terraform-provider-aws/internal/service/codepipeline_test.testAccPreCheckSupported({0x112ccc700, 0x140031116e0}, 0x1400311e820, {0x0, 0x0, 0x0})
        /Users/jaredbaker/development/terraform-provider-aws/internal/service/codepipeline/codepipeline_test.go:678 +0x1b8
github.com/hashicorp/terraform-provider-aws/internal/service/codepipeline_test.TestAccCodePipeline_basic.func1()
        /Users/jaredbaker/development/terraform-provider-aws/internal/service/codepipeline/codepipeline_test.go:34 +0x50
github.com/hashicorp/terraform-plugin-testing/helper/resource.Test({0x112ceea60, 0x1400311e820}, {0x0, 0x140030e7ee0, {0x0, 0x0, 0x0}, 0x0, 0x140008b3320, 0x0, ...})
        /Users/jaredbaker/go/pkg/mod/github.com/hashicorp/terraform-plugin-testing@v1.3.0/helper/resource/testing.go:817 +0x384
github.com/hashicorp/terraform-plugin-testing/helper/resource.ParallelTest({0x112ceea60, 0x1400311e820}, {0x0, 0x140030e7ee0, {0x0, 0x0, 0x0}, 0x0, 0x140008b3320, 0x0, ...})
        /Users/jaredbaker/go/pkg/mod/github.com/hashicorp/terraform-plugin-testing@v1.3.0/helper/resource/testing.go:737 +0x70
github.com/hashicorp/terraform-provider-aws/internal/service/codepipeline_test.TestAccCodePipeline_basic(0x1400311e820)
        /Users/jaredbaker/development/terraform-provider-aws/internal/service/codepipeline/codepipeline_test.go:31 +0x11ec
testing.tRunner(0x1400311e820, 0x112b9a9c8)
        /opt/homebrew/Cellar/go/1.20.5/libexec/src/testing/testing.go:1576 +0x10c
created by testing.(*T).Run
        /opt/homebrew/Cellar/go/1.20.5/libexec/src/testing/testing.go:1629 +0x368
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/codepipeline       4.100s
FAIL
make: *** [testacc] Error 1

This appears to be caused by the PreCheck passing a plan AWSClient struct to the ConfigureProvider method.

for _, region := range regions {
conf := &conns.Config{
Region: region,
}
client, diags := conf.ConfigureProvider(ctx, &conns.AWSClient{})

References

No response

Would you like to implement a fix?

None

@jar-b jar-b added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/codepipeline Issues and PRs that pertain to the codepipeline service. labels Jul 18, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions
Copy link

This functionality has been released in v5.9.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 Aug 20, 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. crash Results from or addresses a Terraform crash or kernel panic. service/codepipeline Issues and PRs that pertain to the codepipeline service. 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.

1 participant