-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Inconsistent behavior for Workflow Arguments vs Template inputs to prioritise Value
over ConfigMapKeyRef
#14426
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
Comments
Hello, I would like to contribute this fix :) |
Yes please @nicdard |
Signed-off-by: Nicola Dardanis <nicdard@gmail.com>
Thanks for the report! Here's a slightly simpler workflow to reproduce this discrepancy that doesn't use a apiVersion: v1
kind: ConfigMap
metadata:
name: config-properties
labels:
workflows.argoproj.io/configmap-type: Parameter
data:
message: "message from config map"
---
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: parameter-valuefrom-value-
spec:
entrypoint: echo
arguments: &args
parameters:
- name: message
value: "configmap argument overwrite with argument"
valueFrom:
configMapKeyRef:
name: config-properties
key: message
templates:
- name: echo
inputs: *args
container:
image: busybox
args: ["printf", "WORKFLOW: %s\nINPUT: %s", "{{workflow.parameters.message}}", "{{inputs.parameters.message}}"] Output when submitting this using
|
Hey @MasonM thanks this is very helpful! |
Signed-off-by: Nicola Dardanis <nicdard@gmail.com>
argoproj#14426 Signed-off-by: Nicola Dardanis <nicdard@gmail.com>
…roj#14426 Signed-off-by: Nicola Dardanis <nicdard@gmail.com>
Pre-requisites
:latest
image tag (i.e.quay.io/argoproj/workflow-controller:latest
) and can confirm the issue still exists on:latest
. If not, I have explained why, in detail, in my description below.What happened? What did you expect to happen?
Same issue as #10182 but for
Workflow.Spec.Arguments
(and referenced via{{workflow.parameters.param-name}}
) which are dealt with in a different code path here:argo-workflows/workflow/controller/operator.go
Lines 646 to 659 in bd13b1c
Which means passing a
value
to an argument that uses aValueFrom.ConfigMapKeyRef
does nothing, when it should prioritise thevalue
to match template input behaviour. A workaround is moving the config map input to a template to get the fixed behaviour from #10182.Version(s)
v3.6.5
Paste a minimal workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflow that uses private images.
Logs from the workflow controller
Logs from in your workflow's wait container
The text was updated successfully, but these errors were encountered: