'Argo Workflow not passing parameters to a container Template

I am building a genomic pipeline with Argo for my Master thesis work. Essentially, I have created a WorkflowTemplate with all the container templates defined, then the idea is to build two separate Workflows from that template: one for testing purposes and one for production, which will use different arguments and data wrt the test workflow.

Here's the WorkflowTemplate:

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: genomic-workflow-template
  namespace: tesi-fabrici
spec:
  templates:
  - name: data-handling
    container:
      name: data-handling-container
      image: eferos93/data-handling
      volumeMounts:
        - name: external-volume
          mountPath: /data
  - name: bcl2fastq
    container:
      name: bcl2fastq-container
      image: eferos93/bcl2fastq
      volumeMounts: 
        - name: external-volume
          mountPath: /data
  - name: fastqc
    container:
      name: fasqc-container
      image: eferos93/fastqc
      volumeMounts:
        - name: external-volume
          mountPath: /data
  - name: multiqc
    container:
      name: multiqc-container
      image: eferos93/multiqc
      volumeMounts:
        - name: external-volume
          mountPath: /data

When building the test workflow I am having problems when passing arguments to the container, namely, even if they are specified the container does not get any argument, therefore leading to an error inside the pod, as it will use default arguments that do not match my case.

Here's the workflow test definition:

apiVersion: argoproj.io/v1alpha1
kind: Workflow 
metadata:
  generateName: test-workflow-
  namespace: tesi-fabrici
spec:
  volumes:
    - name: external-volume
      nfs: 
        server: 10.128.2.231
        path: /tesi_fabrici
  entrypoint: genomic-workflow 
  arguments:
    parameters:
      - name: test-flags
        value: --ignore-missing-bcls --ignore-missing-filter --ignore-missing-positions --use-bases-mask y4n*,n*
      - name: base-input-dir
        value: data/
      - name: base-output-dir
        value: output/
      - name: input-dir
        value: copy_170612_A00181_0011_AH2JK7DMXX/
      - name: input-path
        value: data/copy_170612_A00181_0011_AH2JK7DMXX
      - name: sample-sheet-path
        value: data/copy_170612_A00181_0011_AH2JK7DMXX/SampleSheet.csv
      - name: fastq-dir
        value: data/output/copy_170612_A00181_0011_AH2JK7DMXX/fastq
      - name: fastqc-dir
        value: data/output/copy_170612_A00181_0011_AH2JK7DMXX/fastqc
      - name: multiqc-dir
        value: data/output/copy_170612_A00181_0011_AH2JK7DMXX/multiqc_results
      - name: logs-dir
        value: logs/
      - name: benchmark-dir
        value: benchmark/
  templates:
    - name: genomic-workflow
      steps:
      - - name: bcl2fastq-step
          templateRef:
            name: genomic-workflow-template
            template: bcl2fastq
            inputs:
              parameters:
              - name: test-flags
              - name: sample-sheet-path
              - name: input-dir
              - name: fastq-dir
            args: [ "{{inputs.parameters.test-flags]}}", "--sample-sheet", "{{inputs.parameters.sample-sheet-path]}}", "-R", "{{inputs.parameters.input-dir}}", "-o", "{{inputs.parameters.fastq-dir}}"]

Here the step that uses the bcl2fastq template defined above, does not take any arguments. I tried also by referring directly to the global parameters ({{workflow.parameters.test-flags}}, ....), still the same problem. Here's the Manifest of the bcl2fastq-step obtained from Argo Server UI:

name: genomic-workflow
inputs: {}
outputs: {}
metadata: {}
steps:
  - - name: bcl2fastq-step
      arguments: {}
      templateRef:
        name: genomic-workflow-template
        template: bcl2fastq

As you can see, there is no arguments and no inputs.

Now, I haven't tried to declare the parameters inside the WorkflowTemplate but this is something I want to avoid, as my idea is to build the two Workflows from the single WorkflowTemplate defined above.

Does anybody know where the problem lies?


Here's the link to the Dockerfile of bcl2fastq.

I am using the latest version of Argo:

argo: v3.2.6+db7d90a.dirty
  BuildDate: 2021-12-18T04:36:35Z
  GitCommit: db7d90a1f609685cfda73644155854b06fa5d28b
  GitTreeState: dirty
  GitTag: v3.2.6
  GoVersion: go1.17.5
  Compiler: gc
  Platform: linux/amd64


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source