-
Notifications
You must be signed in to change notification settings - Fork 24
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
Floating point rounding issues in 0.15.x #335
Comments
@jharley this leaves is stuck between a rock and a hard place, since 0.14.0 has the issue with recipients, and this 0.15.0 has this issue. Before we try to make significant workarounds, or look into the issue ourselves, do you have an idea of when this can be triaged and worked on? Thought about looking at this again, but right now the provider throws this:
|
@purajit I have just confirmed I can reproduce this bug, thanks for reporting it. This appears to be a difference in how the new Terraform Plugin Framework parses things (0.15 of the provider is a migration of the As for the panic, that is another bug that we are aware of but I've yet to be given a reproducible case to trigger it. If you have such a thing I'd very much appreciate you sharing it so we can get that one squashed as well! |
@purajit I've opened hashicorp/terraform-plugin-framework#815 looking for guidance on how to handle this |
Fix included in terraform-plugin-framework v1.3.4 (via hashicorp/terraform-plugin-framework#817) - Closes #335
Versions
0.15.0, 0.15.1
Steps to reproduce
honeycombio_trigger
. I usedterraform plan
0.14.0
terraform init -upgrade && terraform plan
With 0.15.0 (and 0.15.1), I get the error
But with 0.14.0, it generates the expected plan
Additional context
In short, the Honeycomb provider is no longer handling floating point rounding the way it used to. Terraform itself produces floating point inaccuracies for
1 - x
, where0.783 <= x < 1.0
, at least on my architecture:Previously, the provider handled this gracefully, correctly rounding these decimals - but no longer.
This is a pattern we use heavily because we keep a central directory of services, SLOs, etc, and the triggers are generated based on them - so if we have an SLO of
0.995
defined on a service, we generate a failure trigger with threshold1 - 0.995
.The text was updated successfully, but these errors were encountered: