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

dynamic template naming on workflowTemplates fails unexpectedly #14042

Open
4 tasks done
MenD32 opened this issue Jan 1, 2025 · 8 comments · Fixed by #14053
Open
4 tasks done

dynamic template naming on workflowTemplates fails unexpectedly #14042

MenD32 opened this issue Jan 1, 2025 · 8 comments · Fixed by #14053

Comments

@MenD32
Copy link
Contributor

MenD32 commented Jan 1, 2025

Pre-requisites

  • I have double-checked my configuration
  • I have tested with the :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.
  • I have searched existing issues and could not find a match for this bug
  • I'd like to contribute the fix myself (see contributing guide)

What happened? What did you expect to happen?

templating a template name fails when using a workflowTemplate's input, this bug can be mitigated by using an intermediate template to output the input of the workflowTemplate

Version(s)

v3.6.2

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.

---
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: example-workflow-template-a
spec:
  templates:
  - name: whalesay-template
    inputs:
      parameters:
        - name: message
    steps:
      - - name: whalesay
          templateRef:
            name: example-workflow-template-b
            template: "{{ inputs.parameters.message }}"
---
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: example-workflow-template-b
spec:
  templates:
  - name: whalesay-template
    container:
      image: docker/whalesay:latest
      command: [cowsay]
      args: ["hello from template"]
---
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: example-workflow-
spec:
  entrypoint: whalesay
  templates:
  - name: whalesay
    steps:
      - - name: whalesay
          templateRef:
            name: example-workflow-template-a
            template: whalesay-template
          arguments:
            parameters:
              - name: message
                value: "whalesay-template"

Logs from the workflow controller

not relevant

Logs from in your workflow's wait container

not relevant
@tczhao
Copy link
Member

tczhao commented Jan 1, 2025

It is the same issue as #13773
but this example is much simpler

@shuangkun shuangkun added the area/templating Templating with `{{...}}` label Jan 2, 2025
@shuangkun
Copy link
Member

Will you submit a PR to fix this issue? @MenD32

@MenD32
Copy link
Contributor Author

MenD32 commented Jan 2, 2025

This bug impacts me, so if it wouldn't be fixed by someone else I'd write a fix. But it isn't my highest priority rn.

@chengjoey
Copy link
Member

fix: #14053, @tczhao @MenD32 PTAL

@chengjoey
Copy link
Member

@MenD32 , if you are working on this, please tell me, i will close my pr

@MenD32
Copy link
Contributor Author

MenD32 commented Jan 6, 2025

I am not working on this rn, feel free to go ahead

@tczhao tczhao reopened this Feb 18, 2025
@tczhao
Copy link
Member

tczhao commented Feb 18, 2025

@tczhao
Copy link
Member

tczhao commented Mar 4, 2025

Hi @chengjoey are you interested in continuing to work on this?

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