Skip to content
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 create WorkflowTemplate if using {{workflow.labels.*}} #3989

Closed
simster7 opened this issue Sep 10, 2020 · 2 comments · Fixed by #3988
Closed

Cannot create WorkflowTemplate if using {{workflow.labels.*}} #3989

simster7 opened this issue Sep 10, 2020 · 2 comments · Fixed by #3988
Assignees

Comments

@simster7
Copy link
Member

simster7 commented Sep 10, 2020

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  generateName: test-foobar-
  labels:
    testLabel: foobar
spec:
  entrypoint: whalesay
  templates:
    - name: whalesay
      resubmitPendingPods: true
      container:
        image: docker/whalesay
      metrics:
        prometheus:
          - name: intuit_data_persistplat_dppselfservice_workflow_test_duration
            help: Duration of workflow
            labels:
              - key: label
                value: "{{workflow.labels.testLabel}}"
            gauge:
              realtime: true
              value: "{{duration}}"

Gives

Failed to create workflow template: templates.whalesay: failed to resolve {{workflow.labels.testLabel}}
@apiwoni
Copy link

apiwoni commented Feb 28, 2024

@simster7 @alexec If this has been fixed while back then you have regression bug? In v3.4.4 unless actual Workflow resource specifies label the usage of {{workflow.labels.*}} in WorkflowTemplate is not substituted even when label is specified in WorkflowTemplate as shown above. In v3.4.16 this actually fails validation if not passed by invoking workflow.

@tooptoop4
Copy link
Contributor

maybe related to #13141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants