From 667ef0f0b95c14977159fc9e343fc9dc19b646cf Mon Sep 17 00:00:00 2001 From: drewbutlerbb4 Date: Fri, 10 Apr 2020 09:25:50 -0700 Subject: [PATCH 1/7] fix test cases --- sdk/python/kfp_tekton/compiler/compiler.py | 72 +++++++++--------- sdk/python/tests/test_kfp_samples.sh | 12 ++- sdk/python/tests/test_kfp_samples_report.txt | 4 +- sdk/python/tests/test_util.py | 78 ++++++++++++++++++++ 4 files changed, 126 insertions(+), 40 deletions(-) create mode 100644 sdk/python/tests/test_util.py diff --git a/sdk/python/kfp_tekton/compiler/compiler.py b/sdk/python/kfp_tekton/compiler/compiler.py index bdb49e886e..5e4f05a354 100644 --- a/sdk/python/kfp_tekton/compiler/compiler.py +++ b/sdk/python/kfp_tekton/compiler/compiler.py @@ -351,44 +351,48 @@ def _create_pipeline_workflow(self, args, pipeline, op_transformers=None, pipeli # Generate pipelinerun if generate-pipelinerun flag is enabled # The base templete is generated first and then insert optional parameters. - if self.generate_pipelinerun: - pipelinerun = { - 'apiVersion': tekton_api_version, - 'kind': 'PipelineRun', - 'metadata': { - 'name': pipeline_template['metadata']['name'] + '-run' - }, - 'spec': { - 'params': [{ - 'name': p['name'], - 'value': p.get('default', '') - } for p in pipeline_template['spec']['params'] - ], - 'pipelineRef': { - 'name': pipeline_template['metadata']['name'] + # Wrapped in a try catch for when this method is called directly (e.g. there is no pipeline decorator) + try: + if self.generate_pipelinerun: + pipelinerun = { + 'apiVersion': tekton_api_version, + 'kind': 'PipelineRun', + 'metadata': { + 'name': pipeline_template['metadata']['name'] + '-run' + }, + 'spec': { + 'params': [{ + 'name': p['name'], + 'value': p.get('default', '') + } for p in pipeline_template['spec']['params'] + ], + 'pipelineRef': { + 'name': pipeline_template['metadata']['name'] + } } } - } - pod_template = {} - for task in task_refs: - op = pipeline.ops.get(task['name']) - if op.affinity: - pod_template['affinity'] = convert_k8s_obj_to_json(op.affinity) - if op.tolerations: - pod_template['tolerations'] = pod_template.get('tolerations', []) + op.tolerations - if op.node_selector: - pod_template['nodeSelector'] = op.node_selector - - if pod_template: - pipelinerun['spec']['podtemplate'] = pod_template - - # add workflow level timeout to pipeline run - if pipeline_conf.timeout: - pipelinerun['spec']['timeout'] = '%ds' % pipeline_conf.timeout - - workflow = workflow + [pipelinerun] + pod_template = {} + for task in task_refs: + op = pipeline.ops.get(task['name']) + if op.affinity: + pod_template['affinity'] = convert_k8s_obj_to_json(op.affinity) + if op.tolerations: + pod_template['tolerations'] = pod_template.get('tolerations', []) + op.tolerations + if op.node_selector: + pod_template['nodeSelector'] = op.node_selector + + if pod_template: + pipelinerun['spec']['podtemplate'] = pod_template + + # add workflow level timeout to pipeline run + if pipeline_conf.timeout: + pipelinerun['spec']['timeout'] = '%ds' % pipeline_conf.timeout + + workflow = workflow + [pipelinerun] + except: + pass # Intentionally do nothing # Use regex to replace all the Argo variables to Tekton variables. For variables that are unique to Argo, # we raise an Error to alert users about the unsupported variables. Here is the list of Argo variables. diff --git a/sdk/python/tests/test_kfp_samples.sh b/sdk/python/tests/test_kfp_samples.sh index 1ecf353065..4e613c3a6a 100755 --- a/sdk/python/tests/test_kfp_samples.sh +++ b/sdk/python/tests/test_kfp_samples.sh @@ -73,11 +73,15 @@ rm -f "${COMPILER_OUTPUTS_FILE}" # compile each of the Python scripts in the KFP testdata folder for f in "${KFP_TESTDATA_DIR}"/*.py; do echo -e "\nCompiling ${f##*/}:" >> "${COMPILER_OUTPUTS_FILE}" - if dsl-compile-tekton --py "${f}" --output "${TEKTON_COMPILED_YAML_DIR}/${f##*/}.yaml" >> "${COMPILER_OUTPUTS_FILE}" 2>&1; - then - echo "SUCCESS: ${f##*/}" | tee -a "${COMPILER_OUTPUTS_FILE}" + if [ ${f##*/} == "compose.py" ] || [ ${f##*/} == "basic_no_decorator.py" ]; then + python3 -m compiler_tests ${f##*/} ${KFP_TESTDATA_DIR} | grep -E 'SUCCESS:|FAILURE:' else - echo "FAILURE: ${f##*/}" | tee -a "${COMPILER_OUTPUTS_FILE}" + if dsl-compile-tekton --py "${f}" --output "${TEKTON_COMPILED_YAML_DIR}/${f##*/}.yaml" >> "${COMPILER_OUTPUTS_FILE}" 2>&1; + then + echo "SUCCESS: ${f##*/}" | tee -a "${COMPILER_OUTPUTS_FILE}" + else + echo "FAILURE: ${f##*/}" | tee -a "${COMPILER_OUTPUTS_FILE}" + fi fi done | tee "${COMPILE_REPORT_FILE}" diff --git a/sdk/python/tests/test_kfp_samples_report.txt b/sdk/python/tests/test_kfp_samples_report.txt index 2125afd261..f9a4307289 100644 --- a/sdk/python/tests/test_kfp_samples_report.txt +++ b/sdk/python/tests/test_kfp_samples_report.txt @@ -1,9 +1,9 @@ SUCCESS: add_pod_env.py SUCCESS: artifact_location.py SUCCESS: basic.py -FAILURE: basic_no_decorator.py +SUCCESS: basic_no_decorator.py FAILURE: coin.py -FAILURE: compose.py +SUCCESS: compose.py SUCCESS: default_value.py FAILURE: input_artifact_raw_value.py FAILURE: loop_over_lightweight_output.py diff --git a/sdk/python/tests/test_util.py b/sdk/python/tests/test_util.py new file mode 100644 index 0000000000..fb0d4002ea --- /dev/null +++ b/sdk/python/tests/test_util.py @@ -0,0 +1,78 @@ +#!/bin/bash + +# Copyright 2020 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 os +import sys +import shutil +import zipfile +import yaml +import tempfile +import kfp_tekton.compiler as compiler +import filecmp + +def _get_yaml_from_zip(zip_file): + with zipfile.ZipFile(zip_file, 'r') as zip: + with open(zip.extract(zip.namelist()[0]), 'r') as yaml_file: + return list(yaml.safe_load_all(yaml_file)) + + +def test_basic_workflow_without_decorator(test_data_dir): + """Test compiling a workflow and appending pipeline params.""" + + sys.path.append(test_data_dir) + import basic_no_decorator + try: + compiled_workflow = compiler.TektonCompiler()._create_workflow( + basic_no_decorator.save_most_frequent_word, + 'Save Most Frequent', + 'Get Most Frequent Word and Save to GCS', + [ + basic_no_decorator.message_param, + basic_no_decorator.output_path_param + ]) + print("SUCCESS: basic_no_decorator.py") + except: + print("FAILURE: basic_no_decorator.py") + +def test_composing_workflow(test_data_dir): + """Test compiling a simple workflow, and a bigger one composed from the simple one.""" + + sys.path.append(test_data_dir) + import compose + tmpdir = tempfile.mkdtemp() + try: + # First make sure the simple pipeline can be compiled. + simple_package_path = os.path.join(tmpdir, 'simple.zip') + compiler.TektonCompiler().compile(compose.save_most_frequent_word, simple_package_path) + + # Then make sure the composed pipeline can be compiled and also compare with golden. + compose_package_path = os.path.join(tmpdir, 'compose.zip') + compiler.TektonCompiler().compile(compose.download_save_most_frequent_word, compose_package_path) + + print("SUCCESS: compose.py") + except: + print("FAILURE: compose.py") + + +if __name__ == '__main__': + test_name = sys.argv[1] + test_data_dir = sys.argv[2] + if test_name == 'compose.py': + test_composing_workflow(test_data_dir) + elif test_name == 'basic_no_decorator.py': + test_basic_workflow_without_decorator(test_data_dir) + else: + raise ValueError('No pipeline matches available') \ No newline at end of file From 60c381dff3fb9d8099e03a743de7b8ba243bcea6 Mon Sep 17 00:00:00 2001 From: drewbutlerbb4 Date: Fri, 10 Apr 2020 09:31:11 -0700 Subject: [PATCH 2/7] add eof newline --- sdk/python/tests/test_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/tests/test_util.py b/sdk/python/tests/test_util.py index fb0d4002ea..db60d0307c 100644 --- a/sdk/python/tests/test_util.py +++ b/sdk/python/tests/test_util.py @@ -75,4 +75,4 @@ def test_composing_workflow(test_data_dir): elif test_name == 'basic_no_decorator.py': test_basic_workflow_without_decorator(test_data_dir) else: - raise ValueError('No pipeline matches available') \ No newline at end of file + raise ValueError('No pipeline matches available') From 954ff466138635089ec87de4ceb04ea617ffbfc0 Mon Sep 17 00:00:00 2001 From: drewbutlerbb4 Date: Fri, 10 Apr 2020 09:46:47 -0700 Subject: [PATCH 3/7] fix file restructure --- sdk/python/tests/test_kfp_samples.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/tests/test_kfp_samples.sh b/sdk/python/tests/test_kfp_samples.sh index 4e613c3a6a..5c2373b221 100755 --- a/sdk/python/tests/test_kfp_samples.sh +++ b/sdk/python/tests/test_kfp_samples.sh @@ -74,7 +74,7 @@ rm -f "${COMPILER_OUTPUTS_FILE}" for f in "${KFP_TESTDATA_DIR}"/*.py; do echo -e "\nCompiling ${f##*/}:" >> "${COMPILER_OUTPUTS_FILE}" if [ ${f##*/} == "compose.py" ] || [ ${f##*/} == "basic_no_decorator.py" ]; then - python3 -m compiler_tests ${f##*/} ${KFP_TESTDATA_DIR} | grep -E 'SUCCESS:|FAILURE:' + python3 -m test_util ${f##*/} ${KFP_TESTDATA_DIR} | grep -E 'SUCCESS:|FAILURE:' else if dsl-compile-tekton --py "${f}" --output "${TEKTON_COMPILED_YAML_DIR}/${f##*/}.yaml" >> "${COMPILER_OUTPUTS_FILE}" 2>&1; then From 25bcdd02b4e7870906bfb19f1c1bbd5d67ee2e90 Mon Sep 17 00:00:00 2001 From: drewbutlerbb4 Date: Mon, 13 Apr 2020 11:39:05 -0700 Subject: [PATCH 4/7] Generalize for special cases Generalize for any nested pipeline or pipeline without a decorator as long as there is a config file with the necessary information to compile the pipelines --- sdk/python/tests/config.yaml | 13 +++ sdk/python/tests/test_kfp_samples.sh | 7 +- sdk/python/tests/test_kfp_samples_report.txt | 4 +- sdk/python/tests/test_util.py | 86 ++++++++++++-------- 4 files changed, 74 insertions(+), 36 deletions(-) create mode 100644 sdk/python/tests/config.yaml diff --git a/sdk/python/tests/config.yaml b/sdk/python/tests/config.yaml new file mode 100644 index 0000000000..4d863a9541 --- /dev/null +++ b/sdk/python/tests/config.yaml @@ -0,0 +1,13 @@ +pipeline: compose.py +type: nested +components: +- name: save_most_frequent_word +- name: download_save_most_frequent_word +--- +pipeline: basic_no_decorator.py +type: no_decorator +components: + function: save_most_frequent_word + name: 'Save Most Frequent' + description: 'Get Most Frequent Word and Save to GCS' + paramsList: ["message_param", "output_path_param"] \ No newline at end of file diff --git a/sdk/python/tests/test_kfp_samples.sh b/sdk/python/tests/test_kfp_samples.sh index 5c2373b221..7a547ae072 100755 --- a/sdk/python/tests/test_kfp_samples.sh +++ b/sdk/python/tests/test_kfp_samples.sh @@ -33,6 +33,7 @@ KFP_TESTDATA_DIR="${KFP_CLONE_DIR}/sdk/python/tests/compiler/testdata" TEKTON_COMPILED_YAML_DIR="${TEMP_DIR}/tekton_compiler_output" COMPILE_REPORT_FILE="${PROJECT_DIR}/sdk/python/tests/test_kfp_samples_report.txt" COMPILER_OUTPUTS_FILE="${TEMP_DIR}/test_kfp_samples_output.txt" +CONFIG_FILE="${PROJECT_DIR}/sdk/python/tests/config.yaml" mkdir -p "${TEMP_DIR}" mkdir -p "${TEKTON_COMPILED_YAML_DIR}" @@ -73,8 +74,10 @@ rm -f "${COMPILER_OUTPUTS_FILE}" # compile each of the Python scripts in the KFP testdata folder for f in "${KFP_TESTDATA_DIR}"/*.py; do echo -e "\nCompiling ${f##*/}:" >> "${COMPILER_OUTPUTS_FILE}" - if [ ${f##*/} == "compose.py" ] || [ ${f##*/} == "basic_no_decorator.py" ]; then - python3 -m test_util ${f##*/} ${KFP_TESTDATA_DIR} | grep -E 'SUCCESS:|FAILURE:' + if [ ${f##*/} == "compose.py" ]; then + python3 -m test_util ${f} ${CONFIG_FILE} | grep -E 'SUCCESS:|FAILURE:' + elif [ ${f##*/} == "basic_no_decorator.py" ]; then + python3 -m test_util ${f} ${CONFIG_FILE} | grep -E 'SUCCESS:|FAILURE:' else if dsl-compile-tekton --py "${f}" --output "${TEKTON_COMPILED_YAML_DIR}/${f##*/}.yaml" >> "${COMPILER_OUTPUTS_FILE}" 2>&1; then diff --git a/sdk/python/tests/test_kfp_samples_report.txt b/sdk/python/tests/test_kfp_samples_report.txt index f9a4307289..8d9a631083 100644 --- a/sdk/python/tests/test_kfp_samples_report.txt +++ b/sdk/python/tests/test_kfp_samples_report.txt @@ -1,9 +1,9 @@ SUCCESS: add_pod_env.py SUCCESS: artifact_location.py SUCCESS: basic.py -SUCCESS: basic_no_decorator.py +SUCCESS: basic_no_decorator.py FAILURE: coin.py -SUCCESS: compose.py +SUCCESS: compose.py SUCCESS: default_value.py FAILURE: input_artifact_raw_value.py FAILURE: loop_over_lightweight_output.py diff --git a/sdk/python/tests/test_util.py b/sdk/python/tests/test_util.py index db60d0307c..5d28235dbd 100644 --- a/sdk/python/tests/test_util.py +++ b/sdk/python/tests/test_util.py @@ -20,6 +20,7 @@ import zipfile import yaml import tempfile +import importlib import kfp_tekton.compiler as compiler import filecmp @@ -28,51 +29,72 @@ def _get_yaml_from_zip(zip_file): with open(zip.extract(zip.namelist()[0]), 'r') as yaml_file: return list(yaml.safe_load_all(yaml_file)) +def get_config(config_path): + with open(config_path) as file: + return list(yaml.safe_load_all(file)) -def test_basic_workflow_without_decorator(test_data_dir): +def get_params_from_config(pipeline_name, config_path): + pipelines = get_config(config_path) + + for pipeline in pipelines: + if pipeline_name == pipeline["pipeline"]: + return pipeline + +def test_workflow_without_decorator(pipeline_mod, params_dict): """Test compiling a workflow and appending pipeline params.""" - sys.path.append(test_data_dir) - import basic_no_decorator try: + pipeline_params = [] + for param in params_dict.get('paramsList', []): + pipeline_params.append(getattr(pipeline_mod, param)) + compiled_workflow = compiler.TektonCompiler()._create_workflow( - basic_no_decorator.save_most_frequent_word, - 'Save Most Frequent', - 'Get Most Frequent Word and Save to GCS', - [ - basic_no_decorator.message_param, - basic_no_decorator.output_path_param - ]) - print("SUCCESS: basic_no_decorator.py") - except: - print("FAILURE: basic_no_decorator.py") + getattr(pipeline_mod,params_dict['function']), + params_dict.get('name', None), + params_dict.get('description', None), + pipeline_params if pipeline_params else None, + params_dict.get('conf', None)) + return True + except : + return False -def test_composing_workflow(test_data_dir): +def test_nested_workflow(pipeline_mod, pipeline_list): """Test compiling a simple workflow, and a bigger one composed from the simple one.""" - sys.path.append(test_data_dir) - import compose tmpdir = tempfile.mkdtemp() try: - # First make sure the simple pipeline can be compiled. - simple_package_path = os.path.join(tmpdir, 'simple.zip') - compiler.TektonCompiler().compile(compose.save_most_frequent_word, simple_package_path) - - # Then make sure the composed pipeline can be compiled and also compare with golden. - compose_package_path = os.path.join(tmpdir, 'compose.zip') - compiler.TektonCompiler().compile(compose.download_save_most_frequent_word, compose_package_path) - - print("SUCCESS: compose.py") + for pipeline in pipeline_list: + pipeline_name = pipeline['name'] + package_path = os.path.join(tmpdir, pipeline_name + '.zip') + compiler.TektonCompiler().compile(getattr(pipeline_mod, pipeline_name), package_path) + return True except: - print("FAILURE: compose.py") + return False if __name__ == '__main__': - test_name = sys.argv[1] - test_data_dir = sys.argv[2] - if test_name == 'compose.py': - test_composing_workflow(test_data_dir) - elif test_name == 'basic_no_decorator.py': - test_basic_workflow_without_decorator(test_data_dir) + test_data_path = sys.argv[1] + config_path = sys.argv[2] + did_compile = False + + # Import pipeline + test_data_dir, test_data_file = os.path.split(test_data_path) + import_name, test_data_ext = os.path.splitext(test_data_file) + sys.path.append(test_data_dir) + pipeline_mod = importlib.import_module(import_name) + + # Get the pipeline specific parameters from the config file + params = get_params_from_config(test_data_file, config_path) + test_type = params['type'] + + if test_type == 'nested': + did_compile = test_nested_workflow(pipeline_mod, params['components']) + elif test_type == 'no_decorator': + did_compile = test_workflow_without_decorator(pipeline_mod, params['components']) else: raise ValueError('No pipeline matches available') + + if did_compile: + print("SUCCESS: ", test_data_file) + else: + print("FAILURE: ", test_data_file) From 4dd0f44b6dd81d59ebaf83b3d30205d2b289450c Mon Sep 17 00:00:00 2001 From: drewbutlerbb4 Date: Mon, 13 Apr 2020 12:17:59 -0700 Subject: [PATCH 5/7] Add more clear error throwing also fix test_kfp_samples_report.txt --- sdk/python/tests/test_kfp_samples_report.txt | 4 ++-- sdk/python/tests/test_util.py | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sdk/python/tests/test_kfp_samples_report.txt b/sdk/python/tests/test_kfp_samples_report.txt index 8d9a631083..f9a4307289 100644 --- a/sdk/python/tests/test_kfp_samples_report.txt +++ b/sdk/python/tests/test_kfp_samples_report.txt @@ -1,9 +1,9 @@ SUCCESS: add_pod_env.py SUCCESS: artifact_location.py SUCCESS: basic.py -SUCCESS: basic_no_decorator.py +SUCCESS: basic_no_decorator.py FAILURE: coin.py -SUCCESS: compose.py +SUCCESS: compose.py SUCCESS: default_value.py FAILURE: input_artifact_raw_value.py FAILURE: loop_over_lightweight_output.py diff --git a/sdk/python/tests/test_util.py b/sdk/python/tests/test_util.py index 5d28235dbd..8212c59820 100644 --- a/sdk/python/tests/test_util.py +++ b/sdk/python/tests/test_util.py @@ -85,6 +85,8 @@ def test_nested_workflow(pipeline_mod, pipeline_list): # Get the pipeline specific parameters from the config file params = get_params_from_config(test_data_file, config_path) + if params == None: + raise ValueError('No pipeline matches available in the config file') test_type = params['type'] if test_type == 'nested': @@ -92,9 +94,9 @@ def test_nested_workflow(pipeline_mod, pipeline_list): elif test_type == 'no_decorator': did_compile = test_workflow_without_decorator(pipeline_mod, params['components']) else: - raise ValueError('No pipeline matches available') + raise ValueError('Pipeline type \''+test_type+'\' is not recognized') if did_compile: - print("SUCCESS: ", test_data_file) + print("SUCCESS:", test_data_file) else: - print("FAILURE: ", test_data_file) + print("FAILURE:", test_data_file) From 5cf4dbb81a5aec5655e09bbd35aeece00bd82942 Mon Sep 17 00:00:00 2001 From: drewbutlerbb4 Date: Mon, 13 Apr 2020 13:17:17 -0700 Subject: [PATCH 6/7] Check for special pipelines from config file --- sdk/python/tests/test_kfp_samples.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sdk/python/tests/test_kfp_samples.sh b/sdk/python/tests/test_kfp_samples.sh index 7a547ae072..272464b0c6 100755 --- a/sdk/python/tests/test_kfp_samples.sh +++ b/sdk/python/tests/test_kfp_samples.sh @@ -71,20 +71,22 @@ cp "${COMPILE_REPORT_FILE}" "${COMPILE_REPORT_FILE_OLD}" # delete the previous compiler output file rm -f "${COMPILER_OUTPUTS_FILE}" +# check which pipelines have special configurations +PIPELINES=$(awk '/pipeline:/{print $NF}' ${CONFIG_FILE}) + # compile each of the Python scripts in the KFP testdata folder for f in "${KFP_TESTDATA_DIR}"/*.py; do echo -e "\nCompiling ${f##*/}:" >> "${COMPILER_OUTPUTS_FILE}" - if [ ${f##*/} == "compose.py" ]; then - python3 -m test_util ${f} ${CONFIG_FILE} | grep -E 'SUCCESS:|FAILURE:' - elif [ ${f##*/} == "basic_no_decorator.py" ]; then - python3 -m test_util ${f} ${CONFIG_FILE} | grep -E 'SUCCESS:|FAILURE:' - else + IS_SPECIAL=$(grep -E ${f##*/} <<< ${PIPELINES}) + if [ -z "${IS_SPECIAL}" ]; then if dsl-compile-tekton --py "${f}" --output "${TEKTON_COMPILED_YAML_DIR}/${f##*/}.yaml" >> "${COMPILER_OUTPUTS_FILE}" 2>&1; then echo "SUCCESS: ${f##*/}" | tee -a "${COMPILER_OUTPUTS_FILE}" else echo "FAILURE: ${f##*/}" | tee -a "${COMPILER_OUTPUTS_FILE}" fi + else + python3 -m test_util ${f} ${CONFIG_FILE} | grep -E 'SUCCESS:|FAILURE:' fi done | tee "${COMPILE_REPORT_FILE}" From 55a54cf9bea9f2fcd76acbf52ec1a205a11fce91 Mon Sep 17 00:00:00 2001 From: Andrew Butler Date: Tue, 14 Apr 2020 08:44:33 -0700 Subject: [PATCH 7/7] Add comment --- sdk/python/kfp_tekton/compiler/compiler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/python/kfp_tekton/compiler/compiler.py b/sdk/python/kfp_tekton/compiler/compiler.py index 2f9a9a1102..b664cd7413 100644 --- a/sdk/python/kfp_tekton/compiler/compiler.py +++ b/sdk/python/kfp_tekton/compiler/compiler.py @@ -437,7 +437,9 @@ def _create_pipeline_workflow(self, args, pipeline, op_transformers=None, pipeli workflow = workflow + [pipelinerun] except: - pass # Intentionally do nothing + # Intentionally do nothing for when _create_pipeline_workflow is called directly (e.g. in the case of there + # being no pipeline decorator) and self.generate_pipeline is not set + pass # Use regex to replace all the Argo variables to Tekton variables. For variables that are unique to Argo, # we raise an Error to alert users about the unsupported variables. Here is the list of Argo variables.