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

Correctly compare unordered sets of marks #27318

Merged
merged 2 commits into from
Dec 17, 2020
Merged

Correctly compare unordered sets of marks #27318

merged 2 commits into from
Dec 17, 2020

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Dec 17, 2020

When comparing marks for values during plan and apply, we need to ensure the order of the marked paths is consistent. Since the marks themselves were not ordered, we would occasionally turn NoOp plans to Update when there was no change to the values or sensitivity. This could then cascade through the plan causing numerous changes to appear with no clear cause.

Fixes #27287

@jbardin jbardin requested a review from a team December 17, 2020 17:44
@codecov
Copy link

codecov bot commented Dec 17, 2020

Codecov Report

Merging #27318 (1309b36) into master (428d404) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
terraform/marks.go 100.00% <100.00%> (ø)
terraform/node_resource_abstract_instance.go 71.87% <100.00%> (ø)
terraform/node_resource_plan.go 96.11% <0.00%> (-1.95%) ⬇️
dag/marshal.go 61.90% <0.00%> (-1.59%) ⬇️

@jbardin
Copy link
Member Author

jbardin commented Dec 17, 2020

This will need to be backported to 0.14, but must be done manually due to significant refactoring in master.

When comparing marks for values during plan and apply, we need to ensure
the order of the marked paths is consistent.
This plan would occasionally show changes when there weren't any due to
the sensitive marks being compared incorrectly.
@jbardin jbardin merged commit f5187aa into master Dec 17, 2020
@jbardin jbardin deleted the jbardin/path-marks branch December 17, 2020 18:49
jbardin added a commit that referenced this pull request Dec 17, 2020
@ghost
Copy link

ghost commented Jan 17, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Jan 17, 2021
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.

google_compute_instance_template: Error: doesn't support update
2 participants