relevant attributes: strip out invalid relevant attributes from the plan#37290
Merged
liamcervante merged 4 commits intomainfrom Jul 9, 2025
Merged
relevant attributes: strip out invalid relevant attributes from the plan#37290liamcervante merged 4 commits intomainfrom
liamcervante merged 4 commits intomainfrom
Conversation
e446d94 to
847b302
Compare
dsa0x
approved these changes
Jul 7, 2025
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because
try()andcan()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