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

Added check for on_failure before resetting disable_rollback during refresh #10539

Merged
merged 7 commits into from
May 28, 2021

Conversation

spavuluri
Copy link
Contributor

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" comments, they generate extra noise for pull request followers and do not help prioritize the request

Closes #5204

Release note for CHANGELOG:

NONE

Output from acceptance testing:

TF_ACC=1 go test ./... -v -count 1 -parallel 1 -run=TestAccAWSCloudFormationStack_ -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSCloudFormationStack_dataSource_basic
=== PAUSE TestAccAWSCloudFormationStack_dataSource_basic
=== RUN   TestAccAWSCloudFormationStack_dataSource_yaml
=== PAUSE TestAccAWSCloudFormationStack_dataSource_yaml
=== RUN   TestAccAWSCloudFormationStack_importBasic
=== PAUSE TestAccAWSCloudFormationStack_importBasic
=== RUN   TestAccAWSCloudFormationStack_basic
=== PAUSE TestAccAWSCloudFormationStack_basic
=== RUN   TestAccAWSCloudFormationStack_disappears
=== PAUSE TestAccAWSCloudFormationStack_disappears
=== RUN   TestAccAWSCloudFormationStack_yaml
=== PAUSE TestAccAWSCloudFormationStack_yaml
=== RUN   TestAccAWSCloudFormationStack_defaultParams
=== PAUSE TestAccAWSCloudFormationStack_defaultParams
=== RUN   TestAccAWSCloudFormationStack_allAttributes
=== PAUSE TestAccAWSCloudFormationStack_allAttributes
=== RUN   TestAccAWSCloudFormationStack_withParams
=== PAUSE TestAccAWSCloudFormationStack_withParams
=== RUN   TestAccAWSCloudFormationStack_withUrl_withParams
=== PAUSE TestAccAWSCloudFormationStack_withUrl_withParams
=== RUN   TestAccAWSCloudFormationStack_withUrl_withParams_withYaml
=== PAUSE TestAccAWSCloudFormationStack_withUrl_withParams_withYaml
=== RUN   TestAccAWSCloudFormationStack_withUrl_withParams_noUpdate
=== PAUSE TestAccAWSCloudFormationStack_withUrl_withParams_noUpdate
=== RUN   TestAccAWSCloudFormationStack_onFailure
=== PAUSE TestAccAWSCloudFormationStack_onFailure
=== CONT  TestAccAWSCloudFormationStack_dataSource_basic
--- PASS: TestAccAWSCloudFormationStack_dataSource_basic (73.95s)
=== CONT  TestAccAWSCloudFormationStack_onFailure
--- PASS: TestAccAWSCloudFormationStack_onFailure (54.84s)
=== CONT  TestAccAWSCloudFormationStack_withUrl_withParams_noUpdate
--- PASS: TestAccAWSCloudFormationStack_withUrl_withParams_noUpdate (116.51s)
=== CONT  TestAccAWSCloudFormationStack_withUrl_withParams_withYaml
--- PASS: TestAccAWSCloudFormationStack_withUrl_withParams_withYaml (92.23s)
=== CONT  TestAccAWSCloudFormationStack_disappears
--- PASS: TestAccAWSCloudFormationStack_disappears (70.03s)
=== CONT  TestAccAWSCloudFormationStack_basic
--- PASS: TestAccAWSCloudFormationStack_basic (66.80s)
=== CONT  TestAccAWSCloudFormationStack_importBasic
--- PASS: TestAccAWSCloudFormationStack_importBasic (69.34s)
=== CONT  TestAccAWSCloudFormationStack_dataSource_yaml
--- PASS: TestAccAWSCloudFormationStack_dataSource_yaml (71.97s)
=== CONT  TestAccAWSCloudFormationStack_withParams
--- PASS: TestAccAWSCloudFormationStack_withParams (125.73s)
=== CONT  TestAccAWSCloudFormationStack_withUrl_withParams
--- PASS: TestAccAWSCloudFormationStack_withUrl_withParams (162.55s)
=== CONT  TestAccAWSCloudFormationStack_allAttributes
--- PASS: TestAccAWSCloudFormationStack_allAttributes (80.48s)
=== CONT  TestAccAWSCloudFormationStack_defaultParams
--- PASS: TestAccAWSCloudFormationStack_defaultParams (68.02s)
=== CONT  TestAccAWSCloudFormationStack_yaml
--- PASS: TestAccAWSCloudFormationStack_yaml (68.65s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	1122.636s
...

@spavuluri spavuluri requested a review from a team October 17, 2019 17:27
@ghost ghost added size/S Managed by automation to categorize the size of a PR. service/cloudformation Issues and PRs that pertain to the cloudformation service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 17, 2019
@spavuluri spavuluri force-pushed the 5204-cloudformation-onfailure branch from 7f96635 to a00e976 Compare January 16, 2020 15:45
@spavuluri spavuluri force-pushed the 5204-cloudformation-onfailure branch from a00e976 to 55e72f4 Compare March 17, 2020 17:24
@lorengordon
Copy link
Contributor

I hate to ping anyone that isn't already involved with a pr, so guess I'll just drop this here and hope that activity alone might get it some attention. This patch seems pretty straightforward. Would love to see it released!

@spavuluri spavuluri force-pushed the 5204-cloudformation-onfailure branch from 55e72f4 to 3a70ae5 Compare July 16, 2020 19:58
Base automatically changed from master to main January 23, 2021 00:56
@breathingdust breathingdust requested a review from a team as a code owner January 23, 2021 00:56
@YakDriver YakDriver self-assigned this May 28, 2021
@YakDriver YakDriver force-pushed the 5204-cloudformation-onfailure branch from 3a70ae5 to b188209 Compare May 28, 2021 03:08
@YakDriver YakDriver added this to the v3.43.0 milestone May 28, 2021
Copy link
Member

@YakDriver YakDriver 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! 🎉

Output from acceptance tests (us-west-2):

--- PASS: TestAccAWSCloudFormationStack_CreationFailure_Delete (20.33s)
--- PASS: TestAccAWSCloudFormationStack_CreationFailure_DoNothing (40.19s)
--- PASS: TestAccAWSCloudFormationStack_onFailure (65.31s)
--- PASS: TestAccAWSCloudFormationStack_basic (79.48s)
--- PASS: TestAccAWSCloudFormationStack_CreationFailure_Rollback (82.24s)
--- PASS: TestAccAWSCloudFormationStack_dataSource_yaml (82.54s)
--- PASS: TestAccAWSCloudFormationStack_disappears (93.00s)
--- PASS: TestAccAWSCloudFormationStack_withTransform (93.01s)
--- PASS: TestAccAWSCloudFormationStack_yaml (94.60s)
--- PASS: TestAccAWSCloudFormationStack_dataSource_basic (95.36s)
--- PASS: TestAccAWSCloudFormationStack_withUrl_withParams_withYaml (96.28s)
--- PASS: TestAccAWSCloudFormationStack_defaultParams (97.90s)
--- PASS: TestAccAWSCloudFormationStack_UpdateFailure (108.56s)
--- PASS: TestAccAWSCloudFormationStack_allAttributes (109.13s)
--- PASS: TestAccAWSCloudFormationStack_withUrl_withParams_noUpdate (123.03s)
--- PASS: TestAccAWSCloudFormationStack_withParams (144.75s)
--- PASS: TestAccAWSCloudFormationStack_withUrl_withParams (188.87s)

Output from acceptance tests (GovCloud):

--- PASS: TestAccAWSCloudFormationStack_CreationFailure_DoNothing (34.30s)
--- PASS: TestAccAWSCloudFormationStack_CreationFailure_Delete (73.62s)
--- PASS: TestAccAWSCloudFormationStack_disappears (75.29s)
--- PASS: TestAccAWSCloudFormationStack_CreationFailure_Rollback (77.00s)
--- PASS: TestAccAWSCloudFormationStack_dataSource_yaml (77.31s)
--- PASS: TestAccAWSCloudFormationStack_withTransform (78.18s)
--- PASS: TestAccAWSCloudFormationStack_onFailure (82.04s)
--- PASS: TestAccAWSCloudFormationStack_defaultParams (84.17s)
--- PASS: TestAccAWSCloudFormationStack_withUrl_withParams_withYaml (85.98s)
--- PASS: TestAccAWSCloudFormationStack_basic (89.50s)
--- PASS: TestAccAWSCloudFormationStack_yaml (94.55s)
--- PASS: TestAccAWSCloudFormationStack_UpdateFailure (117.11s)
--- PASS: TestAccAWSCloudFormationStack_dataSource_basic (117.12s)
--- PASS: TestAccAWSCloudFormationStack_allAttributes (130.44s)
--- PASS: TestAccAWSCloudFormationStack_withUrl_withParams_noUpdate (145.52s)
--- PASS: TestAccAWSCloudFormationStack_withParams (148.26s)
--- PASS: TestAccAWSCloudFormationStack_withUrl_withParams (174.83s)

@ghost ghost added size/L Managed by automation to categorize the size of a PR. and removed size/S Managed by automation to categorize the size of a PR. labels May 28, 2021
@YakDriver
Copy link
Member

Acceptance tests are still good:

--- PASS: TestAccAWSCloudFormationStack_CreationFailure_Delete (20.27s)
--- PASS: TestAccAWSCloudFormationStack_CreationFailure_Rollback (42.10s)
--- PASS: TestAccAWSCloudFormationStack_CreationFailure_DoNothing (52.11s)
--- PASS: TestAccAWSCloudFormationStack_onFailure (74.46s)
--- PASS: TestAccAWSCloudFormationStack_disappears (80.10s)
--- PASS: TestAccAWSCloudFormationStack_allAttributes (86.98s)
--- PASS: TestAccAWSCloudFormationStack_yaml (90.33s)
--- PASS: TestAccAWSCloudFormationStack_defaultParams (93.26s)
--- PASS: TestAccAWSCloudFormationStack_withTransform (96.32s)
--- PASS: TestAccAWSCloudFormationStack_dataSource_yaml (98.33s)
--- PASS: TestAccAWSCloudFormationStack_basic (101.58s)
--- PASS: TestAccAWSCloudFormationStack_UpdateFailure (105.52s)
--- PASS: TestAccAWSCloudFormationStack_withUrl_withParams_withYaml (111.54s)
--- PASS: TestAccAWSCloudFormationStack_dataSource_basic (135.26s)
--- PASS: TestAccAWSCloudFormationStack_withUrl_withParams_noUpdate (137.47s)
--- PASS: TestAccAWSCloudFormationStack_withParams (141.33s)
--- PASS: TestAccAWSCloudFormationStack_withUrl_withParams (155.00s)

@lorengordon
Copy link
Contributor

@YakDriver There's a chance this also fixes #1807 ...

@ghost
Copy link

ghost commented Jun 1, 2021

This has been released in version 3.43.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 for triage. Thanks!

@github-actions
Copy link

github-actions bot commented Jul 2, 2021

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 Jul 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/cloudformation Issues and PRs that pertain to the cloudformation service. size/L 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.

Always delete/create with aws_cloudformation_stack when on_failure=DO_NOTHING
3 participants