Skip to content
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

A list inside a File.ext YAML key pattern is not correctly parsed #60

Open
kuisathaverat opened this issue Feb 2, 2023 · 1 comment
Assignees
Labels
on-hold Issues that we need to work on

Comments

@kuisathaverat
Copy link
Contributor

kuisathaverat commented Feb 2, 2023

I found the following error message for a valid values YAML file

/folder/readme-generator-for-helm/lib/parser.js:147
        _.get(valuesJSON, arrayPrefix).forEach((e) => {
                                      ^

TypeError: Cannot read property 'forEach' of undefined
    at createValuesObject (/folder/readme-generator-for-helm/lib/parser.js:147:39)
    at getParsedMetadata (/folder/readme-generator-for-helm/index.js:22:24)
    at runReadmeGenerator (/folder/readme-generator-for-helm/index.js:52:28)
    at Object.<anonymous> (/folder/readme-generator-for-helm/bin/index.js:22:1)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47
make: *** [readme] Error 1

This is the yaml file, it contains a key with a . because it references a file.ext pattern, this key contains a list that is where the parse error happens.

## section foo bar
## @param foo.file.ext.foo bar
foo:
  file.ext:
    foo:
      - bar

Removing the file.ext key the parser pass.

In my case, I am creating a Helm Chart on top of the Grafana Helm Chart and defining a Grafana dashboardProviders

The main problem here is that it was not easy to find what caused the error.

@kuisathaverat kuisathaverat changed the title File.ext YAML key pattern is not correctly parsed A list inside a File.ext YAML key pattern is not correctly parsed Feb 2, 2023
@fmulero
Copy link
Contributor

fmulero commented Mar 12, 2024

Sorry for my very late response

I've just created an internal task to work on this issue. I hope to come back soon.

@fmulero fmulero added the on-hold Issues that we need to work on label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-hold Issues that we need to work on
Projects
None yet
Development

No branches or pull requests

2 participants