From 65ad66ba96b3377a4738c1f49af52044bb9a287a Mon Sep 17 00:00:00 2001 From: Judah Rand <17158624+judahrand@users.noreply.github.com> Date: Fri, 10 Sep 2021 14:55:04 +0100 Subject: [PATCH] Move S3 and Minio artifacts to `/var/run/kfp/artifact` --- sdk/python/kfp/v2/components/types/artifact_types.py | 5 +++-- v2/component/launcher.go | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sdk/python/kfp/v2/components/types/artifact_types.py b/sdk/python/kfp/v2/components/types/artifact_types.py index d3f027f275a..6d3235bb18f 100644 --- a/sdk/python/kfp/v2/components/types/artifact_types.py +++ b/sdk/python/kfp/v2/components/types/artifact_types.py @@ -17,11 +17,12 @@ """ import os +from pathlib import Path from typing import Dict, Generic, List, Optional, Type, TypeVar, Union _GCS_LOCAL_MOUNT_PREFIX = '/gcs/' -_MINIO_LOCAL_MOUNT_PREFIX = '/minio/' -_S3_LOCAL_MOUNT_PREFIX = '/s3/' +_MINIO_LOCAL_MOUNT_PREFIX = '/var/run/kfp/artifact/minio/' +_S3_LOCAL_MOUNT_PREFIX = '/var/run/kfp/artifact/s3/' class Artifact(object): diff --git a/v2/component/launcher.go b/v2/component/launcher.go index 23fa18e9b65..79bc2b9afe8 100644 --- a/v2/component/launcher.go +++ b/v2/component/launcher.go @@ -655,10 +655,10 @@ func localPathForURI(uri string) (string, error) { return "/gcs/" + strings.TrimPrefix(uri, "gs://"), nil } if strings.HasPrefix(uri, "minio://") { - return "/minio/" + strings.TrimPrefix(uri, "minio://"), nil + return "/var/run/kfp/artifact/minio/" + strings.TrimPrefix(uri, "minio://"), nil } if strings.HasPrefix(uri, "s3://") { - return "/s3/" + strings.TrimPrefix(uri, "s3://"), nil + return "/var/run/kfp/artifact/s3/" + strings.TrimPrefix(uri, "s3://"), nil } return "", fmt.Errorf("failed to generate local path for URI %s: unsupported storage scheme", uri) }