Skip to content

relevant attributes: strip out invalid relevant attributes from the plan#37290

Merged
liamcervante merged 4 commits intomainfrom
liamcervante/37271
Jul 9, 2025
Merged

relevant attributes: strip out invalid relevant attributes from the plan#37290
liamcervante merged 4 commits intomainfrom
liamcervante/37271

Conversation

@liamcervante
Copy link
Copy Markdown
Contributor

@liamcervante liamcervante commented Jul 3, 2025

Because try() and can() functions hide invalid references, these invalid references can find their way into the relevant attributes field in the plan. The plan renderer might then crash if it tries to render drift derived from those attributes since the plan renderer assumes everything in the plan is valid.

This PR updates the plan generation so that it checks relevant attributes before putting them into the plan, and will truncate invalid or unknown references back to highest order "valid" reference in the traversal. Dynamic references are also truncated as we have no way of knowing if they are valid or not based on the schema alone.

Fixes #37271

Target Release

1.13.x

@liamcervante liamcervante added the no-changelog-needed Add this to your PR if the change does not require a changelog entry label Jul 3, 2025
@liamcervante liamcervante removed the no-changelog-needed Add this to your PR if the change does not require a changelog entry label Jul 4, 2025
@liamcervante liamcervante marked this pull request as ready for review July 4, 2025 15:05
@liamcervante liamcervante requested a review from a team as a code owner July 4, 2025 15:05
@liamcervante liamcervante merged commit e9c2c26 into main Jul 9, 2025
8 checks passed
@liamcervante liamcervante deleted the liamcervante/37271 branch July 9, 2025 11:05
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 9, 2025

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 Aug 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash after ugrading to Helm provider 3

2 participants