eksctl icon indicating copy to clipboard operation
eksctl copied to clipboard

strict parser is case-insensitive

Open errordeveloper opened this issue 6 years ago • 6 comments

We have enabled strict parsing to detect unknown keys, e.g.:

[✖]  loading config file "test.yaml": error unmarshaling JSON: while decoding JSON: json: unknown field "subnetz"

or:

[✖]  loading config file "test.yaml": error unmarshaling JSON: while decoding JSON: json: unknown field "nodeGroup"

But it appears that strict parser doesn't detect keys that had been misspelled by mix-case.

For example: Subnets are sUbnetS, or NodeGroups and nodegroups, don't result in parser error.

This looks like a bug in the parser, we should look into what causes it, and of course file a generic issue. We use sigs.k8s.io/yaml for this.

errordeveloper avatar Apr 25 '19 15:04 errordeveloper

I'm not sure if we want to use it I tried it and gopkg.in/yaml.v2 is case sensitive.

martina-if avatar Apr 26 '19 09:04 martina-if

I submited an issue https://github.com/kubernetes-sigs/yaml/issues/15

martina-if avatar Apr 26 '19 09:04 martina-if

Interesting. Could you share a test case with gopkg.in/yaml.v2? there is also gopkg.in/yaml.v3, which we should try (see https://github.com/kubernetes-sigs/yaml/issues/17 & https://github.com/kubernetes-sigs/yaml/issues/18).

errordeveloper avatar Apr 26 '19 15:04 errordeveloper

https://github.com/kubernetes-sigs/yaml/pull/19 is a potential fix, it actually seems to move along... maybe a good idea to try the patch?

errordeveloper avatar Jun 21 '19 10:06 errordeveloper

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jan 27 '21 02:01 github-actions[bot]

This issue has been open for a while, closing due to staleness but happy to reopen if the issue persists.

nikimanoledaki avatar Jul 07 '21 10:07 nikimanoledaki