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

Filter ephemeral marks from planned value #36619

Merged
merged 4 commits into from
Mar 4, 2025
Merged

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Mar 3, 2025

The filtering of ephemeral marks for the planned value was incorrectly using PathsWithMark, which only reports paths containing a specific mark or not, and can't account for multiple marks on a particular path. Create a marks.RemoveAll function which allows for correct filtering.

Fixes #36603

Target Release

v1.11

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

jbardin added 3 commits March 3, 2025 13:01
RemoveAll filters marks from a set of cty.PathValueMarks, removing all
instances of the remove parameter in all paths. If a path has no
remaining marks, it is removed entirely.
PathsWithMark was incorrectly used to try and filter out ephemeral
marks, but that doesn't work when a path has multiple marks.
PathsWithMark was adding the same path multiple times if it had multiple
extra marks.
@jbardin jbardin added the 1.11-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Mar 3, 2025
@jbardin jbardin marked this pull request as ready for review March 3, 2025 19:42
@jbardin jbardin requested a review from a team as a code owner March 3, 2025 19:42
@jbardin jbardin merged commit 60aaaf3 into main Mar 4, 2025
14 of 16 checks passed
@jbardin jbardin deleted the jbardin/filter-ephemeral-marks branch March 4, 2025 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.11-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.

Cannot use variable with both ephemeral=true and sensitive=true - serialization error in state
2 participants