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

v3.4.6+ Cannot access output global artifacts in exit handler after upgrade #11610

Open
2 of 3 tasks
ghulevishal opened this issue Aug 18, 2023 · 6 comments
Open
2 of 3 tasks
Assignees
Labels
area/templating Templating with `{{...}}` P3 Low priority type/bug type/regression Regression from previous behavior (a specific type of bug)

Comments

@ghulevishal
Copy link

ghulevishal commented Aug 18, 2023

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?

Whenever we are calling the global output artifact in the exithandler Its failing with the error:

Bad Request: templates.exit-handler.steps failed to resolve {{workflow.outputs.artifacts.output-result-car}}

This error was introduced after upgrading to the v3.4.6,. Also have tested with v3.4.7, v3.4.8, v3.4.9, v3.4.10 same issue persist.

After downgrading to v3.4.5 same workflow is working without any issue

Version

v3.4.6

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:
  name: exit-handler-with-artifacts
spec:
  onExit: exit-handler
  entrypoint: main
  arguments:
    parameters:
    - name: params
      value: |
        [
          { "variable": "car"},
          { "variable": "bike"}
        ]
  templates:
    - name: main
      steps:
        - - name: step-1
            template: output
            arguments:
              parameters:
                - name: variable
            	  value: "{{item.variable}}"
            withParam: "{{workflow.parameters.params}}" 

    - name: output
       inputs:
        parameters:
        - name: variable
      script:
        image: python:alpine3.6
        command: [sh, -c]
        args: ["echo $variable > /result.txt "]
      outputs:
        artifacts:
          - name: result-{{inputs.parameters.variable}}
            path: /result.txt
            globalName: output-result-{{inputs.parameters.variable}}

    - name: printer
      inputs:
        artifacts:
          - name: message-bike
            path: /tmp/message-bike
          - name: message-car
            path: /tmp/message-car
      container:
        image: python:alpine3.6
        command: [sh, -c]
        args: ["cat /tmp/message.*"]

    - name: exit-handler
      steps:
        - - name: printer
            template: printer
            arguments:
              artifacts:
              - name: message-car
                from: "{{workflow.outputs.artifacts.output-result-car}}"          
              - name: message-bike
                from: "{{workflow.outputs.artifacts.output-result-bike}}" 

Logs from the workflow controller

NA

Logs from in your workflow's wait container

NA
@agilgur5 agilgur5 added the type/regression Regression from previous behavior (a specific type of bug) label Aug 18, 2023
@sarabala1979
Copy link
Member

Based on initial triage. GlobalArtifacts are not included in the scope to replace/substitute for the exit handler. Scope should populate the globalartifacts

func (woc *wfOperationCtx) addArtifactToGlobalScope(art wfv1.Artifact) {

@agilgur5 agilgur5 added the area/templating Templating with `{{...}}` label Sep 1, 2023
@rohankmr414 rohankmr414 added the P3 Low priority label Sep 2, 2023
@rohankmr414 rohankmr414 self-assigned this Sep 3, 2023
@stale

This comment was marked as resolved.

@stale stale bot added the problem/stale This has not had a response in some time label Sep 17, 2023
@terrytangyuan terrytangyuan removed the problem/stale This has not had a response in some time label Sep 20, 2023
@juliev0 juliev0 added the problem/stale This has not had a response in some time label Dec 8, 2023
@Luobiny

This comment was marked as spam.

@agilgur5 agilgur5 changed the title Cannot access output global artifacts in exit handler after upgrading to v3.4.6+ v3.4.6+ Cannot access output global artifacts in exit handler after upgrade Jun 5, 2024
@Luobiny
Copy link

Luobiny commented Jun 10, 2024

An issue related to this one: the global output variables cannot be accessed in in exit handler either. Argo complains that {{workflow.outputs.parameters.global_variable_name}} cannot be resolved.

@agilgur5 agilgur5 removed the problem/stale This has not had a response in some time label Jul 2, 2024
@omerlh
Copy link
Contributor

omerlh commented Sep 19, 2024

Facing same issue as @Luobiny , are there any estimations to when this will be solved?

@tooptoop4
Copy link
Contributor

canz #11738 🐝 📂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/templating Templating with `{{...}}` P3 Low priority type/bug type/regression Regression from previous behavior (a specific type of bug)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants