Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

ArgBool not compatible with graphite #867

Closed
Dieterbe opened this issue Mar 8, 2018 · 4 comments
Closed

ArgBool not compatible with graphite #867

Dieterbe opened this issue Mar 8, 2018 · 4 comments

Comments

@Dieterbe
Copy link
Contributor

Dieterbe commented Mar 8, 2018

#837 (comment)

@shanson7
Copy link
Collaborator

shanson7 commented Mar 8, 2018

So, for full backwards compatibility with Graphite, ArgBool would accept other types (just strings and numbers?) and use Python truthiness

The main case where this is a little awkward is that 'false' == True.

In http://play.grafana.org/ when I add a summarize with final arg false (alignTo) and start playing around with the node path, I eventually get grafana to add the quotes around false causing alignTo to become true. That's a grafana bug I would argue, but it's exacerbated by the current behavior.

@DanCech
Copy link
Contributor

DanCech commented Mar 8, 2018

I'd be fine with patching graphite-web to fix that issue, I agree that it's not intuitive at all right now.

@Dieterbe
Copy link
Contributor Author

Dieterbe commented Mar 9, 2018

especially because grafana seemingly randomly adds and removes quotes around booleans, effectively reversing parameters of queries unbeknownst to the user.. let us know when fixed in graphite.

does this mean then:
true -> true
'true', 'True' -> true
false -> false
'false', 'False' -> false
any other string not mentioned yet -> true?

@DanCech do you think we file a bug for grafana to stop adding the quotes. and assuming it gets fixed, ultimately stop accepting strings for bools in graphite?

@shanson7
Copy link
Collaborator

shanson7 commented Mar 9, 2018

Yes, plus:
'' -> false
0 -> false
<> 0 -> true

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants