-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Unable to resolve artifact when dag/tasks includes withItems parameter #1625
Comments
Checking this |
@simster7 any update on this? |
This should be resolved in |
@simster7 The issue is resolved in # This example demonstrates the ability to pass artifacts
# from one step to the next.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: artifact-passing-
spec:
entrypoint: artifact-example
templates:
- name: artifact-example
parallelism: 4
dag:
tasks:
- name: generate-artifact
template: whalesay
arguments:
parameters:
- name: message
value: "{{item}}"
withItems: [0,1,2]
- name: consume-artifact
dependencies: [generate-artifact]
template: print-message
arguments:
artifacts:
- name: message
from: "{{tasks.generate-artifact.outputs.artifacts.hello-art}}"
#from: "{{workflow.outputs.artifacts.my-global-art}}"
- name: whalesay
inputs:
parameters:
- name: message
container:
image: docker/whalesay:latest
command: [bash, -c]
args: ["sleep 1; if [ {{inputs.parameters.message}} == '0' ]; then cowsay hello world | tee /tmp/hello_world.txt; fi"]
#args: ["sleep 1; cowsay hello world {{inputs.parameters.message}}| tee /tmp/hello_world.txt"]
outputs:
artifacts:
- name: hello-art
path: /tmp/hello_world.txt
optional: true
#globalName: my-global-art
- name: print-message
inputs:
artifacts:
- name: message
path: /tmp/message
container:
image: alpine:latest
command: [sh, -c]
args: ["cat /tmp/message"]
#args: ["ls /tmp/message"] The second task gets error with message |
@Itfly Do you solve it? I get the error sometimes. It's weird. apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: artifact-passing-
spec:
entrypoint: artifact-example
templates:
- name: artifact-example
steps:
- - name: generate-artifact
template: whalesay
- - name: consume-artifact
template: print-message
arguments:
artifacts:
# bind message to the hello-art artifact
# generated by the generate-artifact step
- name: message
from: "{{steps.generate-artifact.outputs.artifacts.hello-art}}"
- name: whalesay
container:
image: docker/whalesay:latest
command: [sh, -c]
args: ["cowsay hello world | tee /tmp/hello_world.txt"]
volumeMounts:
- name: out
mountPath: /tmp
volumes:
- name: out
emptyDir: { }
outputs:
artifacts:
# generate hello-art artifact from /tmp/hello_world.txt
# artifacts can be directories as well as files
- name: hello-art
path: /tmp/hello_world.txt
- name: print-message
inputs:
artifacts:
# unpack the message input artifact
# and put it at /tmp/message
- name: message
path: /tmp/message
container:
image: alpine:latest
command: [sh, -c]
args: ["cat /tmp/message"]
|
I still get this exact problem in Argo v3.3.8. Should this issue be re-opened? EDIT: I guess discussion is ongoing in #6805 |
Marking this as superseded as such |
Is this a BUG REPORT or FEATURE REQUEST?:
Not sure, I guess this is a bug
What happened:
I use a DAG template with two tasks, one task with
withItems
parameter and outputs text to artifact, and second one use this artifact as input. However, the second task is failed with errorUnable to resolve: {{tasks.generate-artifact.outputs.artifacts.hello-art}}
.I also use a globalName in artifact, in this case the second task gets not content.
Here's my yaml file:
What you expected to happen:
The next task can read the artifact from previous task's output artifact
How to reproduce it (as minimally and precisely as possible):
Run the yaml file
Anything else we need to know?:
Environment:
The text was updated successfully, but these errors were encountered: