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

fix: list generator elements should be optional (cherry-pick #17424) #17511

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

gcp-cherry-pick-bot[bot]
Copy link

Cherry-picked fix: elements should be optional (#17424)

A bug was reported, where an applicationset with an empty elements
array, when created with argocd appset create <filename>.yaml gets a
...list.elements: Required value error.

My hypothesis is that when calling the K8s API, golang JSON marshalling
mangles the empty elements array to nil, rather than creating an
empty array when submitting the POST.

Still need to figure out why the same setup seemingly works fine when
the same appset is in an app-of-apps.

Signed-off-by: Blake Pettersson [email protected]

A bug was reported, where an applicationset with an empty elements
array, when created with `argocd appset create <filename>.yaml` gets a
`...list.elements: Required value` error.

My hypothesis is that when calling the K8s API, golang JSON marshalling
mangles the empty `elements` array to `nil`, rather than creating an
empty array when submitting the `POST`.

Still need to figure out why the same setup seemingly works fine when
the same appset is in an app-of-apps.

Signed-off-by: Blake Pettersson <[email protected]>
@ishitasequeira ishitasequeira merged commit 3be5efa into release-2.8 Mar 28, 2024
17 of 22 checks passed
@ishitasequeira ishitasequeira deleted the cherry-pick-f5ab76-release-2.8 branch March 28, 2024 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants