-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
failed parsing on parameters with comma #1660
Comments
Thank you for a fantastic bug report. I've not confirmed it, and I think it is probably how the CLI arg parser works. You can also achieve this using app patch guestbook --patch '[{"op": "add", "path": "/spec/source", "value": {"helm": {"parameters": [{"name": "gitGC.schedule", "value": "0 6,18 * * *"}]}}}]' Alex |
This seems to be an issue with Helm, since ArgoCD calls out the Helm CLI with --set to set application parameters, as far as my investigation went (see also helm/helm#1556). One possible workaround would be to escape the comma, such as: argocd app set guestbook -p 'gitGC.schedule=0 6\,18 * * *' Something to discuss is, should Argo escape all commas in the parameters before doing the call to Helm CLI if the user did not already escape them? |
hi @alexec , |
I'm only providing a workaround, you can use a patch to add values to the app spec, but as pointed out, this really isn't the issue. I think this should probably be fixed, and the quickest way to do that would be a community contribution. I think this is where it needs to be made: Line 69 in ac3d12c
|
Hi @alexec
|
No. I have no plan to test this. @simster7 ? |
@dimitarKiryakov @alexec This change was only meant to parse arguments set directly with If by your question you mean the effects of breaking out your yaml and testing the parameter sets one-by-one I found no issues after making a quick fix (#1732):
|
This commit fixes Helm parsing of parameters values containing a comma. The issue was first found as argoproj#1660, and fixed in argoproj#1720. However, commit 4e9772e, in argoproj#1865 removed the call to `cleanHelmParameters`, hence the regression.
Describe the bug
when a parameter with comma[,] is set via CLI leads to the following issue:
rpc error: code = Unknown desc = Error: failed parsing --set data: key "18 * * *" has no value
To Reproduce
If we cannot reproduce, we cannot fix! Steps to reproduce the behavior:
argocd app create guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path helm-guestbook --dest-server https://kubernetes.default.svc --dest-namespace default
key=schedule
value=0 6,18 * * *
command variations tried:
argocd app set guestbook -p 'gitGC.schedule=0 6,18 * * *'
argocd app set guestbook -p gitGC.schedule='0 6,18 * * *'
rpc error: code = Unknown desc = Error: failed parsing --set data: key "18 * * *" has no value
If this property is present in the values yaml it will be set correctly but the error will be visible and will prevent the healty status of the application.
PS
real example with git helm chart for k8s.
for the easy reproduction, guestbook app is used.
Expected behavior
If the parameter is not in values yaml to be discarded
if there is such parameter to be set correctly and no additional issue to rise
Version
The text was updated successfully, but these errors were encountered: