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

plan renderer: render unknown nested blocks properly #35644

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

liamcervante
Copy link
Member

@liamcervante liamcervante commented Aug 27, 2024

This PR updates the rendering logic so that it properly renders the contents of a nested block that is becoming unknown. Previously, we'd only render a single item for the whole nested block. Now we should a single item being created that is unknown, and all existing entries being marked as deleted.

In addition, this change fixes a crash that would occur when nested blocks were becoming unknown and contained attributes that were forcing the resource to be replaced. We weren't properly accounting for the nested indices within the replacement list, and now since we are properly computing the diffs we are.

Fixes #35556

Target Release

v1.9.7

CHANGELOG entry

BUG FIXES

  • Plan renderer: Fix crash that occurs when attempting to render unknown nested blocks that contain attributes forcing replacement.
  • Plan renderer: Render complete changes within unknown nested blocks.

@liamcervante liamcervante changed the title add test case for reproduction plan renderer: render unknown nested blocks properly Sep 11, 2024
@liamcervante liamcervante marked this pull request as ready for review September 11, 2024 09:29
@liamcervante liamcervante requested a review from a team September 11, 2024 09:29
Copy link
Member

@kmoe kmoe left a comment

Choose a reason for hiding this comment

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

needs backport label?

@liamcervante liamcervante added the 1.9-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Sep 11, 2024
@liamcervante liamcervante merged commit abd6b9e into main Sep 11, 2024
10 checks passed
@liamcervante liamcervante deleted the liamcervante/35556 branch September 11, 2024 12:20
Copy link
Contributor

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

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 Oct 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.9-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 CRASH when importing google_composer_environment resource
2 participants