From 3ffd55ede27a2166f8389b34661a9c23501a3b39 Mon Sep 17 00:00:00 2001 From: Alexey Volkov Date: Fri, 17 Jul 2020 03:53:01 -0700 Subject: [PATCH] fix(backend): Metadata Writer - Fixed regression with artifact type retrieval. Fixes #3971 (#4231) * Metadata Writer - Fixed regression with artifact type retrieval The DSL compiler has changed the output name sanitization rules, so we should change them here accordingly. * Added the code link --- backend/metadata_writer/src/metadata_writer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/metadata_writer/src/metadata_writer.py b/backend/metadata_writer/src/metadata_writer.py index ee6ac71d990..f50942b0a11 100644 --- a/backend/metadata_writer/src/metadata_writer.py +++ b/backend/metadata_writer/src/metadata_writer.py @@ -80,7 +80,9 @@ def patch_pod_metadata( def output_name_to_argo(name: str) -> str: import re - return re.sub('-+', '-', re.sub('[^-0-9a-z]+', '-', name.lower())).strip('-') + # This sanitization code should be kept in sync with the code in the DSL compiler. + # See https://github.com/kubeflow/pipelines/blob/39975e3cde7ba4dcea2bca835b92d0fe40b1ae3c/sdk/python/kfp/compiler/_k8s_helper.py#L33 + return re.sub('-+', '-', re.sub('[^-_0-9A-Za-z]+', '-', name)).strip('-') def is_s3_endpoint(endpoint: str) -> bool: return re.search('^.*s3.*amazonaws.com.*$', endpoint)