From f43d1cfb1ef8f38ca90fee68b0643f45d6d5b2da Mon Sep 17 00:00:00 2001 From: Nancy Hung Date: Tue, 16 Jan 2024 17:45:43 -0800 Subject: [PATCH] fix regex (#877) --- scripts/data_prep/convert_delta_to_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/data_prep/convert_delta_to_json.py b/scripts/data_prep/convert_delta_to_json.py index 326b8e912f..9d73cb0e9f 100644 --- a/scripts/data_prep/convert_delta_to_json.py +++ b/scripts/data_prep/convert_delta_to_json.py @@ -407,7 +407,7 @@ def validate_and_get_cluster_info(cluster_id: str, stripped_runtime = re.sub( r'[a-zA-Z]', '', res.spark_version.split('-scala')[0].replace('x-snapshot', '')) - runtime_version = re.sub(r'.-+$', '', stripped_runtime) + runtime_version = re.sub(r'[.-]*$', '', stripped_runtime) if version.parse(runtime_version) < version.parse( MINIMUM_SQ_CONNECT_DBR_VERSION): raise ValueError(