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

resource/aws_servicecatalog_provisioned_product: Return clearer error message on failure #30663

Merged
merged 8 commits into from
Apr 13, 2023

Conversation

gdavison
Copy link
Contributor

Description

When Provisioned Product fails to apply, it either returns a status of ERROR on creation on TAINTED on update when it can roll back to a previous version.

Return the error information to the practitioner so that they know it has failed. Also return the error as a top-level error instead of buried in an "unexpected state" error.

Relations

Supersedes #30522

Output from Acceptance Testing

$ make testacc PKG=servicecatalog TESTS=TestAccServiceCatalogProvisionedProduct_

--- PASS: TestAccServiceCatalogProvisionedProduct_taintedCreate (60.70s)
--- PASS: TestAccServiceCatalogProvisionedProduct_basic (141.19s)
--- PASS: TestAccServiceCatalogProvisionedProduct_disappears (143.46s)
--- PASS: TestAccServiceCatalogProvisionedProduct_tags (226.40s)
--- PASS: TestAccServiceCatalogProvisionedProduct_update (233.87s)
--- PASS: TestAccServiceCatalogProvisionedProduct_computedOutputs (249.37s)
--- PASS: TestAccServiceCatalogProvisionedProduct_taintedUpdate (269.72s)

@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull 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.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/servicecatalog Issues and PRs that pertain to the servicecatalog service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Apr 12, 2023
Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

LGTM

$ make testacc PKG=servicecatalog TESTS=TestAccServiceCatalogProvisionedProduct_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/servicecatalog/... -v -count 1 -parallel 20 -run='TestAccServiceCatalogProvisionedProduct_'  -timeout 180m
=== RUN   TestAccServiceCatalogProvisionedProduct_basic
=== PAUSE TestAccServiceCatalogProvisionedProduct_basic
=== RUN   TestAccServiceCatalogProvisionedProduct_update
=== PAUSE TestAccServiceCatalogProvisionedProduct_update
=== RUN   TestAccServiceCatalogProvisionedProduct_computedOutputs
=== PAUSE TestAccServiceCatalogProvisionedProduct_computedOutputs
=== RUN   TestAccServiceCatalogProvisionedProduct_disappears
=== PAUSE TestAccServiceCatalogProvisionedProduct_disappears
=== RUN   TestAccServiceCatalogProvisionedProduct_tags
=== PAUSE TestAccServiceCatalogProvisionedProduct_tags
=== RUN   TestAccServiceCatalogProvisionedProduct_errorOnCreate
=== PAUSE TestAccServiceCatalogProvisionedProduct_errorOnCreate
=== RUN   TestAccServiceCatalogProvisionedProduct_errorOnUpdate
=== PAUSE TestAccServiceCatalogProvisionedProduct_errorOnUpdate
=== CONT  TestAccServiceCatalogProvisionedProduct_basic
=== CONT  TestAccServiceCatalogProvisionedProduct_tags
=== CONT  TestAccServiceCatalogProvisionedProduct_computedOutputs
=== CONT  TestAccServiceCatalogProvisionedProduct_errorOnUpdate
=== CONT  TestAccServiceCatalogProvisionedProduct_errorOnCreate
=== CONT  TestAccServiceCatalogProvisionedProduct_disappears
=== CONT  TestAccServiceCatalogProvisionedProduct_update
--- PASS: TestAccServiceCatalogProvisionedProduct_errorOnCreate (53.83s)
--- PASS: TestAccServiceCatalogProvisionedProduct_disappears (133.85s)
--- PASS: TestAccServiceCatalogProvisionedProduct_basic (134.79s)
--- PASS: TestAccServiceCatalogProvisionedProduct_tags (229.65s)
--- PASS: TestAccServiceCatalogProvisionedProduct_update (232.50s)
--- PASS: TestAccServiceCatalogProvisionedProduct_computedOutputs (247.29s)
--- PASS: TestAccServiceCatalogProvisionedProduct_errorOnUpdate (270.94s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/servicecatalog     277.528s

.changelog/30588.txt Outdated Show resolved Hide resolved
@gdavison gdavison merged commit 88e4c7f into main Apr 13, 2023
@gdavison gdavison deleted the f-servicecatalog-tainted branch April 13, 2023 17:40
@github-actions github-actions bot added this to the v4.63.0 milestone Apr 13, 2023
github-actions bot pushed a commit that referenced this pull request Apr 13, 2023
@github-actions
Copy link

This functionality has been released in v4.63.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 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/servicecatalog Issues and PRs that pertain to the servicecatalog 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
Development

Successfully merging this pull request may close these issues.

3 participants