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

Error decoding arrays in the basic forms #5519

Closed
antgamdia opened this issue Oct 20, 2022 · 1 comment
Closed

Error decoding arrays in the basic forms #5519

antgamdia opened this issue Oct 20, 2022 · 1 comment
Assignees
Labels
component/ui Issue related to kubeapps UI kind/bug An issue that reports a defect in an existing feature

Comments

@antgamdia
Copy link
Contributor

Describe the bug
The parser is not properly generating the actual value for collections (arrays and maps), instead a YAML (dependency) data model is being passes through.

To Reproduce

  1. Add a basic param with an array.
  2. Go to the yaml editor, add a value
  3. Go to the table view, see the error below.

Expected behavior
The parser should work for collections.

Screenshots
error

Desktop (please complete the following information):
DEVEL

Additional context
DEVEL

@antgamdia antgamdia added kind/bug An issue that reports a defect in an existing feature component/ui Issue related to kubeapps UI labels Oct 20, 2022
@antgamdia antgamdia self-assigned this Oct 20, 2022
antgamdia added a commit that referenced this issue Oct 21, 2022
### Description of the change

While working on #5436, I noticed some errors during the YAML parsing;
well not errors, but unexpected (for me) values being returned by the
`genIn` method. In collections, the returned thing is not a js object,
but a custom data type from the YAML library.

This PR is just to convert collections (YAML sequences and YAML maps)
back to plain js objects (even if the function says `toJSON()` 😅

### Benefits

We will be able to use arrays and object fields in the form.

### Possible drawbacks

N/A

### Applicable issues

- fixes #5519

### Additional information

> **Note**
> This PR is part of a series of PRs aimed at closing [this
milestone](https://github.com/vmware-tanzu/kubeapps/milestone/27). I
have split the changes to ease the review process, but as there are many
interrelated changes, the tests will be performed in a separate PR (on
top of the branch containing all the changes).
>  PR 2 out of 6

Signed-off-by: Antonio Gamez Diaz <[email protected]>
@antgamdia
Copy link
Contributor Author

Closed by #5531 (merged in main by #5530)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/ui Issue related to kubeapps UI kind/bug An issue that reports a defect in an existing feature
Projects
Archived in project
Development

No branches or pull requests

1 participant