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

De-duplicate count validate code #27410

Merged
merged 2 commits into from
Jan 5, 2021
Merged

De-duplicate count validate code #27410

merged 2 commits into from
Jan 5, 2021

Conversation

pselle
Copy link
Contributor

@pselle pselle commented Jan 5, 2021

There was a special, duplicate function that could be replaced by calling evaluateCountExpressionValue, and removes duplicate code. The diff here may be confusing to read inline, but reading the raw file or splitting the diff makes the change fairly clear.

Fixes #27403.

pselle added 2 commits January 5, 2021 11:26
There was a special, duplicate function that could be replaced by
calling evaluateCountExpressionValue, and removes duplicate code
The diff here is largely a refactor to allow the test to run multiple cases
@codecov
Copy link

codecov bot commented Jan 5, 2021

Codecov Report

Merging #27410 (dbde1be) into master (e974857) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
terraform/node_resource_validate.go 68.11% <100.00%> (+7.44%) ⬆️
terraform/node_resource_plan.go 96.11% <0.00%> (-1.95%) ⬇️
states/statefile/version4.go 57.96% <0.00%> (-0.24%) ⬇️
backend/remote/backend_common.go 51.25% <0.00%> (+0.71%) ⬆️
dag/marshal.go 63.49% <0.00%> (+1.58%) ⬆️

@pselle pselle requested a review from a team January 5, 2021 19:18
@pselle pselle changed the title Pselle/count validate De-duplicate count validate code Jan 5, 2021
@pselle pselle added the 0.14-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Jan 5, 2021
@pselle pselle merged commit 45a5a3c into master Jan 5, 2021
@pselle pselle deleted the pselle/count-validate branch January 5, 2021 20:51
pselle added a commit that referenced this pull request Jan 5, 2021
@ghost
Copy link

ghost commented Feb 5, 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 Feb 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
0.14-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.

v0.14.3: panic: value is marked, so must be unmarked first
2 participants