-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
cannot submit WorkflowTemplate with {{workflow.labels.xxxx}}
values from v3.3.0
#8837
Comments
@sarabala1979 Can you assign this to me? |
I just tried this using the latest master and couldn't reproduce it. To make sure I did the same thing: I went to "Workflow Templates" on the UI, clicked "Create New Workflow Template", entered the yaml that you showed (except changing the namespace to mine), and clicked "Create". I didn't see an error in the UI or see "finished unary call with code Unknown" in the Workflow Controller log. I suppose I can try with the versions you specified. |
@juliev0
In my report, it happened when I clicked |
Thanks for clarifying! I'll try that then |
So, I did reproduce your error and am looking into it. But just curious: if you try running with 3.2.11 does it work end to end? I see the call to "submit" works fine but then the node itself shows this error:
Do you see that as well? Perhaps the spec changed? |
It worked without errors in my case, as below. 🙋 full yaml is below in this time 🙋 metadata:
name: sparkly-rhino
namespace: argo
uid: 898c9721-bff3-4980-8a6f-f3803e9f76ba
resourceVersion: '1452735'
generation: 1
creationTimestamp: '2022-05-28T00:03:41Z'
labels:
example: 'true'
workflow-name: hello-world
workflows.argoproj.io/creator: system-serviceaccount-argo-argo-server
managedFields:
- manager: argo
operation: Update
apiVersion: argoproj.io/v1alpha1
time: '2022-05-28T00:03:41Z'
fieldsType: FieldsV1
fieldsV1:
'f:metadata':
'f:labels':
.: {}
'f:example': {}
'f:workflow-name': {}
'f:workflows.argoproj.io/creator': {}
'f:spec': {}
spec:
templates:
- name: argosay
inputs: {}
outputs: {}
metadata: {}
container:
name: main
image: 'argoproj/argosay:v2'
command:
- /argosay
args:
- echo
- '{{workflow.labels.workflow-name}}'
resources: {}
entrypoint: argosay
arguments: {}
ttlStrategy:
secondsAfterCompletion: 300
podGC:
strategy: OnPodCompletion
workflowMetadata:
creationTimestamp: null
labels:
example: 'true'
workflow-name: hello-world
|
Thanks so much for the quick response and for posting the full yaml. I realized I was accidentally still running the latest version of the underlying Docker image while running 3.2.11 for the argo server and Workflow Controller. Once I fixed that, I can also get it to work successfully for 3.2.11. |
@alexec Removing the code from workflow/common/convert.go which transfers the Labels from the WorkflowTemplate to the Workflow as part of this change appears to cause this: This causes them to not get added to ctx.globalParams here, which causes them to not get picked up here. Any thoughts on why the code which transfers Labels from the WorkflowTemplate to the Workflow would have been removed? |
@sandeepitachi Full yaml is here. metadata:
name: sparkly-rhino
namespace: argo
uid: 898c9721-bff3-4980-8a6f-f3803e9f76ba
resourceVersion: '1542289'
generation: 2
creationTimestamp: '2022-05-28T00:03:41Z'
labels:
example: 'true'
workflow_name: hello-world
workflows.argoproj.io/creator: system-serviceaccount-argo-argo-server
managedFields:
- manager: argo
operation: Update
apiVersion: argoproj.io/v1alpha1
time: '2022-05-31T00:42:16Z'
fieldsType: FieldsV1
fieldsV1:
'f:metadata':
'f:labels':
.: {}
'f:example': {}
'f:workflow_name': {}
'f:workflows.argoproj.io/creator': {}
'f:spec': {}
spec:
templates:
- name: argosay
inputs: {}
outputs: {}
metadata: {}
container:
name: main
image: 'argoproj/argosay:v2'
command:
- /argosay
args:
- echo
- '{{workflow.labels.workflow_name}}'
resources: {}
entrypoint: argosay
arguments: {}
ttlStrategy:
secondsAfterCompletion: 300
podGC:
strategy: OnPodCompletion
workflowMetadata:
labels:
example: 'true'
workflow_name: hello-world
According to #8837 (comment) , additional attributes are not accepted... 👀
|
Oh.... 😇
1.I used quick start and the version is
2.I used helm chart and version is |
@yu-croco my bad! I misunderstood the issue was using (global variables) wf labels as input parameters! Yah you are right - the workflow labels variables are unavailable I tried and getting the same error 😔says failed to resolve! |
@sandeepitachi |
FYI, I got some more information on this one so now have a path to resolving. |
Checklist
Summary
What happened/what you expected to happen?
When I submit WorkflowTemplate with
{{workflow.labels.workflow-name}}
, I get status 500,templates.argosay: failed to resolve {{workflow.labels.workflow-name}}
though the attribute is set on.metadata.labels
belowDiagnostics
.It does not happen on v3.2.11, but it happens from v3.3.0 to v3.3.5 .
I couldn't find this kind of breaking change on Upgrading to v3.3, so I am wondering if this is a bug. 🤔
What version are you running?
v3.3.5
Diagnostics
Paste the smallest workflow that reproduces the bug. We must be able to run the workflow.
Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.
The text was updated successfully, but these errors were encountered: