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

v2.7.1+ Regression: Global outputs cannot be defined by steps/DAGs templates #2823

Closed
4 tasks done
samath117 opened this issue Apr 24, 2020 · 0 comments · Fixed by #2826
Closed
4 tasks done

v2.7.1+ Regression: Global outputs cannot be defined by steps/DAGs templates #2823

samath117 opened this issue Apr 24, 2020 · 0 comments · Fixed by #2826
Assignees
Labels

Comments

@samath117
Copy link

Checklist:

  • I've included the version.
  • I've included reproduction steps.
  • I've included the workflow YAML.
  • I've included the logs.

What happened:

In Argo v2.6.3, you could produce global output parameters as the outputs to steps/DAG templates as shown in the example below (based on this example). But in Argo v2.7.5, this is no longer working.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: global-outputs-
spec:
  entrypoint: generate-globals

  templates:
  - name: generate-globals
    steps:
    - - name: generate
        template: nested-global-output-generation
    - - name: consume
        template: global-output-consumption

  - name: output-generation
    container:
      image: alpine:3.7
      command: [sh, -c]
      args: ["sleep 1; echo -n hello world > /tmp/hello_world.txt"]
    outputs:
      parameters:
      - name: hello-param
        valueFrom:
          path: /tmp/hello_world.txt

  - name: nested-global-output-generation
    steps:
    - - name: generate-output
        template: output-generation
    outputs:
      parameters:
      - name: hello-param
        valueFrom:
          parameter: "{{steps.generate-output.outputs.parameters.hello-param}}"
        globalName: global-param

  - name: global-output-consumption
    container:
      image: alpine:3.7
      command: [sh, -c]
      args: ["echo {{workflow.outputs.parameters.global-param}}"]

In this workflow, the nested-global-output-generation template takes the output of the output-generation template and packages its output parameter as a global variable. This is common in the templates I write; the lower-level template generates the parameters/artifacts, but I don't always want to export them; I add a wrapper akin to the nested template above if I do.

In Argo v2.7.0 (and earlier, at least v2.6.3), this works fine, as the logs show:

global-outputs-dblmm-1000914815: hello world

In argo get, we can also see that the output parameter is appropriately exported:

Output Parameters:
  global-param:      hello world

However, in Argo v2.7.1 through v2.7.5, this completely fails to happen. The workflow still executes, but the parameter is never saved as an output parameter, and the next step just prints:

global-outputs-4fqpq-1520819381: {{workflow.outputs.parameters.global-param}}

Its argo get is also missing the Output Parameters section entirely.

Note that we can still pass global outputs as in the original example from container/script templates, but can no longer do so from steps/DAG templates.


Message from the maintainers:

If you are impacted by this bug please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

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

Successfully merging a pull request may close this issue.

2 participants