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

google_monitoring_dashboard: thresholds are compared as float point numbers #7988

Closed
yegle opened this issue Dec 10, 2020 · 6 comments
Closed
Assignees
Labels

Comments

@yegle
Copy link

yegle commented Dec 10, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

0.14.1

Affected Resource(s)

  • google_monitoring_dashboard

Terraform Configuration Files

https://github.com/google/exposure-notifications-verification-server/blob/d9e2329c9214f9fe16701e557e7a1f08e3547e73/terraform/alerting/monitoring.tf#L15-L21

Debug Output

Panic Output

Expected Behavior

The thresolds in the dashboard should not cause any diff.

Actual Behavior

Getting diff each time I run terraform apply:

  # module.en-alerting.google_monitoring_dashboard.verification-server will be updated in-place
  ~ resource "google_monitoring_dashboard" "verification-server" {
      ~ dashboard_json = jsonencode(
          ~ {                             
              - etag        = "271a84cae5c15075542aa27c2ab5c9a6" -> null
              ~ gridLayout  = {      
                  ~ widgets = [                      
                      ~ {                
                          ~ xyChart = {
                              ~ thresholds   = [
                                  ~ {
                                      ~ value = 0.9950000047683716 -> 0.995
                                        # (1 unchanged element hidden)
                                    },
                                ]
                                # (2 unchanged elements hidden)
                            }
                            # (1 unchanged element hidden)
                        },

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@ghost ghost added the bug label Dec 10, 2020
@venkykuberan venkykuberan self-assigned this Dec 10, 2020
@venkykuberan
Copy link
Contributor

This is more TF Core issue, did the config ran successfully in prior versions or terraform (< 0.14) ?

@yegle
Copy link
Author

yegle commented Dec 11, 2020

This was recently added after we upgrade to 0.14, I'm not sure if it worked before.

@ghost ghost removed waiting-response labels Dec 11, 2020
@venkykuberan
Copy link
Contributor

This is not a provider issue, please raise it against Terraform Core. You can try with older version of tf and see if it works and add that to the issue. As we can't do much here, i am closing this one. Sorry for not being very helpful here.

@yegle
Copy link
Author

yegle commented Dec 17, 2020

Hmm it looks like the upstream think the issue is with the provider: hashicorp/terraform#27305 (comment)

I did confirm the API is likely returning 0.995 as expected:

$ gcloud monitoring dashboards list --project=xxx|grep threshold -A2
      thresholds:
      - label: SLO Goal
        value: 0.995

@yegle
Copy link
Author

yegle commented Jan 5, 2021

Can we reopen this issue? Per hashicorp/terraform#27305 this is an issue with the provider, thank you!

@ghost
Copy link

ghost commented Jan 14, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants