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
Describe the bug
The plugins fails with an error but return zero output, so in argocd UI we don't see an error
To Reproduce
My git repository, which is specified in the source field, contains only "values.yaml" and "Chart.yaml" files (no templates folder at all) and "Chart.yaml" file has some dependencies
And I try to use the plugin with that configuration
Expected behavior
Plugin returns not zero output and we will see an error on the argocd UI
Screenshots/Verbose output
Please check the third line. As you can see it says Plugin command returned zero output but also stderr="Error: An error occurred while checking for chart dependencies...
Seems odd to me
time="2023-08-08T09:08:32Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=GetParametersAnnouncement grpc.service=plugin.ConfigManagementPluginService grpc.start_time="2023-08-08T09:08:32Z" grpc.time_ms=163.038 span.kind=server system=grpc
time="2023-08-08T09:08:32Z" level=info msg="sh -c \"helm template $ARGOCD_APP_NAME -n $ARGOCD_APP_NAMESPACE ${ARGOCD_ENV_HELM_ARGS} . |\\nargocd-vault-plugin generate -\\n\"" dir=/tmp/_cmp_server/327cadbc-98e7-448a-8f8e-38feb68d971a/new-config-argocd-vault-plugin/envs/argocd-devops-team/a01/solution/applications/cloud execID=7613e
time="2023-08-08T09:08:32Z" level=warning msg="Plugin command returned zero output" command="{[sh -c helm template $ARGOCD_APP_NAME -n $ARGOCD_APP_NAMESPACE ${ARGOCD_ENV_HELM_ARGS} . |\nargocd-vault-plugin generate -\n] []}" stderr="Error: An error occurred while checking for chart dependencies. You may need to run `helm dependency build` to fetch missing dependencies: found in Chart.yaml, but missing in charts/ directory: chart-1, chart-2\n"
time="2023-08-08T09:08:32Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=GenerateManifest grpc.service=plugin.ConfigManagementPluginService grpc.start_time="2023-08-08T09:08:32Z" grpc.time_ms=251.512 span.kind=server system=grpc
time="2023-08-08T09:08:55Z" level=info msg="Alloc=16236 TotalAlloc=209695 Sys=45677 NumGC=35 Goroutines=7"
The text was updated successfully, but these errors were encountered:
Same here. This is quite annoying and dangerous as it can wipe all resources in the related argocd application as no error code is output. Any news or workaround to fix this issue?
if you are using a pipe in your command (|) it is critical that the pipefail option is used!
Otherwise the second command in the pipeline silently overwrites any errors from the first command.
So the config should look something like this:
spec:
generate:
command:
- "sh"
- "-o"
- "errexit"# exit on errors
- "-o"
- "pipefail"# set exit code to 1 when any command in a pipeline fails
- "-c"# run the following command
- "helm template ... | argocd-vault-plugin generate -"
This is also shown incorrectly in the docs, I'll send a PR.
Describe the bug
The plugins fails with an error but return zero output, so in argocd UI we don't see an error
To Reproduce
My git repository, which is specified in the
source
field, contains only "values.yaml" and "Chart.yaml" files (no templates folder at all) and "Chart.yaml" file has somedependencies
And I try to use the plugin with that configuration
Expected behavior
Plugin returns not zero output and we will see an error on the argocd UI
Screenshots/Verbose output
Please check the third line. As you can see it says
Plugin command returned zero output
but alsostderr="Error: An error occurred while checking for chart dependencies...
Seems odd to me
The text was updated successfully, but these errors were encountered: