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

r/aws_route53_zone: Fix crash when deleting the resource would otherwise return an error #41260

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Feb 6, 2025

Description

Missing error handling leads to nil pointer exception.

Relations

Closes #41247.

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccRoute53Zone_basic\|TestAccRoute53Zone_disappears' PKG=route53
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.5 test ./internal/service/route53/... -v -count 1 -parallel 20  -run=TestAccRoute53Zone_basic\|TestAccRoute53Zone_disappears -timeout 360m -vet=off
2025/02/06 08:35:22 Initializing Terraform AWS Provider...
=== RUN   TestAccRoute53Zone_basic
=== PAUSE TestAccRoute53Zone_basic
=== RUN   TestAccRoute53Zone_disappears
=== PAUSE TestAccRoute53Zone_disappears
=== CONT  TestAccRoute53Zone_basic
=== CONT  TestAccRoute53Zone_disappears
--- PASS: TestAccRoute53Zone_basic (85.15s)
--- PASS: TestAccRoute53Zone_disappears (85.75s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/route53	91.261s

… or nil pointer dereference` when deleting the resource would otherwise return an error.
@ewbankkit ewbankkit requested a review from a team as a code owner February 6, 2025 13:32
Copy link

github-actions bot commented Feb 6, 2025

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 service/route53 Issues and PRs that pertain to the route53 service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Feb 6, 2025
@ewbankkit ewbankkit added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. labels Feb 6, 2025
Copy link
Contributor

@johnsonaj johnsonaj 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 TESTARGS='-run=TestAccRoute53Zone_basic\|TestAccRoute53Zone_disappears' PKG=route53

make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.5 test ./internal/service/route53/... -v -count 1 -parallel 20  -run=TestAccRoute53Zone_basic\|TestAccRoute53Zone_disappears -timeout 360m -vet=off
2025/02/06 10:18:18 Initializing Terraform AWS Provider...
=== RUN   TestAccRoute53Zone_basic
=== PAUSE TestAccRoute53Zone_basic
=== RUN   TestAccRoute53Zone_disappears
=== PAUSE TestAccRoute53Zone_disappears
=== CONT  TestAccRoute53Zone_basic
=== CONT  TestAccRoute53Zone_disappears
--- PASS: TestAccRoute53Zone_disappears (115.36s)
--- PASS: TestAccRoute53Zone_basic (115.91s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/route53	122.517s

@ewbankkit ewbankkit merged commit c9fc873 into main Feb 6, 2025
54 checks passed
@ewbankkit ewbankkit deleted the b-aws_route53_zone-delete-crash branch February 6, 2025 15:25
@github-actions github-actions bot added this to the v5.86.0 milestone Feb 6, 2025
terraform-aws-provider bot pushed a commit that referenced this pull request Feb 6, 2025
Copy link

github-actions bot commented Feb 6, 2025

This functionality has been released in v5.86.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 github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Feb 6, 2025
PatMyron pushed a commit to PatMyron/terraform-provider-aws that referenced this pull request Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/route53 Issues and PRs that pertain to the route53 service.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: SIGSEGV when handling Route53 hosted zones
2 participants