Skip to content

Commit

Permalink
fix(backend): Metadata Writer - Fixed regression with artifact type r…
Browse files Browse the repository at this point in the history
…etrieval. 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
  • Loading branch information
Ark-kun authored and Bobgy committed Jul 20, 2020
1 parent 9c16eff commit 3ffd55e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/metadata_writer/src/metadata_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3ffd55e

Please sign in to comment.