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 reference plugin's output parameters #9966

Closed
2 of 3 tasks
crenshaw-dev opened this issue Nov 4, 2022 · 1 comment · Fixed by #9967
Closed
2 of 3 tasks

Cannot reference plugin's output parameters #9966

crenshaw-dev opened this issue Nov 4, 2022 · 1 comment · Fixed by #9967
Labels

Comments

@crenshaw-dev
Copy link
Member

Pre-requisites

  • I have double-checked my configuration
  • I can confirm the issues exists when I tested with :latest
  • I'd like to contribute the fix myself (see contributing guide)

What happened/what you expected to happen?

I tried to reference the output of a plugin step. The output failed to resolve.

$ argo submit test.yaml
FATA[2022-11-03T21:43:30.628Z] Failed to submit workflow: templates.bash-script-example.steps failed to resolve {{steps.generate.outputs.result}} 
# after changing the argument
$ argo submit test.yaml
FATA[2022-11-03T21:44:18.613Z] Failed to submit workflow: templates.bash-script-example.steps failed to resolve {{steps.generate.outputs.parameters.out}} 

Version

v3.4.2

Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: scripts-bash-
spec:
  entrypoint: bash-script-example
  templates:
    - name: bash-script-example
      steps:
        - - name: generate
            template: gen-random-int
        - - name: print
            template: print-message
            arguments:
              parameters:
                - name: message
                  value: "{{steps.generate.outputs.result}}"
    - name: gen-random-int
      plugin:
        test: {}
    - name: print-message
      inputs:
        parameters:
          - name: message
      container:
        image: alpine:latest
        command: [sh, -c]
        args: ["echo result was: {{inputs.parameters.message}}"]

Logs from the workflow controller

n/a, this error was from the CLI

Logs from in your workflow's wait container

n/a, this error was from the CLI

@crenshaw-dev
Copy link
Member Author

I think this line should return true if tmpl.Plugin != nil.

return tmpl.Container != nil || tmpl.ContainerSet.HasContainerNamed("main") || tmpl.Script != nil || tmpl.Data != nil || tmpl.HTTP != nil

In the context where this is called, we have no idea whether the plugin will return outputs. So we should assume that it may.

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.

1 participant