diff --git a/sdk/python/kfp_tekton/compiler/_data_passing_rewriter.py b/sdk/python/kfp_tekton/compiler/_data_passing_rewriter.py index 540369dea2a..8182fccebfc 100644 --- a/sdk/python/kfp_tekton/compiler/_data_passing_rewriter.py +++ b/sdk/python/kfp_tekton/compiler/_data_passing_rewriter.py @@ -339,7 +339,7 @@ def mark_upstream_ios_of_output(template_output, marked_inputs, renamed_results_in_pipeline_task = set() for task_result in spec['results']: task_result_old_name = task_result.get('name') - task_result_new_name = sanitize_k8s_name(task_result_old_name) + task_result_new_name = sanitize_k8s_name(task_result_old_name, allow_capital=True) if task_result_new_name != task_result_old_name: task_result['name'] = task_result_new_name renamed_results_in_pipeline_task.add( @@ -378,7 +378,7 @@ def mark_upstream_ios_of_output(template_output, marked_inputs, argument['value'] = '$(tasks.%s.%s.%s)' % ( argument_placeholder_parts[1], argument_placeholder_parts[2], - sanitize_k8s_name(argument_placeholder_parts[3])) + sanitize_k8s_name(argument_placeholder_parts[3], allow_capital=True)) workflow = jsonify_annotations(workflow) # Need to confirm: @@ -456,7 +456,7 @@ def big_data_passing_pipeline(name: str, template: dict, inputs_tasks: set(), if artifact_output_list: tmp_list = set() for output in json.loads(artifact_output_list): - tmp_list.add(sanitize_k8s_name(output)) + tmp_list.add(sanitize_k8s_name(output, allow_capital=True)) for task_output in task.get('taskSpec', {}).get('results', []): if task_output.get('name') in tmp_list: if not task.setdefault('workspaces', []): @@ -515,7 +515,7 @@ def big_data_passing_tasks(prname: str, task: dict, pipelinerun_template: dict, temp_list = json.loads(artifact_output_list) artifact_output_list = [] for output in temp_list: - artifact_output_list.append(sanitize_k8s_name(output)) + artifact_output_list.append(sanitize_k8s_name(output, allow_capital=True)) for task_output in task.get('taskSpec', {}).get('results', []): if (task_name, task_output.get('name')) in outputs_tasks or \ (artifact_output_list and task_output.get('name') in artifact_output_list): @@ -525,7 +525,7 @@ def big_data_passing_tasks(prname: str, task: dict, pipelinerun_template: dict, # $(results.task_output.get('name').path) --> # $(workspaces.task_name.path)/task_name-task_output.get('name') placeholder = '$(results.%s.path)' % (sanitize_k8s_name( - task_output.get('name'))) + task_output.get('name'), allow_capital=True)) workspaces_parameter = '$(workspaces.%s.path)/%s/%s/%s' % ( task_name, BIG_DATA_MIDPATH, "$(context.taskRun.name)", task_output.get('name')) if env.get('OUTPUT_BIG_DATA_PATH', 'false').lower() == 'true': @@ -622,7 +622,7 @@ def append_taskrun_params(task_name_append: str, task_path_name: str): if task_param_task_name: workspaces_parameter = '$(workspaces.%s.path)/%s/$(params.%s-trname)/%s' % ( task_name, BIG_DATA_MIDPATH, task_param_task_name, task_param_param_name) - task_path = sanitize_k8s_name(task_param_param_name) + OUTPUT_RESULT_PATH_SUFFIX + task_path = sanitize_k8s_name(task_param_param_name, allow_capital=True) + OUTPUT_RESULT_PATH_SUFFIX if env.get('OUTPUT_BIG_DATA_PATH', 'false').lower() == 'true': workspaces_parameter = '$(workspaces.%s.path)/$(params.%s)' % (task_name, '-'.join([task_param_task_name, task_path])) if task_param_task_name != task_name: @@ -664,7 +664,7 @@ def append_taskrun_params(task_name_append: str, task_path_name: str): for index, artifact_tuple in enumerate(artifact_i): artifact_name, artifact = artifact_tuple src = artifact - dst = '$(results.%s.path)' % sanitize_k8s_name(result['name']) + dst = '$(results.%s.path)' % sanitize_k8s_name(result['name'], allow_capital=True) if artifact_name == result['name'] and src != dst: add_copy_results_artifacts_step = True total_size_command = 'ARTIFACT_SIZE=`wc -c %s${SUFFIX} | awk \'{print $1}\'`\n' % src + \ diff --git a/sdk/python/kfp_tekton/compiler/_k8s_helper.py b/sdk/python/kfp_tekton/compiler/_k8s_helper.py index 1366d92d905..1aa1941cd14 100644 --- a/sdk/python/kfp_tekton/compiler/_k8s_helper.py +++ b/sdk/python/kfp_tekton/compiler/_k8s_helper.py @@ -23,7 +23,8 @@ def sanitize_k8s_name(name, allow_slash=False, max_length=57, suffix_space=0, - rev_truncate=False): + rev_truncate=False, + allow_capital=False): """From _make_kubernetes_name sanitize_k8s_name cleans and converts the names in the workflow. @@ -46,7 +47,9 @@ def sanitize_k8s_name(name, k8s_name = re.sub('[^-_./0-9A-Za-z]+', '-', name) if not allow_capital_underscore: - k8s_name = re.sub('_', '-', k8s_name.lower()) + k8s_name = re.sub('_', '-', k8s_name) + if not allow_capital: + k8s_name = k8s_name.lower() if not allow_dot: k8s_name = re.sub('[.]', '-', k8s_name) diff --git a/sdk/python/kfp_tekton/compiler/_op_to_template.py b/sdk/python/kfp_tekton/compiler/_op_to_template.py index 6474b0a3b2f..305fbfafef6 100644 --- a/sdk/python/kfp_tekton/compiler/_op_to_template.py +++ b/sdk/python/kfp_tekton/compiler/_op_to_template.py @@ -71,11 +71,11 @@ def _get_copy_result_step_template(step_number: int, result_maps: list): """ args = [""] for key in result_maps[step_number].keys(): - sanitize_key = sanitize_k8s_name(key) + sanitize_key = sanitize_k8s_name(key, allow_capital=True) args[0] += "mv %s%s $(results.%s.path);\n" % (TEKTON_HOME_RESULT_PATH, sanitize_key, sanitize_key) if step_number > 0: for key in result_maps[step_number - 1].keys(): - sanitize_key = sanitize_k8s_name(key) + sanitize_key = sanitize_k8s_name(key, allow_capital=True) args[0] += "mv $(results.%s.path) %s%s;\n" % (sanitize_key, TEKTON_HOME_RESULT_PATH, sanitize_key) return { "name": "copy-results-%s" % str(step_number), @@ -288,7 +288,7 @@ def _process_parameters(processed_op: BaseOp, commands = [] for c in s['command']: if path in c: - c = c.replace(path, '$(results.%s.path)' % sanitize_k8s_name(name)) + c = c.replace(path, '$(results.%s.path)' % sanitize_k8s_name(name, allow_capital=True)) need_copy_step = False commands.append(c) s['command'] = commands @@ -296,15 +296,15 @@ def _process_parameters(processed_op: BaseOp, args = [] for a in s['args']: if path in a: - a = a.replace(path, '$(results.%s.path)' % sanitize_k8s_name(name)) + a = a.replace(path, '$(results.%s.path)' % sanitize_k8s_name(name, allow_capital=True)) need_copy_step = False args.append(a) s['args'] = args - if path == '/tekton/results/' + sanitize_k8s_name(name): + if path == '/tekton/results/' + sanitize_k8s_name(name, allow_capital=True): need_copy_step = False # If file output path cannot be found/replaced, use emptyDir to copy it to the tekton/results path if need_copy_step: - script = script + 'cp ' + path + ' $(results.%s.path);\n' % sanitize_k8s_name(name) + script = script + 'cp ' + path + ' $(results.%s.path);\n' % sanitize_k8s_name(name, allow_capital=True) mount_path = path.rsplit("/", 1)[0] if mount_path not in mounted_param_paths: _add_mount_path(name, path, mount_path, volume_mount_step_template, volume_template, mounted_param_paths) @@ -346,7 +346,7 @@ def _process_output_artifacts(outputs_dict: Dict[Text, Any], parameter_name = sanitize_k8s_name(artifact['name'], allow_capital_underscore=True, max_length=float('Inf')) artifact_name = artifact_to_result_mapping.get(parameter_name, parameter_name) if parameter_name in replaced_param_list: - artifact_items.append([artifact_name, "$(results.%s.path)" % sanitize_k8s_name(artifact_name)]) + artifact_items.append([artifact_name, "$(results.%s.path)" % sanitize_k8s_name(artifact_name, allow_capital=True)]) else: artifact_items.append([artifact_name, artifact['path']]) mount_path = artifact['path'].rsplit("/", 1)[0] @@ -633,7 +633,7 @@ def _op_to_template(op: BaseOp, for key in result_size_map.keys(): # Replace main step results that are not in the first bin to the Tekton home path if key not in verified_result_size_map[0].keys(): - sanitize_key = sanitize_k8s_name(key) + sanitize_key = sanitize_k8s_name(key, allow_capital=True) for i, a in enumerate(step['args']): a = a.replace('$(results.%s.path)' % sanitize_key, '%s%s' % (TEKTON_HOME_RESULT_PATH, sanitize_key)) step['args'][i] = a @@ -648,6 +648,6 @@ def _op_to_template(op: BaseOp, # Update actifact item location to the latest stage in order to properly track and store all the artifacts. for i, artifact in enumerate(artifact_items[op.name]): if artifact[0] not in verified_result_size_map[step_counter].keys(): - artifact[1] = '%s%s' % (TEKTON_HOME_RESULT_PATH, sanitize_k8s_name(artifact[0])) + artifact[1] = '%s%s' % (TEKTON_HOME_RESULT_PATH, sanitize_k8s_name(artifact[0], allow_capital=True)) artifact_items[op.name][i] = artifact return template diff --git a/sdk/python/kfp_tekton/compiler/compiler.py b/sdk/python/kfp_tekton/compiler/compiler.py index c36b041480e..b75f839560e 100644 --- a/sdk/python/kfp_tekton/compiler/compiler.py +++ b/sdk/python/kfp_tekton/compiler/compiler.py @@ -326,7 +326,7 @@ def _group_to_dag_template(self, group, inputs, outputs, dependencies, pipeline_ replace_str = param[1] + '-' self.loops_pipeline[group_name]['spec']['params'].append({ 'name': param[0], 'value': '$(tasks.%s.results.%s)' % ( - param[1], sanitize_k8s_name(param[0].replace(replace_str, '', 1)) + param[1], sanitize_k8s_name(param[0].replace(replace_str, '', 1), allow_capital=True) ) }) if not param[1]: @@ -370,7 +370,7 @@ def input_helper(custom_task, sub_group, param_list): replace_str = param[1] + '-' custom_task['spec']['params'].append({ 'name': param[0], 'value': '$(tasks.%s.results.%s)' % ( - param[1], sanitize_k8s_name(param[0].replace(replace_str, '', 1)) + param[1], sanitize_k8s_name(param[0].replace(replace_str, '', 1), allow_capital=True) ) }) if not param[1] and param[0] not in param_list: @@ -385,7 +385,7 @@ def process_pipelineparam(s): if pipe_param[0] == '': s = s.replace("{{pipelineparam:op=%s;name=%s}}" % pipe_param, '$(params.%s)' % pipe_param[1]) else: - param_name = sanitize_k8s_name(pipe_param[1]) + param_name = sanitize_k8s_name(pipe_param[1], allow_capital=True) s = s.replace("{{pipelineparam:op=%s;name=%s}}" % pipe_param, '$(tasks.%s.results.%s)' % ( sanitize_k8s_name(pipe_param[0]), param_name)) @@ -398,7 +398,7 @@ def process_pipelineparam(s): if v.op_name is None: v = '$(params.%s)' % v.name else: - param_name = sanitize_k8s_name(v.name) + param_name = sanitize_k8s_name(v.name, allow_capital=True) v = '$(tasks.%s.results.%s)' % ( sanitize_k8s_name(v.op_name), param_name) @@ -467,7 +467,7 @@ def process_pipelineparam(s): if pipeline_param.op_name is None: withparam_value = '$(params.%s)' % pipeline_param.name else: - param_name = sanitize_k8s_name(pipeline_param.name) + param_name = sanitize_k8s_name(pipeline_param.name, allow_capital=True) withparam_value = '$(tasks.%s.results.%s)' % ( sanitize_k8s_name(pipeline_param.op_name), param_name) @@ -495,7 +495,7 @@ def process_pipelineparam(s): if v.op_name is None: v = '$(params.%s)' % v.name else: - param_name = sanitize_k8s_name(v.name) + param_name = sanitize_k8s_name(v.name, allow_capital=True) v = '$(tasks.%s.results.%s)' % ( sanitize_k8s_name(v.op_name), param_name) @@ -522,7 +522,8 @@ def process_parameter(parameter): parameter_value = str(parameter) if isinstance(parameter, dsl.PipelineParam): if parameter.op_name: - parameter_value = '$(tasks.' + parameter.op_name + '.results.' + sanitize_k8s_name(parameter.name) + ')' + parameter_value = '$(tasks.' + parameter.op_name + '.results.' + \ + sanitize_k8s_name(parameter.name, allow_capital=True) + ')' else: parameter_value = '$(params.' + parameter.name + ')' return parameter_value @@ -956,7 +957,7 @@ def is_custom_task_output(operand) -> bool: def map_cel_vars(a): if a.get('type', '') == dsl.PipelineParam: op_name = sanitize_k8s_name(a['op_name']) - output_name = sanitize_k8s_name(a['output_name']) + output_name = sanitize_k8s_name(a['output_name'], allow_capital=True) return '$(tasks.%s.results.%s)' % (op_name, output_name) else: return a.get('value', '') @@ -1083,13 +1084,15 @@ def map_cel_vars(a): # Process input parameters if needed if isinstance(condition.operand1, dsl.PipelineParam): if condition.operand1.op_name: - operand_value = '$(tasks.' + condition.operand1.op_name + '.results.' + sanitize_k8s_name(condition.operand1.name) + ')' + operand_value = '$(tasks.' + condition.operand1.op_name + '.results.' + \ + sanitize_k8s_name(condition.operand1.name, allow_capital=True) + ')' else: operand_value = '$(params.' + condition.operand1.name + ')' input_params.append(operand_value) if isinstance(condition.operand2, dsl.PipelineParam): if condition.operand2.op_name: - operand_value = '$(tasks.' + condition.operand2.op_name + '.results.' + sanitize_k8s_name(condition.operand2.name) + ')' + operand_value = '$(tasks.' + condition.operand2.op_name + '.results.' + \ + sanitize_k8s_name(condition.operand2.name, allow_capital=True) + ')' else: operand_value = '$(params.' + condition.operand2.name + ')' input_params.append(operand_value) @@ -1226,7 +1229,8 @@ def get_when_task(input_task_when, depended_conditions): for pp in op.inputs: if pipeline_param == pp.full_name: # Parameters from Tekton results need to be sanitized - substitute_param = '$(tasks.%s.results.%s)' % (sanitize_k8s_name(pp.op_name), sanitize_k8s_name(pp.name)) + substitute_param = '$(tasks.%s.results.%s)' % (sanitize_k8s_name(pp.op_name), + sanitize_k8s_name(pp.name, allow_capital=True)) tp['value'] = re.sub('\$\(inputs.params.%s\)' % pipeline_param, substitute_param, tp.get('value', '')) break # Not necessary for Tekton execution @@ -1406,15 +1410,15 @@ def _sanitize_and_inject_artifact(self, pipeline: dsl.Pipeline, pipeline_conf=No if len(param.op_name) > 128: raise ValueError('Input parameter cannot be longer than 128 characters. \ \nInput name: %s. \nOp name: %s' % (param.op_name, op.name)) - param.op_name = sanitize_k8s_name(param.op_name, max_length=float('inf')) + param.op_name = sanitize_k8s_name(param.op_name, max_length=float('inf'), allow_capital=True) # sanitized output params for param in op.outputs.values(): param.name = sanitize_k8s_name(param.name, True) if param.op_name: - param.op_name = sanitize_k8s_name(param.op_name) + param.op_name = sanitize_k8s_name(param.op_name, allow_capital=True) if op.output is not None and not isinstance(op.output, dsl._container_op._MultipleOutputsError): op.output.name = sanitize_k8s_name(op.output.name, True) - op.output.op_name = sanitize_k8s_name(op.output.op_name) + op.output.op_name = sanitize_k8s_name(op.output.op_name, allow_capital=True) if op.dependent_names: op.dependent_names = [sanitize_k8s_name(name) for name in op.dependent_names] if isinstance(op, dsl.ContainerOp) and op.file_outputs is not None: diff --git a/sdk/python/kfp_tekton/tekton.py b/sdk/python/kfp_tekton/tekton.py index 3e79cb48075..6e941e4fd05 100644 --- a/sdk/python/kfp_tekton/tekton.py +++ b/sdk/python/kfp_tekton/tekton.py @@ -106,7 +106,8 @@ def AnySequencer(any: Iterable[Union[dsl.ContainerOp, ConditionOperator]], def processOperand(operand) -> (str, str): if isinstance(operand, dsl.PipelineParam): - return "results_" + sanitize_k8s_name(operand.op_name) + "_" + sanitize_k8s_name(operand.name), operand.op_name + return "results_" + sanitize_k8s_name(operand.op_name) + "_" + \ + sanitize_k8s_name(operand.name, allow_capital=True), operand.op_name else: # Do the same as in _get_super_condition_template to check whehter it's int try: diff --git a/sdk/python/tests/compiler/compiler_tests.py b/sdk/python/tests/compiler/compiler_tests.py index 0181893475a..92fa52a48fb 100644 --- a/sdk/python/tests/compiler/compiler_tests.py +++ b/sdk/python/tests/compiler/compiler_tests.py @@ -113,6 +113,13 @@ def test_sequential_workflow(self): from .testdata.sequential import sequential_pipeline self._test_pipeline_workflow(sequential_pipeline, 'sequential.yaml', skip_noninlined=True) + def test_custom_task_output_workflow(self): + """ + Test compiling a custom task output workflow. + """ + from .testdata.custom_task_output import uppercase_vs_lowercase + self._test_pipeline_workflow(uppercase_vs_lowercase, 'custom_task_output.yaml', skip_noninlined=True) + def test_parallel_join_workflow(self): """ Test compiling a parallel join workflow. diff --git a/sdk/python/tests/compiler/testdata/any_sequencer.yaml b/sdk/python/tests/compiler/testdata/any_sequencer.yaml index 097d2ca365e..b53c052f35d 100644 --- a/sdk/python/tests/compiler/testdata/any_sequencer.yaml +++ b/sdk/python/tests/compiler/testdata/any_sequencer.yaml @@ -26,7 +26,7 @@ metadata: tekton.dev/artifact_endpoint: minio-service.kubeflow:9000 tekton.dev/artifact_endpoint_scheme: http:// tekton.dev/artifact_items: '{"any-test": [["status", "$(results.status.path)"]], - "flip-coin": [["Output", "$(results.output.path)"]], "sleepcomponent": [], "sleepcomponent-2": + "flip-coin": [["Output", "$(results.Output.path)"]], "sleepcomponent": [], "sleepcomponent-2": [], "sleepcomponent-3": [], "sleepcomponent-4": []}' sidecar.istio.io/inject: "false" pipelines.kubeflow.org/big_data_passing_format: $(workspaces.$TASK_NAME.path)/artifacts/$ORIG_PR_NAME/$TASKRUN_NAME/$TASK_PARAM_NAME @@ -98,7 +98,7 @@ spec: - name: main args: - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -145,7 +145,7 @@ spec: f.write(_output_serializers[idx](_outputs[idx])) image: python:alpine3.6 results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -195,7 +195,7 @@ spec: - --statusPath - $(results.status.path) - -c - - results_flip-coin_output == 'heads' + - results_flip-coin_Output == 'heads' command: - any-task image: dspipelines/any-sequencer:latest @@ -211,7 +211,7 @@ spec: annotations: pipelines.kubeflow.org/component_spec_digest: '{"name": "any_test", "outputs": [{"description": "The output file to create the status", "name": "status"}], - "version": "any_test@sha256=03b2b97be43cc77f2df70fd915a8fcd2e061341d7904af268cb4b2a4bbd86a76"}' + "version": "any_test@sha256=c4aaac826d09733534b96ec4a17c6646fa9d71e55d1e4bece1a5c0d20873e563"}' tekton.dev/template: '' params: - name: pipelineRun-name diff --git a/sdk/python/tests/compiler/testdata/artifact_passing_using_volume.yaml b/sdk/python/tests/compiler/testdata/artifact_passing_using_volume.yaml index a69c95d9582..dc10eee6332 100644 --- a/sdk/python/tests/compiler/testdata/artifact_passing_using_volume.yaml +++ b/sdk/python/tests/compiler/testdata/artifact_passing_using_volume.yaml @@ -36,8 +36,8 @@ metadata: tekton.dev/artifact_endpoint_scheme: http:// tekton.dev/artifact_items: '{"consumer": [], "metadata-and-metrics": [["mlpipeline-ui-metadata", "/tmp/outputs/mlpipeline_ui_metadata/data"], ["mlpipeline-metrics", "/tmp/outputs/mlpipeline_metrics/data"]], - "processor": [["Output-1", "$(results.output-1.path)"], ["Output-2", "$(workspaces.processor.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2"]], - "producer": [["Output-1", "$(results.output-1.path)"], ["Output-2", "$(workspaces.producer.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2"]]}' + "processor": [["Output-1", "$(results.Output-1.path)"], ["Output-2", "$(workspaces.processor.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2"]], + "producer": [["Output-1", "$(results.Output-1.path)"], ["Output-2", "$(workspaces.producer.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2"]]}' sidecar.istio.io/inject: "false" pipelines.kubeflow.org/big_data_passing_format: $(workspaces.$TASK_NAME.path)/artifacts/$ORIG_PR_NAME/$TASKRUN_NAME/$TASK_PARAM_NAME pipelines.kubeflow.org/pipeline_spec: '{"name": "Artifact passing pipeline"}' @@ -49,7 +49,7 @@ spec: steps: - name: main args: - - $(results.output-1.path) + - $(results.Output-1.path) - $(workspaces.producer.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2 command: - sh @@ -85,12 +85,12 @@ spec: fi ARTIFACT_SIZE=`wc -c $(workspaces.producer.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2${SUFFIX} | awk '{print $1}'` TOTAL_SIZE=$( expr $TOTAL_SIZE + $ARTIFACT_SIZE) - touch $(results.output-2.path) + touch $(results.Output-2.path) if [[ $TOTAL_SIZE -lt 3072 ]]; then if [ -d $(workspaces.producer.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2 ]; then - tar -tzf $(workspaces.producer.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2.tar.gz > $(results.output-2.path) + tar -tzf $(workspaces.producer.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2.tar.gz > $(results.Output-2.path) elif ! awk "/[^[:print:]]/{f=1} END{exit !f}" $(workspaces.producer.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2; then - cp $(workspaces.producer.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2 $(results.output-2.path) + cp $(workspaces.producer.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2 $(results.Output-2.path) fi fi onError: continue @@ -100,10 +100,10 @@ spec: fieldRef: fieldPath: metadata.labels['custom.tekton.dev/originalPipelineRun'] results: - - name: output-1 + - name: Output-1 type: string description: /tmp/outputs/Output_1/data - - name: output-2 + - name: Output-2 type: string description: /tmp/outputs/Output_2/data - name: taskrun-name @@ -126,7 +126,7 @@ spec: - name: processor params: - name: producer-Output-1 - value: $(tasks.producer.results.output-1) + value: $(tasks.producer.results.Output-1) - name: producer-trname value: $(tasks.producer.results.taskrun-name) taskSpec: @@ -135,7 +135,7 @@ spec: args: - $(inputs.params.producer-Output-1) - $(workspaces.processor.path)/artifacts/$ORIG_PR_NAME/$(params.producer-trname)/Output-2 - - $(results.output-1.path) + - $(results.Output-1.path) - $(workspaces.processor.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2 command: - sh @@ -171,12 +171,12 @@ spec: fi ARTIFACT_SIZE=`wc -c $(workspaces.processor.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2${SUFFIX} | awk '{print $1}'` TOTAL_SIZE=$( expr $TOTAL_SIZE + $ARTIFACT_SIZE) - touch $(results.output-2.path) + touch $(results.Output-2.path) if [[ $TOTAL_SIZE -lt 3072 ]]; then if [ -d $(workspaces.processor.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2 ]; then - tar -tzf $(workspaces.processor.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2.tar.gz > $(results.output-2.path) + tar -tzf $(workspaces.processor.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2.tar.gz > $(results.Output-2.path) elif ! awk "/[^[:print:]]/{f=1} END{exit !f}" $(workspaces.processor.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2; then - cp $(workspaces.processor.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2 $(results.output-2.path) + cp $(workspaces.processor.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output-2 $(results.Output-2.path) fi fi onError: continue @@ -189,10 +189,10 @@ spec: - name: producer-Output-1 - name: producer-trname results: - - name: output-1 + - name: Output-1 type: string description: /tmp/outputs/Output_1/data - - name: output-2 + - name: Output-2 type: string description: /tmp/outputs/Output_2/data - name: taskrun-name @@ -217,7 +217,7 @@ spec: - name: consumer params: - name: processor-Output-1 - value: $(tasks.processor.results.output-1) + value: $(tasks.processor.results.Output-1) - name: processor-trname value: $(tasks.processor.results.taskrun-name) taskSpec: diff --git a/sdk/python/tests/compiler/testdata/big_data_passing.yaml b/sdk/python/tests/compiler/testdata/big_data_passing.yaml index 6b28a0bddbc..3b583809fcc 100644 --- a/sdk/python/tests/compiler/testdata/big_data_passing.yaml +++ b/sdk/python/tests/compiler/testdata/big_data_passing.yaml @@ -38,7 +38,7 @@ metadata: tekton.dev/artifact_bucket: mlpipeline tekton.dev/artifact_endpoint: minio-service.kubeflow:9000 tekton.dev/artifact_endpoint_scheme: http:// - tekton.dev/artifact_items: '{"gen-params": [["Output", "$(results.output.path)"]], + tekton.dev/artifact_items: '{"gen-params": [["Output", "$(results.Output.path)"]], "print-params": [], "print-text": [], "print-text-2": [], "print-text-3": [], "print-text-4": [], "print-text-5": [], "repeat-line": [["output_text", "$(workspaces.repeat-line.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/output_text"]], "split-text-lines": [["even_lines", "$(workspaces.split-text-lines.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/even_lines"], @@ -658,12 +658,12 @@ spec: fi ARTIFACT_SIZE=`wc -c $(workspaces.sum-numbers.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output${SUFFIX} | awk '{print $1}'` TOTAL_SIZE=$( expr $TOTAL_SIZE + $ARTIFACT_SIZE) - touch $(results.output.path) + touch $(results.Output.path) if [[ $TOTAL_SIZE -lt 3072 ]]; then if [ -d $(workspaces.sum-numbers.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output ]; then - tar -tzf $(workspaces.sum-numbers.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output.tar.gz > $(results.output.path) + tar -tzf $(workspaces.sum-numbers.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output.tar.gz > $(results.Output.path) elif ! awk "/[^[:print:]]/{f=1} END{exit !f}" $(workspaces.sum-numbers.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output; then - cp $(workspaces.sum-numbers.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output $(results.output.path) + cp $(workspaces.sum-numbers.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output $(results.Output.path) fi fi onError: continue @@ -675,7 +675,7 @@ spec: params: - name: write-numbers-trname results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data - name: taskrun-name @@ -761,7 +761,7 @@ spec: - name: main args: - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -808,7 +808,7 @@ spec: f.write(_output_serializers[idx](_outputs[idx])) image: python:3.7 results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -825,7 +825,7 @@ spec: - name: print-params params: - name: gen-params-Output - value: $(tasks.gen-params.results.output) + value: $(tasks.gen-params.results.Output) taskSpec: steps: - name: main diff --git a/sdk/python/tests/compiler/testdata/conditions_and_loops.yaml b/sdk/python/tests/compiler/testdata/conditions_and_loops.yaml index c0ef2f76a59..31afd9fc22d 100644 --- a/sdk/python/tests/compiler/testdata/conditions_and_loops.yaml +++ b/sdk/python/tests/compiler/testdata/conditions_and_loops.yaml @@ -27,9 +27,9 @@ metadata: tekton.dev/artifact_bucket: mlpipeline tekton.dev/artifact_endpoint: minio-service.kubeflow:9000 tekton.dev/artifact_endpoint_scheme: http:// - tekton.dev/artifact_items: '{"add-numbers": [["Output", "$(results.output.path)"]], - "notify-failure": [], "notify-success": [], "print-number": [["Output", "$(results.output.path)"]], - "produce-numbers": [["Output", "$(results.output.path)"]]}' + tekton.dev/artifact_items: '{"add-numbers": [["Output", "$(results.Output.path)"]], + "notify-failure": [], "notify-success": [], "print-number": [["Output", "$(results.Output.path)"]], + "produce-numbers": [["Output", "$(results.Output.path)"]]}' sidecar.istio.io/inject: "false" pipelines.kubeflow.org/big_data_passing_format: $(workspaces.$TASK_NAME.path)/artifacts/$ORIG_PR_NAME/$TASKRUN_NAME/$TASK_PARAM_NAME pipelines.kubeflow.org/pipeline_spec: '{"inputs": [{"default": "3", "name": "n", @@ -59,7 +59,7 @@ spec: - --n - $(inputs.params.n) - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -117,7 +117,7 @@ spec: params: - name: "n" results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -136,7 +136,7 @@ spec: name: conditions-and-loops-for-loop-1 params: - name: produce-numbers-Output-loop-item - value: $(tasks.produce-numbers.results.output) + value: $(tasks.produce-numbers.results.Output) - name: threshold value: $(params.threshold) taskSpec: @@ -163,7 +163,7 @@ spec: - --b - '10' - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -214,7 +214,7 @@ spec: - name: produce-numbers-Output-loop-item type: string results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -231,7 +231,7 @@ spec: - name: print-number params: - name: add-numbers-Output - value: $(tasks.add-numbers.results.output) + value: $(tasks.add-numbers.results.Output) taskSpec: steps: - name: main @@ -239,7 +239,7 @@ spec: - --a - $(inputs.params.add-numbers-Output) - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -289,7 +289,7 @@ spec: - name: add-numbers-Output type: string results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -378,7 +378,7 @@ spec: - name: condition-2 params: - name: operand1 - value: $(tasks.print-number.results.output) + value: $(tasks.print-number.results.Output) - name: operand2 value: $(params.threshold) - name: operator @@ -427,7 +427,7 @@ spec: - name: condition-3 params: - name: operand1 - value: $(tasks.print-number.results.output) + value: $(tasks.print-number.results.Output) - name: operand2 value: $(params.threshold) - name: operator diff --git a/sdk/python/tests/compiler/testdata/conditions_and_loops_noninlined.yaml b/sdk/python/tests/compiler/testdata/conditions_and_loops_noninlined.yaml index 41ec443a434..2d7de7914cd 100644 --- a/sdk/python/tests/compiler/testdata/conditions_and_loops_noninlined.yaml +++ b/sdk/python/tests/compiler/testdata/conditions_and_loops_noninlined.yaml @@ -27,9 +27,9 @@ metadata: tekton.dev/artifact_bucket: mlpipeline tekton.dev/artifact_endpoint: minio-service.kubeflow:9000 tekton.dev/artifact_endpoint_scheme: http:// - tekton.dev/artifact_items: '{"add-numbers": [["Output", "$(results.output.path)"]], - "notify-failure": [], "notify-success": [], "print-number": [["Output", "$(results.output.path)"]], - "produce-numbers": [["Output", "$(results.output.path)"]]}' + tekton.dev/artifact_items: '{"add-numbers": [["Output", "$(results.Output.path)"]], + "notify-failure": [], "notify-success": [], "print-number": [["Output", "$(results.Output.path)"]], + "produce-numbers": [["Output", "$(results.Output.path)"]]}' sidecar.istio.io/inject: "false" pipelines.kubeflow.org/big_data_passing_format: $(workspaces.$TASK_NAME.path)/artifacts/$ORIG_PR_NAME/$TASKRUN_NAME/$TASK_PARAM_NAME pipelines.kubeflow.org/pipeline_spec: '{"inputs": [{"default": "3", "name": "n", @@ -47,9 +47,9 @@ metadata: "tekton.dev/template": ""}, "labels": {"pipelines.kubeflow.org/cache_enabled": "true", "pipelines.kubeflow.org/generation": "", "pipelines.kubeflow.org/pipelinename": ""}}, "params": [{"name": "produce-numbers-Output-loop-item", "type": "string"}], - "results": [{"description": "/tmp/outputs/Output/data", "name": "output", "type": + "results": [{"description": "/tmp/outputs/Output/data", "name": "Output", "type": "string"}], "steps": [{"args": ["--a", "$(inputs.params.produce-numbers-Output-loop-item)", - "--b", "10", "----output-paths", "$(results.output.path)"], "command": ["sh", + "--b", "10", "----output-paths", "$(results.Output.path)"], "command": ["sh", "-ec", "program_path=$(mktemp)\nprintf \"%s\" \"$0\" > \"$program_path\"\npython3 -u \"$program_path\" \"$@\"\n", "def add_numbers(a, b):\n print(a + b)\n return a + b\n\ndef _serialize_int(int_value: int) -> str:\n if isinstance(int_value, @@ -65,16 +65,16 @@ metadata: os\nfor idx, output_file in enumerate(_output_files):\n try:\n os.makedirs(os.path.dirname(output_file))\n except OSError:\n pass\n with open(output_file, ''w'') as f:\n f.write(_output_serializers[idx](_outputs[idx]))\n"], "image": "python:3.7", "name": "main"}]}, "timeout": "525600m"}, {"name": "print-number", - "params": [{"name": "add-numbers-Output", "value": "$(tasks.add-numbers.results.output)"}], + "params": [{"name": "add-numbers-Output", "value": "$(tasks.add-numbers.results.Output)"}], "taskSpec": {"metadata": {"annotations": {"pipelines.kubeflow.org/component_spec_digest": "{\"name\": \"Print number\", \"outputs\": [{\"name\": \"Output\", \"type\": \"Integer\"}], \"version\": \"Print number@sha256=7ad81f52d1b478fd168c0234b16a496672bdfc43da71a71fcdc5d688791f04cf\"}", "tekton.dev/template": ""}, "labels": {"pipelines.kubeflow.org/cache_enabled": "true", "pipelines.kubeflow.org/generation": "", "pipelines.kubeflow.org/pipelinename": ""}}, "params": [{"name": "add-numbers-Output", "type": "string"}], "results": - [{"description": "/tmp/outputs/Output/data", "name": "output", "type": "string"}], + [{"description": "/tmp/outputs/Output/data", "name": "Output", "type": "string"}], "steps": [{"args": ["--a", "$(inputs.params.add-numbers-Output)", "----output-paths", - "$(results.output.path)"], "command": ["sh", "-ec", "program_path=$(mktemp)\nprintf + "$(results.Output.path)"], "command": ["sh", "-ec", "program_path=$(mktemp)\nprintf \"%s\" \"$0\" > \"$program_path\"\npython3 -u \"$program_path\" \"$@\"\n", "def print_number(a):\n print(a)\n return a\n\ndef _serialize_int(int_value: int) -> str:\n if isinstance(int_value, str):\n return int_value\n if @@ -109,7 +109,7 @@ metadata: = vars(_parser.parse_args())\n\n_outputs = notify_failure(**_parsed_args)\n"], "image": "python:3.7", "name": "main"}]}, "timeout": "525600m", "when": [{"input": "$(tasks.condition-3.results.outcome)", "operator": "in", "values": ["true"]}]}, - {"name": "condition-2", "params": [{"name": "operand1", "value": "$(tasks.print-number.results.output)"}, + {"name": "condition-2", "params": [{"name": "operand1", "value": "$(tasks.print-number.results.Output)"}, {"name": "operand2", "value": "$(params.threshold)"}, {"name": "operator", "value": ">"}], "taskSpec": {"params": [{"name": "operand1", "type": "string"}, {"name": "operand2", "type": "string"}, {"name": "operator", "type": "string"}], "results": @@ -119,7 +119,7 @@ metadata: \"w\")\nf.write(outcome)\nf.close()\n", "$(inputs.params.operand1)", "$(inputs.params.operand2)"], "command": ["sh", "-ec", "program_path=$(mktemp); printf \"%s\" \"$0\" > \"$program_path\"; python3 -u \"$program_path\" \"$1\" \"$2\""], "image": "python:alpine3.6", "name": "main"}]}}, - {"name": "condition-3", "params": [{"name": "operand1", "value": "$(tasks.print-number.results.output)"}, + {"name": "condition-3", "params": [{"name": "operand1", "value": "$(tasks.print-number.results.Output)"}, {"name": "operand2", "value": "$(params.threshold)"}, {"name": "operator", "value": "<="}], "taskSpec": {"params": [{"name": "operand1", "type": "string"}, {"name": "operand2", "type": "string"}, {"name": "operator", "type": "string"}], "results": @@ -153,7 +153,7 @@ spec: - --n - $(inputs.params.n) - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -211,7 +211,7 @@ spec: params: - name: "n" results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -234,7 +234,7 @@ spec: name: conditions-and-loops-for-loop-1 params: - name: produce-numbers-Output-loop-item - value: $(tasks.produce-numbers.results.output) + value: $(tasks.produce-numbers.results.Output) - name: threshold value: $(params.threshold) timeout: 525600m diff --git a/sdk/python/tests/compiler/testdata/conditions_with_global_params.yaml b/sdk/python/tests/compiler/testdata/conditions_with_global_params.yaml index 4dcc30d2aa0..0895d8a823f 100644 --- a/sdk/python/tests/compiler/testdata/conditions_with_global_params.yaml +++ b/sdk/python/tests/compiler/testdata/conditions_with_global_params.yaml @@ -26,8 +26,8 @@ metadata: tekton.dev/artifact_bucket: mlpipeline tekton.dev/artifact_endpoint: minio-service.kubeflow:9000 tekton.dev/artifact_endpoint_scheme: http:// - tekton.dev/artifact_items: '{"add-numbers": [["Output", "$(results.output.path)"]], - "notify-failure": [], "notify-success": [], "print-number": [["Output", "$(results.output.path)"]]}' + tekton.dev/artifact_items: '{"add-numbers": [["Output", "$(results.Output.path)"]], + "notify-failure": [], "notify-success": [], "print-number": [["Output", "$(results.Output.path)"]]}' sidecar.istio.io/inject: "false" pipelines.kubeflow.org/big_data_passing_format: $(workspaces.$TASK_NAME.path)/artifacts/$ORIG_PR_NAME/$TASKRUN_NAME/$TASK_PARAM_NAME pipelines.kubeflow.org/pipeline_spec: '{"inputs": [{"default": "5", "name": "n", @@ -66,7 +66,7 @@ spec: - --b - $(inputs.params.lower_bound) - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -117,7 +117,7 @@ spec: - name: lower_bound - name: "n" results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -134,7 +134,7 @@ spec: - name: print-number params: - name: add-numbers-Output - value: $(tasks.add-numbers.results.output) + value: $(tasks.add-numbers.results.Output) taskSpec: steps: - name: main @@ -142,7 +142,7 @@ spec: - --a - $(inputs.params.add-numbers-Output) - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -191,7 +191,7 @@ spec: params: - name: add-numbers-Output results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -280,7 +280,7 @@ spec: - name: condition-1 params: - name: operand1 - value: $(tasks.print-number.results.output) + value: $(tasks.print-number.results.Output) - name: operand2 value: $(params.threshold) - name: operator @@ -321,7 +321,7 @@ spec: - name: condition-2 params: - name: operand1 - value: $(tasks.print-number.results.output) + value: $(tasks.print-number.results.Output) - name: operand2 value: $(params.threshold) - name: operator diff --git a/sdk/python/tests/compiler/testdata/create_component_from_func.yaml b/sdk/python/tests/compiler/testdata/create_component_from_func.yaml index 156e64549f7..48e40845818 100644 --- a/sdk/python/tests/compiler/testdata/create_component_from_func.yaml +++ b/sdk/python/tests/compiler/testdata/create_component_from_func.yaml @@ -33,8 +33,8 @@ metadata: tekton.dev/artifact_endpoint: minio-service.kubeflow:9000 tekton.dev/artifact_endpoint_scheme: http:// tekton.dev/artifact_items: '{"get-subdirectory": [["Subdir", "$(workspaces.get-subdirectory.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Subdir"]], - "list-items": [["Items", "$(results.items.path)"]], "list-items-2": [["Items", - "$(results.items.path)"]], "produce-dir-with-files-python-op": [["output_dir", + "list-items": [["Items", "$(results.Items.path)"]], "list-items-2": [["Items", + "$(results.Items.path)"]], "produce-dir-with-files-python-op": [["output_dir", "$(workspaces.produce-dir-with-files-python-op.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/output_dir"]]}' sidecar.istio.io/inject: "false" pipelines.kubeflow.org/big_data_passing_format: $(workspaces.$TASK_NAME.path)/artifacts/$ORIG_PR_NAME/$TASKRUN_NAME/$TASK_PARAM_NAME @@ -184,12 +184,12 @@ spec: fi ARTIFACT_SIZE=`wc -c $(workspaces.get-subdirectory.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Subdir${SUFFIX} | awk '{print $1}'` TOTAL_SIZE=$( expr $TOTAL_SIZE + $ARTIFACT_SIZE) - touch $(results.subdir.path) + touch $(results.Subdir.path) if [[ $TOTAL_SIZE -lt 3072 ]]; then if [ -d $(workspaces.get-subdirectory.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Subdir ]; then - tar -tzf $(workspaces.get-subdirectory.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Subdir.tar.gz > $(results.subdir.path) + tar -tzf $(workspaces.get-subdirectory.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Subdir.tar.gz > $(results.Subdir.path) elif ! awk "/[^[:print:]]/{f=1} END{exit !f}" $(workspaces.get-subdirectory.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Subdir; then - cp $(workspaces.get-subdirectory.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Subdir $(results.subdir.path) + cp $(workspaces.get-subdirectory.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Subdir $(results.Subdir.path) fi fi onError: continue @@ -201,7 +201,7 @@ spec: params: - name: produce-dir-with-files-python-op-trname results: - - name: subdir + - name: Subdir type: string description: /tmp/outputs/Subdir/data - name: taskrun-name @@ -240,7 +240,7 @@ spec: #ls --almost-all --recursive "$0" > "$1" ls -A -R "$0" > "$1" - $(workspaces.list-items.path)/artifacts/$ORIG_PR_NAME/$(params.get-subdirectory-trname)/Subdir - - $(results.items.path) + - $(results.Items.path) image: alpine env: - name: ORIG_PR_NAME @@ -250,7 +250,7 @@ spec: params: - name: get-subdirectory-trname results: - - name: items + - name: Items type: string description: /tmp/outputs/Items/data metadata: @@ -289,7 +289,7 @@ spec: ls -A -R "$1" >> "$2" - $(workspaces.list-items-2.path)/artifacts/$ORIG_PR_NAME/$(params.get-subdirectory-trname)/Subdir - $(workspaces.list-items-2.path)/artifacts/$ORIG_PR_NAME/$(params.produce-dir-with-files-python-op-trname)/output_dir - - $(results.items.path) + - $(results.Items.path) image: alpine env: - name: ORIG_PR_NAME @@ -300,7 +300,7 @@ spec: - name: get-subdirectory-trname - name: produce-dir-with-files-python-op-trname results: - - name: items + - name: Items type: string description: /tmp/outputs/Items/data metadata: diff --git a/sdk/python/tests/compiler/testdata/custom_task_long_name.yaml b/sdk/python/tests/compiler/testdata/custom_task_long_name.yaml index 58e452bd530..6525ccd58a7 100644 --- a/sdk/python/tests/compiler/testdata/custom_task_long_name.yaml +++ b/sdk/python/tests/compiler/testdata/custom_task_long_name.yaml @@ -30,7 +30,7 @@ metadata: tekton.dev/artifact_endpoint: minio-service.kubeflow:9000 tekton.dev/artifact_endpoint_scheme: http:// tekton.dev/artifact_items: '{"gcs-downloadgcs-downloadgcs-downloadgcs-download": - [["Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Dat", "$(results.data-123data-123data-123data-123data-123data-123dat.path)"]], + [["Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Dat", "$(results.Data-123Data-123Data-123Data-123Data-123Data-123Dat.path)"]], "printprintprintprintprintprintprintprintprintprint": []}' sidecar.istio.io/inject: "false" pipelines.kubeflow.org/big_data_passing_format: $(workspaces.$TASK_NAME.path)/artifacts/$ORIG_PR_NAME/$TASKRUN_NAME/$TASK_PARAM_NAME @@ -56,7 +56,7 @@ spec: - | gsutil cat $0 | tee $1 - $(inputs.params.url1) - - $(results.data-123data-123data-123data-123data-123data-123dat.path) + - $(results.Data-123Data-123Data-123Data-123Data-123Data-123Dat.path) command: - sh - -c @@ -64,7 +64,7 @@ spec: params: - name: url1 results: - - name: data-123data-123data-123data-123data-123data-123dat + - name: Data-123Data-123Data-123Data-123Data-123Data-123Dat type: string description: /tmp/outputs/Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123/data metadata: @@ -82,7 +82,7 @@ spec: - name: printprintprintprintprintprintprintprintprintprint params: - name: gcs-downloadgcs-downloadgcs-downloadgcs-download-Data-_123Data-_123Data-_123Data-_123Data-_123Data-_123Dat - value: $(tasks.gcs-downloadgcs-downloadgcs-downloadgcs-download.results.data-123data-123data-123data-123data-123data-123dat) + value: $(tasks.gcs-downloadgcs-downloadgcs-downloadgcs-download.results.Data-123Data-123Data-123Data-123Data-123Data-123Dat) taskSpec: steps: - name: main @@ -105,7 +105,7 @@ spec: - name: condition-cel params: - name: outcome - value: '''$(tasks.gcs-downloadgcs-downloadgcs-downloadgcs-download.results.data-123data-123data-123data-123data-123data-123dat)'' + value: '''$(tasks.gcs-downloadgcs-downloadgcs-downloadgcs-download.results.Data-123Data-123Data-123Data-123Data-123Data-123Dat)'' == ''heads''' taskRef: name: cel_condition diff --git a/sdk/python/tests/compiler/testdata/custom_task_output.py b/sdk/python/tests/compiler/testdata/custom_task_output.py new file mode 100644 index 00000000000..aeedcbc5b1e --- /dev/null +++ b/sdk/python/tests/compiler/testdata/custom_task_output.py @@ -0,0 +1,111 @@ +# Copyright 2022 kubeflow.org +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import itertools + +from kfp import dsl, components +from kfp_tekton.tekton import TEKTON_CUSTOM_TASK_IMAGES +from kfp_tekton.compiler import TektonCompiler +import yaml + + +ARTIFACT_FETCHER_IMAGE_NAME = "fetcher/image:latest" +TEKTON_CUSTOM_TASK_IMAGES = TEKTON_CUSTOM_TASK_IMAGES.append(ARTIFACT_FETCHER_IMAGE_NAME) + +_artifact_fetcher_no = 0 + + +def artifact_fetcher(**artifact_paths: str): + '''A containerOp template resolving some artifacts, given their paths.''' + global _artifact_fetcher_no + template_yaml = { + 'name': f'artifact-fetcher-{_artifact_fetcher_no}', + 'description': 'Artifact Fetch', + 'inputs': [ + {'name': name, 'type': 'String'} + for name in artifact_paths.keys() + ], + 'outputs': [ + {'name': name, 'type': 'Artifact'} + for name in artifact_paths.keys() + ], + 'implementation': { + 'container': { + 'image': ARTIFACT_FETCHER_IMAGE_NAME, + 'command': ['sh', '-c'], # irrelevant + 'args': [ + '--apiVersion', 'fetcher.tekton.dev/v1alpha1', + '--kind', 'FETCHER', + '--name', 'artifact_fetcher', + *itertools.chain(*[ + (f'--{name}', {'inputValue': name}) + for name in artifact_paths.keys() + ]) + ] + } + } + } + _artifact_fetcher_no += 1 + template_str = yaml.dump(template_yaml, Dumper=yaml.SafeDumper) + template = components.load_component_from_text(template_str) + op = template(**{ + k.lower(): v for k, v in artifact_paths.items() + }) + op.add_pod_annotation("valid_container", "false") + return op + + +_artifact_printer_no = 0 + + +def artifact_printer(artifact): + global _artifact_printer_no + template_yaml = { + 'name': f'artifact-printer-{_artifact_printer_no}', + 'description': 'Artifact Fetch', + 'inputs': [ + {'name': 'artifact', 'type': 'Artifact'} + ], + 'outputs': [ + {'name': 'stdout', 'type': 'String'} + ], + 'implementation': { + 'container': { + 'image': 'alpine:3.6', + 'command': [ + 'echo', + {'inputValue': 'artifact'}, + '>', + {'outputPath': 'stdout'} + ] + } + } + } + _artifact_printer_no += 1 + template_str = yaml.dump(template_yaml, Dumper=yaml.SafeDumper) + template = components.load_component_from_text(template_str) + op = template(artifact) + return op + + +@dsl.pipeline("uppercase vs lowercase") +def uppercase_vs_lowercase(): + fetch_upper = artifact_fetcher(FOO='FOO') + fetch_lower = artifact_fetcher(foo='foo') + print_upper = artifact_printer(fetch_upper.output) + print_lower = artifact_printer(fetch_lower.output) + + +if __name__ == '__main__': + TektonCompiler().compile(uppercase_vs_lowercase, __file__.replace('.py', '.yaml')) diff --git a/sdk/python/tests/compiler/testdata/custom_task_output.yaml b/sdk/python/tests/compiler/testdata/custom_task_output.yaml new file mode 100644 index 00000000000..acec9bc3abc --- /dev/null +++ b/sdk/python/tests/compiler/testdata/custom_task_output.yaml @@ -0,0 +1,114 @@ +# Copyright 2021 kubeflow.org +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + name: uppercase-vs-lowercase + annotations: + tekton.dev/output_artifacts: '{"artifact-printer-0": [{"key": "artifacts/$PIPELINERUN/artifact-printer-0/stdout.tgz", + "name": "artifact-printer-0-stdout", "path": "/tmp/outputs/stdout/data"}], "artifact-printer-1": + [{"key": "artifacts/$PIPELINERUN/artifact-printer-1/stdout.tgz", "name": "artifact-printer-1-stdout", + "path": "/tmp/outputs/stdout/data"}]}' + tekton.dev/input_artifacts: '{"artifact-printer-0": [{"name": "artifact-fetcher-0-FOO", + "parent_task": "artifact-fetcher-0"}], "artifact-printer-1": [{"name": "artifact-fetcher-1-foo", + "parent_task": "artifact-fetcher-1"}]}' + tekton.dev/artifact_bucket: mlpipeline + tekton.dev/artifact_endpoint: minio-service.kubeflow:9000 + tekton.dev/artifact_endpoint_scheme: http:// + tekton.dev/artifact_items: '{"artifact-printer-0": [["stdout", "$(results.stdout.path)"]], + "artifact-printer-1": [["stdout", "$(results.stdout.path)"]]}' + sidecar.istio.io/inject: "false" + pipelines.kubeflow.org/big_data_passing_format: $(workspaces.$TASK_NAME.path)/artifacts/$ORIG_PR_NAME/$TASKRUN_NAME/$TASK_PARAM_NAME + pipelines.kubeflow.org/pipeline_spec: '{"name": "uppercase vs lowercase"}' +spec: + pipelineSpec: + tasks: + - name: artifact-fetcher-0 + params: + - name: FOO + value: FOO + taskRef: + name: artifact_fetcher + apiVersion: fetcher.tekton.dev/v1alpha1 + kind: FETCHER + timeout: 525600m + - name: artifact-fetcher-1 + params: + - name: foo + value: foo + taskRef: + name: artifact_fetcher + apiVersion: fetcher.tekton.dev/v1alpha1 + kind: FETCHER + timeout: 525600m + - name: artifact-printer-0 + params: + - name: artifact-fetcher-0-FOO + value: $(tasks.artifact-fetcher-0.results.FOO) + taskSpec: + steps: + - name: main + command: + - echo + - $(inputs.params.artifact-fetcher-0-FOO) + - '>' + - $(results.stdout.path) + image: alpine:3.6 + params: + - name: artifact-fetcher-0-FOO + results: + - name: stdout + type: string + description: /tmp/outputs/stdout/data + metadata: + labels: + pipelines.kubeflow.org/pipelinename: '' + pipelines.kubeflow.org/generation: '' + pipelines.kubeflow.org/cache_enabled: "true" + annotations: + pipelines.kubeflow.org/component_spec_digest: '{"name": "artifact-printer-0", + "outputs": [{"name": "stdout", "type": "String"}], "version": "artifact-printer-0@sha256=87fc76c64fcc79f4f4b95ee3428ade79e2a4bcdcbc03b4b9b17cef8db6c86dff"}' + tekton.dev/template: '' + timeout: 525600m + - name: artifact-printer-1 + params: + - name: artifact-fetcher-1-foo + value: $(tasks.artifact-fetcher-1.results.foo) + taskSpec: + steps: + - name: main + command: + - echo + - $(inputs.params.artifact-fetcher-1-foo) + - '>' + - $(results.stdout.path) + image: alpine:3.6 + params: + - name: artifact-fetcher-1-foo + results: + - name: stdout + type: string + description: /tmp/outputs/stdout/data + metadata: + labels: + pipelines.kubeflow.org/pipelinename: '' + pipelines.kubeflow.org/generation: '' + pipelines.kubeflow.org/cache_enabled: "true" + annotations: + pipelines.kubeflow.org/component_spec_digest: '{"name": "artifact-printer-1", + "outputs": [{"name": "stdout", "type": "String"}], "version": "artifact-printer-1@sha256=37dc967f8576ece2bc91e571dbaccd7f77043711a66b411d02aa952bd47191bf"}' + tekton.dev/template: '' + timeout: 525600m + timeout: 525600m diff --git a/sdk/python/tests/compiler/testdata/data_passing_pipeline_complete.yaml b/sdk/python/tests/compiler/testdata/data_passing_pipeline_complete.yaml index 29ec768b581..e022aaf0329 100644 --- a/sdk/python/tests/compiler/testdata/data_passing_pipeline_complete.yaml +++ b/sdk/python/tests/compiler/testdata/data_passing_pipeline_complete.yaml @@ -335,12 +335,12 @@ spec: fi ARTIFACT_SIZE=`wc -c $(workspaces.produce-string.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output${SUFFIX} | awk '{print $1}'` TOTAL_SIZE=$( expr $TOTAL_SIZE + $ARTIFACT_SIZE) - touch $(results.output.path) + touch $(results.Output.path) if [[ $TOTAL_SIZE -lt 3072 ]]; then if [ -d $(workspaces.produce-string.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output ]; then - tar -tzf $(workspaces.produce-string.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output.tar.gz > $(results.output.path) + tar -tzf $(workspaces.produce-string.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output.tar.gz > $(results.Output.path) elif ! awk "/[^[:print:]]/{f=1} END{exit !f}" $(workspaces.produce-string.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output; then - cp $(workspaces.produce-string.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output $(results.output.path) + cp $(workspaces.produce-string.path)/artifacts/$ORIG_PR_NAME/$(context.taskRun.name)/Output $(results.Output.path) fi fi onError: continue @@ -350,7 +350,7 @@ spec: fieldRef: fieldPath: metadata.labels['custom.tekton.dev/originalPipelineRun'] results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data - name: taskrun-name @@ -1377,7 +1377,7 @@ spec: - name: consume-anything-as-value-7 params: - name: produce-string-Output - value: $(tasks.produce-string.results.output) + value: $(tasks.produce-string.results.Output) taskSpec: steps: - name: main @@ -1537,7 +1537,7 @@ spec: - name: consume-string-as-value-5 params: - name: produce-string-Output - value: $(tasks.produce-string.results.output) + value: $(tasks.produce-string.results.Output) taskSpec: steps: - name: main diff --git a/sdk/python/tests/compiler/testdata/katib.yaml b/sdk/python/tests/compiler/testdata/katib.yaml index 30e562400ce..d6570b90d01 100644 --- a/sdk/python/tests/compiler/testdata/katib.yaml +++ b/sdk/python/tests/compiler/testdata/katib.yaml @@ -24,7 +24,7 @@ metadata: tekton.dev/artifact_bucket: mlpipeline tekton.dev/artifact_endpoint: minio-service.kubeflow:9000 tekton.dev/artifact_endpoint_scheme: http:// - tekton.dev/artifact_items: '{"mnist-hpo": [["bestHyperParameter", "$(results.besthyperparameter.path)"]], + tekton.dev/artifact_items: '{"mnist-hpo": [["bestHyperParameter", "$(results.bestHyperParameter.path)"]], "my-out-cop": []}' sidecar.istio.io/inject: "false" pipelines.kubeflow.org/big_data_passing_format: $(workspaces.$TASK_NAME.path)/artifacts/$ORIG_PR_NAME/$TASKRUN_NAME/$TASK_PARAM_NAME @@ -122,7 +122,7 @@ spec: ''5''}}, {''name'': ''--optimizer'', ''parameterType'': ''categorical'', ''feasibleSpace'': {''list'': [''sgd'', ''adam'', ''ftrl'']}}]' - --outputFile - - $(results.besthyperparameter.path) + - $(results.bestHyperParameter.path) - --deleteAfterDone - $(inputs.params.deleteAfterDone) - --experimentTimeoutMinutes @@ -137,7 +137,7 @@ spec: - name: namespace - name: parallelTrialCount results: - - name: besthyperparameter + - name: bestHyperParameter type: string description: /tmp/outputs/bestHyperParameter/data metadata: @@ -153,7 +153,7 @@ spec: - name: my-out-cop params: - name: mnist-hpo-bestHyperParameter - value: $(tasks.mnist-hpo.results.besthyperparameter) + value: $(tasks.mnist-hpo.results.bestHyperParameter) taskSpec: steps: - name: main diff --git a/sdk/python/tests/compiler/testdata/loop_with_params_in_json.yaml b/sdk/python/tests/compiler/testdata/loop_with_params_in_json.yaml index 04185911f30..b6315b6b49e 100644 --- a/sdk/python/tests/compiler/testdata/loop_with_params_in_json.yaml +++ b/sdk/python/tests/compiler/testdata/loop_with_params_in_json.yaml @@ -26,8 +26,8 @@ metadata: tekton.dev/artifact_endpoint: minio-service.kubeflow:9000 tekton.dev/artifact_endpoint_scheme: http:// tekton.dev/artifact_items: '{"consume": [], "consume-2": [], "consume-3": [], - "consume-4": [], "consume-5": [], "produce-message": [["Output", "$(results.output.path)"]], - "produce-message-2": [["Output", "$(results.output.path)"]]}' + "consume-4": [], "consume-5": [], "produce-message": [["Output", "$(results.Output.path)"]], + "produce-message-2": [["Output", "$(results.Output.path)"]]}' sidecar.istio.io/inject: "false" pipelines.kubeflow.org/big_data_passing_format: $(workspaces.$TASK_NAME.path)/artifacts/$ORIG_PR_NAME/$TASKRUN_NAME/$TASK_PARAM_NAME pipelines.kubeflow.org/pipeline_spec: '{"inputs": [{"name": "fname1", "type": @@ -55,7 +55,7 @@ spec: - --fname1 - $(inputs.params.fname1) - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -101,7 +101,7 @@ spec: params: - name: fname1 results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -126,7 +126,7 @@ spec: - --fname1 - $(inputs.params.fname2) - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -172,7 +172,7 @@ spec: params: - name: fname2 results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -353,8 +353,8 @@ spec: - name: parallelfor-pipeline-param-in-items-reso-for-loop-6 params: - name: loop-item-param-5 - value: '[{"first_name": "$(params.fname1)", "message": "$(tasks.produce-message.results.output)"}, - {"first_name": "$(params.fname2)", "message": "$(tasks.produce-message-2.results.output)"}]' + value: '[{"first_name": "$(params.fname1)", "message": "$(tasks.produce-message.results.Output)"}, + {"first_name": "$(params.fname2)", "message": "$(tasks.produce-message-2.results.Output)"}]' taskSpec: apiVersion: custom.tekton.dev/v1alpha1 kind: PipelineLoop diff --git a/sdk/python/tests/compiler/testdata/many_results.yaml b/sdk/python/tests/compiler/testdata/many_results.yaml index be4683e8f5c..4597790379d 100644 --- a/sdk/python/tests/compiler/testdata/many_results.yaml +++ b/sdk/python/tests/compiler/testdata/many_results.yaml @@ -30,7 +30,7 @@ metadata: tekton.dev/artifact_endpoint: minio-service.kubeflow:9000 tekton.dev/artifact_endpoint_scheme: http:// tekton.dev/artifact_items: '{"print": [], "print4results": [["param1", "/tekton/home/tep-results/param1"], - ["param2A", "$(results.param2a.path)"], ["param3_b", "/tekton/home/tep-results/param3-b"], + ["param2A", "$(results.param2A.path)"], ["param3_b", "/tekton/home/tep-results/param3-b"], ["param4c", "$(results.param4c.path)"]]}' sidecar.istio.io/inject: "false" pipelines.kubeflow.org/big_data_passing_format: $(workspaces.$TASK_NAME.path)/artifacts/$ORIG_PR_NAME/$TASKRUN_NAME/$TASK_PARAM_NAME @@ -46,7 +46,7 @@ spec: args: - '----output-paths' - $(results.param1.path) - - /tekton/home/tep-results/param2a + - /tekton/home/tep-results/param2A - $(results.param3-b.path) - /tekton/home/tep-results/param4c command: @@ -102,7 +102,7 @@ spec: args: - | mv /tekton/home/tep-results/param4c $(results.param4c.path); - mv /tekton/home/tep-results/param2a $(results.param2a.path); + mv /tekton/home/tep-results/param2A $(results.param2A.path); mv $(results.param1.path) /tekton/home/tep-results/param1; mv $(results.param3-b.path) /tekton/home/tep-results/param3-b; command: @@ -155,7 +155,7 @@ spec: - name: param1 type: string description: /tmp/outputs/param1/data - - name: param2a + - name: param2A type: string description: /tmp/outputs/param2A/data - name: param3-b diff --git a/sdk/python/tests/compiler/testdata/parallelfor_item_argument_resolving.yaml b/sdk/python/tests/compiler/testdata/parallelfor_item_argument_resolving.yaml index 76d3b93f97f..7a450d17971 100644 --- a/sdk/python/tests/compiler/testdata/parallelfor_item_argument_resolving.yaml +++ b/sdk/python/tests/compiler/testdata/parallelfor_item_argument_resolving.yaml @@ -35,9 +35,9 @@ metadata: tekton.dev/artifact_endpoint_scheme: http:// tekton.dev/artifact_items: '{"consume": [], "consume-2": [], "consume-3": [], "consume-4": [], "consume-5": [], "consume-6": [], "consume-7": [], "produce-list-of-dicts": - [["Output", "$(results.output.path)"]], "produce-list-of-ints": [["Output", - "$(results.output.path)"]], "produce-list-of-strings": [["Output", "$(results.output.path)"]], - "produce-str": [["Output", "$(results.output.path)"]]}' + [["Output", "$(results.Output.path)"]], "produce-list-of-ints": [["Output", + "$(results.Output.path)"]], "produce-list-of-strings": [["Output", "$(results.Output.path)"]], + "produce-str": [["Output", "$(results.Output.path)"]]}' sidecar.istio.io/inject: "false" pipelines.kubeflow.org/big_data_passing_format: $(workspaces.$TASK_NAME.path)/artifacts/$ORIG_PR_NAME/$TASKRUN_NAME/$TASK_PARAM_NAME pipelines.kubeflow.org/pipeline_spec: '{"name": "parallelfor-item-argument-resolving"}' @@ -50,7 +50,7 @@ spec: - name: main args: - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -93,7 +93,7 @@ spec: f.write(_output_serializers[idx](_outputs[idx])) image: python:3.7 results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -113,7 +113,7 @@ spec: - name: main args: - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -165,7 +165,7 @@ spec: f.write(_output_serializers[idx](_outputs[idx])) image: python:3.7 results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -185,7 +185,7 @@ spec: - name: main args: - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -237,7 +237,7 @@ spec: f.write(_output_serializers[idx](_outputs[idx])) image: python:3.7 results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -257,7 +257,7 @@ spec: - name: main args: - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -309,7 +309,7 @@ spec: f.write(_output_serializers[idx](_outputs[idx])) image: python:3.7 results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -329,11 +329,11 @@ spec: name: parallelfor-item-argument-resolving-for-loop-1 params: - name: produce-list-of-strings-Output - value: $(tasks.produce-list-of-strings.results.output) + value: $(tasks.produce-list-of-strings.results.Output) - name: produce-list-of-strings-Output-loop-item - value: $(tasks.produce-list-of-strings.results.output) + value: $(tasks.produce-list-of-strings.results.Output) - name: produce-str-Output - value: $(tasks.produce-str.results.output) + value: $(tasks.produce-str.results.Output) taskSpec: apiVersion: custom.tekton.dev/v1alpha1 kind: PipelineLoop @@ -481,9 +481,9 @@ spec: name: parallelfor-item-argument-resolving-for-loop-2 params: - name: produce-list-of-ints-Output - value: $(tasks.produce-list-of-ints.results.output) + value: $(tasks.produce-list-of-ints.results.Output) - name: produce-list-of-ints-Output-loop-item - value: $(tasks.produce-list-of-ints.results.output) + value: $(tasks.produce-list-of-ints.results.Output) taskSpec: apiVersion: custom.tekton.dev/v1alpha1 kind: PipelineLoop @@ -588,9 +588,9 @@ spec: name: parallelfor-item-argument-resolving-for-loop-3 params: - name: produce-list-of-dicts-Output - value: $(tasks.produce-list-of-dicts.results.output) + value: $(tasks.produce-list-of-dicts.results.Output) - name: produce-list-of-dicts-Output-loop-item - value: $(tasks.produce-list-of-dicts.results.output) + value: $(tasks.produce-list-of-dicts.results.Output) taskSpec: apiVersion: custom.tekton.dev/v1alpha1 kind: PipelineLoop diff --git a/sdk/python/tests/compiler/testdata/parallelfor_item_argument_resolving_noninlined.yaml b/sdk/python/tests/compiler/testdata/parallelfor_item_argument_resolving_noninlined.yaml index 3e10561b7a8..a3161f291a8 100644 --- a/sdk/python/tests/compiler/testdata/parallelfor_item_argument_resolving_noninlined.yaml +++ b/sdk/python/tests/compiler/testdata/parallelfor_item_argument_resolving_noninlined.yaml @@ -35,9 +35,9 @@ metadata: tekton.dev/artifact_endpoint_scheme: http:// tekton.dev/artifact_items: '{"consume": [], "consume-2": [], "consume-3": [], "consume-4": [], "consume-5": [], "consume-6": [], "consume-7": [], "produce-list-of-dicts": - [["Output", "$(results.output.path)"]], "produce-list-of-ints": [["Output", - "$(results.output.path)"]], "produce-list-of-strings": [["Output", "$(results.output.path)"]], - "produce-str": [["Output", "$(results.output.path)"]]}' + [["Output", "$(results.Output.path)"]], "produce-list-of-ints": [["Output", + "$(results.Output.path)"]], "produce-list-of-strings": [["Output", "$(results.Output.path)"]], + "produce-str": [["Output", "$(results.Output.path)"]]}' sidecar.istio.io/inject: "false" pipelines.kubeflow.org/big_data_passing_format: $(workspaces.$TASK_NAME.path)/artifacts/$ORIG_PR_NAME/$TASKRUN_NAME/$TASK_PARAM_NAME pipelines.kubeflow.org/pipeline_spec: '{"name": "parallelfor-item-argument-resolving"}' @@ -157,7 +157,7 @@ spec: - name: main args: - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -200,7 +200,7 @@ spec: f.write(_output_serializers[idx](_outputs[idx])) image: python:3.7 results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -220,7 +220,7 @@ spec: - name: main args: - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -272,7 +272,7 @@ spec: f.write(_output_serializers[idx](_outputs[idx])) image: python:3.7 results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -292,7 +292,7 @@ spec: - name: main args: - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -344,7 +344,7 @@ spec: f.write(_output_serializers[idx](_outputs[idx])) image: python:3.7 results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -364,7 +364,7 @@ spec: - name: main args: - '----output-paths' - - $(results.output.path) + - $(results.Output.path) command: - sh - -ec @@ -416,7 +416,7 @@ spec: f.write(_output_serializers[idx](_outputs[idx])) image: python:3.7 results: - - name: output + - name: Output type: string description: /tmp/outputs/Output/data metadata: @@ -440,11 +440,11 @@ spec: name: parallelfor-item-argument-resolving-for-loop-1 params: - name: produce-list-of-strings-Output - value: $(tasks.produce-list-of-strings.results.output) + value: $(tasks.produce-list-of-strings.results.Output) - name: produce-list-of-strings-Output-loop-item - value: $(tasks.produce-list-of-strings.results.output) + value: $(tasks.produce-list-of-strings.results.Output) - name: produce-str-Output - value: $(tasks.produce-str.results.output) + value: $(tasks.produce-str.results.Output) - runAfter: - produce-list-of-ints name: parallelfor-item-argument-resolving-for-loop-2 @@ -454,9 +454,9 @@ spec: name: parallelfor-item-argument-resolving-for-loop-2 params: - name: produce-list-of-ints-Output - value: $(tasks.produce-list-of-ints.results.output) + value: $(tasks.produce-list-of-ints.results.Output) - name: produce-list-of-ints-Output-loop-item - value: $(tasks.produce-list-of-ints.results.output) + value: $(tasks.produce-list-of-ints.results.Output) - runAfter: - produce-list-of-dicts name: parallelfor-item-argument-resolving-for-loop-3 @@ -466,7 +466,7 @@ spec: name: parallelfor-item-argument-resolving-for-loop-3 params: - name: produce-list-of-dicts-Output - value: $(tasks.produce-list-of-dicts.results.output) + value: $(tasks.produce-list-of-dicts.results.Output) - name: produce-list-of-dicts-Output-loop-item - value: $(tasks.produce-list-of-dicts.results.output) + value: $(tasks.produce-list-of-dicts.results.Output) timeout: 525600m