-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue#896 Workflow steps with non-existant output artifact path will …
…succeed (#1277) * Issue#896 Workflow steps with non-existant output artifact path will succeed Issue: #897 Solution: Added new element "optional" in Artifact. The default is false. This flag will make artifact as optional and existence check will be ignored if input/output artifact has optional=true. Output Artifact ( optional=true ): Artifact existence check will be ignored during the save artifact in destination and continued workflow Input Artifact ( optional=true ): Artifact exist check will be ignored during load artifact from source and continued workflow * added end of line * removed unwanted whitespace * Deleted test code * go formatted * added formatting directives * updated Codegen * Fixed format on merge conflict * format fix * updated comments * improved error case
- Loading branch information
1 parent
adab9ed
commit 9b555cd
Showing
12 changed files
with
167 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
test/e2e/expectedfailures/input-artifact-not-optional.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# This example demonstrates the input artifacts not optionals | ||
# from one step to the next. | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: input-artifact-not-optional- | ||
spec: | ||
entrypoint: http-artifact-example | ||
templates: | ||
- name: http-artifact-example | ||
inputs: | ||
artifacts: | ||
- name: kubectl | ||
path: /bin/kubectl | ||
mode: 0755 | ||
optional: false | ||
http: | ||
url: "" | ||
container: | ||
image: debian:9.4 | ||
command: [sh, -c] | ||
args: ["echo NoKubectl"] |
24 changes: 24 additions & 0 deletions
24
test/e2e/expectedfailures/output-artifact-not-optional.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# This example demonstrates the output artifacts not optionals | ||
# from one step to the next. | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: output-artifact-not-optional- | ||
spec: | ||
entrypoint: artifact-example | ||
templates: | ||
- name: artifact-example | ||
steps: | ||
- - name: generate-artifact | ||
template: whalesay | ||
|
||
- name: whalesay | ||
container: | ||
image: docker/whalesay:latest | ||
command: [sh, -c] | ||
args: ["cowsay hello world | tee /tmp/hello_world12.txt"] | ||
outputs: | ||
artifacts: | ||
- name: hello-art | ||
optional: false | ||
path: /tmp/hello_world.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# This example demonstrates the input artifacts optionals | ||
# from one step to the next. | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: input-artifact-optional- | ||
spec: | ||
entrypoint: http-artifact-example | ||
templates: | ||
- name: http-artifact-example | ||
inputs: | ||
artifacts: | ||
- name: kubectl | ||
path: /bin/kubectl | ||
mode: 0755 | ||
optional: true | ||
http: | ||
url: "" | ||
container: | ||
image: debian:9.4 | ||
command: [sh, -c] | ||
args: ["echo NoKubectl"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# This example demonstrates the output artifacts optionals | ||
# from one step to the next. | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: output-artifact-optional- | ||
spec: | ||
entrypoint: artifact-example | ||
templates: | ||
- name: artifact-example | ||
steps: | ||
- - name: generate-artifact | ||
template: whalesay | ||
|
||
- name: whalesay | ||
container: | ||
image: docker/whalesay:latest | ||
command: [sh, -c] | ||
args: ["cowsay hello world | tee /tmp/hello_world12.txt"] | ||
outputs: | ||
artifacts: | ||
- name: hello-art | ||
optional: true | ||
path: /tmp/hello_world.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# This example demonstrates the output and input artifacts are optionals | ||
# from one step to the next. | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: output-input-artifact-optional- | ||
spec: | ||
entrypoint: artifact-example | ||
templates: | ||
- name: artifact-example | ||
steps: | ||
- - name: generate-artifact | ||
template: whalesay | ||
- - name: consume-artifact | ||
template: print-message | ||
arguments: | ||
artifacts: | ||
- 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_world123.txt"] | ||
outputs: | ||
artifacts: | ||
- name: hello-art | ||
optional: true | ||
path: /tmp/hello_world.txt | ||
|
||
- name: print-message | ||
inputs: | ||
artifacts: | ||
- name: message | ||
path: /tmp/message | ||
optional: true | ||
container: | ||
image: alpine:latest | ||
command: [sh, -c] | ||
args: ["echo /tmp/message"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters