You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
Notice that this is a JSON array (of objects), rather than a single JSON object... it appears the current Git file generator parsing code assumes that files will only be JSON objects, not JSON arrays.
Error log:
INFO[0448] Trace args="[git clean -fdx]" dir="/tmp/https:__github.com_jgwest_argocd-example-apps" operation_name="exec git" time_ms=4.000146000000001
ERRO[0448] error generating params error="json: cannot unmarshal array into Go value of type map[string]interface {}" generator="&{0xc0003a4f00}"
2021-01-26T12:01:54.853-0500 ERROR controller-runtime.manager.controller.applicationset Reconciler error {"reconciler group": "argoproj.io", "reconciler kind": "ApplicationSet", "name": "guestbook", "namespace": "argocd", "error": "json: cannot unmarshal array into Go value of type map[string]interface {}"}
The text was updated successfully, but these errors were encountered:
Good question, I was thinking that generateParamsFromGitFile should first attempt to parse the JSON file as a JSON object, and then, if that fails, next try to parse it as a JSON array.
In the case of the JSON object, the code would work as it does now. In the case of the JSON array, it would instead attempt to parse each element in the array, and treat each element as a separate set of parameters (as you said, iterating through the list).
An 'error generating params' error is output when using the following ApplicationSet on the specified repo.
The following ApplicationSet will trigger the error:
This is because the
cluster.json
(referenced above) looks like this (source):Notice that this is a JSON array (of objects), rather than a single JSON object... it appears the current Git file generator parsing code assumes that files will only be JSON objects, not JSON arrays.
Error log:
The text was updated successfully, but these errors were encountered: