-
Notifications
You must be signed in to change notification settings - Fork 76
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
pull
command is using |4-
notation in yaml, which is not compatible with the list
or apply
commands
#245
Comments
K-Phoen
added a commit
that referenced
this issue
Jun 12, 2023
Fixes #245 There is currently a bug in [go-yaml/yaml](https://github.com/go-yaml/yaml) causing indentation hints on scalar blocks to be set incorrectly. As a result, they can not be unmarshalled. [A PR has been open upstream](go-yaml/yaml#643) a few years ago but hasn't seen any meaningful activity recently. This PR is an attempt at fixing this (un)marshalling issue by using an alternative, regurlarly maintained, YAML library: [goccy/go-yaml](https://github.com/goccy/go-yaml) Some quick manual testing showed that goccy/go-yaml resolves #245, but there is more validation needed to decide if switching to a new dependency is viable: * goccy/go-yaml is highly likely to marshal resources differently. While some degree of change is *probably* acceptable, I currently don't know how different marshalled resources are. * there isn't any unit test covering the issue, I will add one.
K-Phoen
added a commit
that referenced
this issue
Jun 12, 2023
Fixes #245 There is currently a bug in [go-yaml/yaml](https://github.com/go-yaml/yaml) causing indentation hints on scalar blocks to be set incorrectly. As a result, they can not be unmarshalled. [A PR has been open upstream](go-yaml/yaml#643) a few years ago but hasn't seen any meaningful activity recently. This PR is an attempt at fixing this (un)marshalling issue by using an alternative, regurlarly maintained, YAML library: [goccy/go-yaml](https://github.com/goccy/go-yaml) Some quick manual testing showed that goccy/go-yaml resolves #245, but there is more validation needed to decide if switching to a new dependency is viable: * goccy/go-yaml is highly likely to marshal resources differently. While some degree of change is *probably* acceptable, I currently don't know how different marshalled resources are. * there isn't any unit test covering the issue, I will add one.
K-Phoen
added a commit
that referenced
this issue
Jun 12, 2023
Fixes #245 There is currently a bug in [go-yaml/yaml](https://github.com/go-yaml/yaml) causing indentation hints on scalar blocks to be set incorrectly. As a result, they can not be unmarshalled. zsh:1: command not found: qa This PR is an attempt at fixing this (un)marshalling issue by using an alternative, regurlarly maintained, YAML library: [goccy/go-yaml](https://github.com/goccy/go-yaml) Some quick manual testing showed that goccy/go-yaml resolves #245, but there is more validation needed to decide if switching to a new dependency is viable: * goccy/go-yaml is highly likely to marshal resources differently. While some degree of change is *probably* acceptable, I currently don't know how different marshalled resources are. * there isn't any unit test covering the issue, I will add one.
K-Phoen
added a commit
that referenced
this issue
Jun 12, 2023
Fixes #245 There is currently a bug in [go-yaml/yaml](https://github.com/go-yaml/yaml) causing indentation hints on scalar blocks to be set incorrectly. As a result, they can not be unmarshalled. This PR is an attempt at fixing this (un)marshalling issue by using an alternative, regurlarly maintained, YAML library: [goccy/go-yaml](https://github.com/goccy/go-yaml) Some quick manual testing showed that goccy/go-yaml resolves #245, but there is more validation needed to decide if switching to a new dependency is viable: * goccy/go-yaml is highly likely to marshal resources differently. While some degree of change is *probably* acceptable, I currently don't know how different marshalled resources are. * there isn't any unit test covering the issue, I will add one.
The immediate workaround for this issue is to use JSON instead, so use Grizzly depends upon Golang YAML parsers, and every YAML parser I've played with has some issues with Grafana dashboards, which tend to do some odd things. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the query starts with an blank line,
grr pull
will generate a yaml file using the|4-
notation. Although this is valid yaml, thelist
andapply
commands do not work when this notation is present in the yaml files.Query that starts with a blank line:
Will result in this expression when using
grr pull
In this case
grr list
will fail:If I simply change
|4-
to|-
in the yaml and rerun thelist
command:Version info:
Grizzly: 2023-06-02 09:33:31.610732 I | grr version v0.2.0
Grafana: 9.2.15
The text was updated successfully, but these errors were encountered: