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

lang: Improved robustness of sum function #27249

Merged
merged 1 commit into from
Dec 11, 2020

Conversation

alisdair
Copy link
Contributor

Fixes error when calling sum with values not known until apply time. Also allows sum to cope with numbers too large to represent in float64, along with correctly handling errors when trying to sum opposing infinities.

Fixes #27216. See comment in linked issue for why this commit is larger than just the IsKnown/IsWhollyKnown change.

Targeting an 0.14 patch release.

Fixes error when calling sum with values not known until apply time.
Also allows sum to cope with numbers too large to represent in float64,
along with correctly handling errors when trying to sum opposing
infinities.
@alisdair alisdair added functions 0.14-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged labels Dec 10, 2020
@alisdair alisdair requested a review from a team December 10, 2020 22:16
@alisdair alisdair self-assigned this Dec 10, 2020
@codecov
Copy link

codecov bot commented Dec 10, 2020

Codecov Report

Merging #27249 (f27dae2) into master (6e1017f) will decrease coverage by 0.00%.
The diff coverage is 88.88%.

Impacted Files Coverage Δ
lang/funcs/collection.go 80.59% <88.88%> (+0.85%) ⬆️
terraform/node_resource_apply_instance.go 49.76% <0.00%> (-2.80%) ⬇️
terraform/node_resource_plan.go 96.11% <0.00%> (-1.95%) ⬇️
dag/walk.go 91.54% <0.00%> (-0.71%) ⬇️

Copy link
Contributor

@apparentlymart apparentlymart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! 🎉

@ghost
Copy link

ghost commented Jan 11, 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 11, 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 functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type validation of expressions in sum function failing unexpectedly
2 participants