mirror of
https://github.com/clearml/clearml-server
synced 2025-02-07 05:27:23 +00:00
Do not replace S3 links in data_tool export by default
This commit is contained in:
parent
9a69c21504
commit
4df5687ecd
@ -62,6 +62,8 @@ from apiserver.utilities import json
|
|||||||
from apiserver.utilities.dicts import nested_get, nested_set, nested_delete
|
from apiserver.utilities.dicts import nested_get, nested_set, nested_delete
|
||||||
from apiserver.utilities.parameter_key_escaper import ParameterKeyEscaper
|
from apiserver.utilities.parameter_key_escaper import ParameterKeyEscaper
|
||||||
|
|
||||||
|
replace_s3_scheme = os.getenv("CLEARML_REPLACE_S3_SCHEME")
|
||||||
|
|
||||||
|
|
||||||
class PrePopulate:
|
class PrePopulate:
|
||||||
module_name_prefix = "apiserver."
|
module_name_prefix = "apiserver."
|
||||||
@ -666,8 +668,9 @@ class PrePopulate:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_fixed_url(url: Optional[str]) -> Optional[str]:
|
def _get_fixed_url(url: Optional[str]) -> Optional[str]:
|
||||||
if not (url and url.lower().startswith("s3://")):
|
if not (replace_s3_scheme and url and url.lower().startswith("s3://")):
|
||||||
return url
|
return url
|
||||||
|
|
||||||
try:
|
try:
|
||||||
fixed = furl(url)
|
fixed = furl(url)
|
||||||
fixed.scheme = "https"
|
fixed.scheme = "https"
|
||||||
|
Loading…
Reference in New Issue
Block a user