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

Fix panic when planning orphaned deposed instances #32663

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

alisdair
Copy link
Contributor

This is a highly local fix for a panic which seems to arise when planning orphaned deposed instances. There are two other things to investigate in response to this issue, likely addressing each in follow-up PRs:

  • Fix the graph transformers so that we don't add orphan processing nodes when the instance is deposed;
  • Investigate why readResourceInstanceState needs to return nil, nil in the first place, and redesign it if possible so that we don't have this class of bug elsewhere.

(I may have misunderstood an out-of-band discussion about this, and if we might not want to use this approach at all, in which case we'll probably just fix the graph transformers instead.)

Fixes #32645 (probably; we don't have a full reproduction to validate this)

Target Release

1.3.x

This is a panic and a narrowly-scoped fix, so I think we should backport it.

Draft CHANGELOG entry

BUG FIXES

  • Fix crash when planning to remove already-deposed resource instances.

@alisdair alisdair added the 1.3-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Feb 10, 2023
@alisdair alisdair requested a review from a team February 10, 2023 20:40
@alisdair alisdair self-assigned this Feb 10, 2023
@alisdair alisdair added the 1.4-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Feb 11, 2023
@alisdair alisdair merged commit 12d00e6 into main Feb 13, 2023
@alisdair alisdair deleted the alisdair/read-resource-instance-state-nil-checks branch February 13, 2023 14:50
@github-actions
Copy link
Contributor

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

@github-actions
Copy link
Contributor

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 contributions.
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 Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.3-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged 1.4-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terraform crashes in recent versions - invalid memory address or nil pointer dereference goroutine 3192
2 participants