-
Notifications
You must be signed in to change notification settings - Fork 167
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
Non-deterministic crashing with well-formed but nonsensical main.jsonnet #299
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
You don't need the |
Hey! As @Duologic said, the cortex-mixin has dashboards and prometheus rules that are intended to be added as a mixin for the prometheus-ksonnet Jsonnet library. If you are looking just to deploy just cortex then removing the mixin should fix the problem. To deploy cortex and the mixin, you'll need something like:
|
Just to clarify the error you are receiving, if you do a I'm not sure if this is a bug or not, @sh0rez would know better if the flattening is meant to be deterministic. Perhaps it would be nice since it would mirror the Jsonnet evaluation. Hope this helps! |
Hi, flattening itself is actually deterministic once completed, it only traverses the go map without order, so it may not always occur the same invalid thing first. I agree we could clarify this error message even further, also providing a troubleshooting page in the docs. Apart from that, this is working as intended :) |
Would it be hard to "artificially" make the order deterministic, i.e. sort the keys by whatever? I'm always really confused when a tool doesn't produce the same error message each time for the same input (because when I'm changing something and the message changes, I don't know if it's because of my change or just the tool randomly produces something different). Just my 2 cents. |
Ah yeah, I forgot they intentionally randomized the map ordering. I agree it would be nice from a user perspective. I put together a PR that does this but I'm not sure how to write a test for it or if I'm being a little naive with the implementation. |
@sbarzowski I see, lets reopen this |
Closed in #307 😂 |
I ran into this having no idea what I'm doing with Tanka. Apparently this isn't a valid
main.jsonnet
file, but even if it's invalid, it's disconcerting to end up with different error messages every time. This might be a bug in thecortex-jsonnet
project; if so let me know and I'll reopen it there.tk version v0.10.0
My
main.jsonnet
:To reproduce:
Observed output:
Also, unrelated to the bug, if you could help me fix my
main.jsonnet
so I can generate both cortex and cortex-mixin manifests at the same time, that would be appreciated! :DThe text was updated successfully, but these errors were encountered: