Skip to content

Commit

Permalink
test(sdk) Restored the ParallelFor compiler test data (4103)
Browse files Browse the repository at this point in the history
* SDK - Tests - Restored the ParallelFor compiler test data

Fixes #4102

* Removed the pipeline-sdk-type annotations

* Fixed the test_artifact_passing_using_volume test data
  • Loading branch information
Ark-kun committed Jun 29, 2020
1 parent 2268ddd commit d24eb78
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 204 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ spec:
template: consumer
arguments:
parameters:
- name: processor-output_1
value: '{{tasks.processor.outputs.parameters.processor-output_1}}'
- name: processor-output_2-subpath
value: '{{tasks.processor.outputs.parameters.processor-output_2-subpath}}'
- name: processor-Output-1
value: '{{tasks.processor.outputs.parameters.processor-Output-1}}'
- name: processor-Output-2-subpath
value: '{{tasks.processor.outputs.parameters.processor-Output-2-subpath}}'
dependencies:
- processor
- name: processor
template: processor
arguments:
parameters:
- name: producer-output_1
value: '{{tasks.producer.outputs.parameters.producer-output_1}}'
- name: producer-output_2-subpath
value: '{{tasks.producer.outputs.parameters.producer-output_2-subpath}}'
- name: producer-Output-1
value: '{{tasks.producer.outputs.parameters.producer-Output-1}}'
- name: producer-Output-2-subpath
value: '{{tasks.producer.outputs.parameters.producer-Output-2-subpath}}'
dependencies:
- producer
- name: producer
Expand All @@ -41,8 +41,8 @@ spec:
pipelines.kubeflow.org/component_spec: '{"inputs": [{"name": "Input parameter"}, {"name": "Input artifact"}], "name": "Consumer"}'
inputs:
parameters:
- name: processor-output_1
- name: processor-output_2-subpath
- name: processor-Output-1
- name: processor-Output-2-subpath
container:
image: alpine
command:
Expand All @@ -52,30 +52,30 @@ spec:
echo "Input parameter = $0"
echo "Input artifact = " && cat "$1"
args:
- '{{inputs.parameters.processor-output_1}}'
- '{{inputs.parameters.processor-Output-1}}'
- /tmp/inputs/Input_artifact/data
volumeMounts:
- name: data-storage
mountPath: /tmp/inputs/Input_artifact
readOnly: true
subPath: '{{inputs.parameters.processor-output_2-subpath}}'
subPath: '{{inputs.parameters.processor-Output-2-subpath}}'
- name: processor
metadata:
annotations:
pipelines.kubeflow.org/component_spec: '{"inputs": [{"name": "Input parameter"}, {"name": "Input artifact"}], "name": "Processor", "outputs": [{"name": "Output 1"}, {"name": "Output 2"}]}'
inputs:
parameters:
- name: producer-output_1
- name: producer-output_2-subpath
- name: producer-Output-1
- name: producer-Output-2-subpath
outputs:
parameters:
- name: processor-output_1
- name: processor-Output-1
valueFrom:
path: /tmp/outputs/Output_1/data
- name: processor-output_1-subpath
value: artifact_data/{{workflow.uid}}_{{pod.name}}/processor-output_1
- name: processor-output_2-subpath
value: artifact_data/{{workflow.uid}}_{{pod.name}}/processor-output_2
- name: processor-Output-1-subpath
value: artifact_data/{{workflow.uid}}_{{pod.name}}/processor-Output-1
- name: processor-Output-2-subpath
value: artifact_data/{{workflow.uid}}_{{pod.name}}/processor-Output-2
container:
image: alpine
command:
Expand All @@ -87,34 +87,34 @@ spec:
echo "$0" > "$2"
cp "$1" "$3"
args:
- '{{inputs.parameters.producer-output_1}}'
- '{{inputs.parameters.producer-Output-1}}'
- /tmp/inputs/Input_artifact/data
- /tmp/outputs/Output_1/data
- /tmp/outputs/Output_2/data
volumeMounts:
- mountPath: /tmp/inputs/Input_artifact
name: data-storage
readOnly: true
subPath: '{{inputs.parameters.producer-output_2-subpath}}'
subPath: '{{inputs.parameters.producer-Output-2-subpath}}'
- mountPath: /tmp/outputs/Output_1
name: data-storage
subPath: artifact_data/{{workflow.uid}}_{{pod.name}}/processor-output_1
subPath: artifact_data/{{workflow.uid}}_{{pod.name}}/processor-Output-1
- mountPath: /tmp/outputs/Output_2
name: data-storage
subPath: artifact_data/{{workflow.uid}}_{{pod.name}}/processor-output_2
subPath: artifact_data/{{workflow.uid}}_{{pod.name}}/processor-Output-2
- name: producer
metadata:
annotations:
pipelines.kubeflow.org/component_spec: '{"name": "Producer", "outputs": [{"name": "Output 1"}, {"name": "Output 2"}]}'
outputs:
parameters:
- name: producer-output_1
- name: producer-Output-1
valueFrom:
path: /tmp/outputs/Output_1/data
- name: producer-output_1-subpath
value: artifact_data/{{workflow.uid}}_{{pod.name}}/producer-output_1
- name: producer-output_2-subpath
value: artifact_data/{{workflow.uid}}_{{pod.name}}/producer-output_2
- name: producer-Output-1-subpath
value: artifact_data/{{workflow.uid}}_{{pod.name}}/producer-Output-1
- name: producer-Output-2-subpath
value: artifact_data/{{workflow.uid}}_{{pod.name}}/producer-Output-2
container:
image: alpine
command:
Expand All @@ -131,10 +131,10 @@ spec:
volumeMounts:
- mountPath: /tmp/outputs/Output_1
name: data-storage
subPath: artifact_data/{{workflow.uid}}_{{pod.name}}/producer-output_1
subPath: artifact_data/{{workflow.uid}}_{{pod.name}}/producer-Output-1
- mountPath: /tmp/outputs/Output_2
name: data-storage
subPath: artifact_data/{{workflow.uid}}_{{pod.name}}/producer-output_2
subPath: artifact_data/{{workflow.uid}}_{{pod.name}}/producer-Output-2
volumes:
- name: data-storage
persistentVolumeClaim:
Expand Down
Loading

0 comments on commit d24eb78

Please sign in to comment.