-
Notifications
You must be signed in to change notification settings - Fork 62
std.sort differs from go-jsonnet implementation #290
Comments
jsonnet fails because the lone argument passed to It's not clear to me how kubecfg could sidestep the invalid call to |
Yeah, Jsonnet, by design, does not provide a default way to sort objects. You need to specify how you want them to be sorted with For example you can sort by name as follows:
I have no idea how |
I performed some experiments and I was able to confirm that |
Vaguely related, but maybe not at all: #289 (comment). I know that kubecfg resorts objects in some cases. It also has special handling for v1/List objects. However, I don't see how it would ever even see such an object here without running into the evaluation failure first. |
When running kubecfg and jsonnet on the same definitions, jsonnet fails whilst kubecfg passes without issue.
Should differences like this be cleared up so that both tools can be used on the same sources?
Reproducing
jsonnet version 0.15 from https://github.com/google/go-jsonnet
kubecfg version v0.16.0
kubecfg show file.jsonnet
jsonnet file.jsonnet
The text was updated successfully, but these errors were encountered: