From ba971add386af1202931083fe414feb33091b8ca Mon Sep 17 00:00:00 2001 From: Romil Bhardwaj Date: Mon, 25 Mar 2024 12:04:21 -0700 Subject: [PATCH] comments --- sky/data/data_utils.py | 2 +- tests/test_smoke.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sky/data/data_utils.py b/sky/data/data_utils.py index 26894bba22d..21717ec739a 100644 --- a/sky/data/data_utils.py +++ b/sky/data/data_utils.py @@ -90,7 +90,7 @@ def split_cos_path(s3_path: str) -> Tuple[str, str, str]: return bucket_name, data_path, region -def create_s3_client(region: Optional[str] = 'us-east-1') -> Client: +def create_s3_client(region: Optional[str] = None) -> Client: """Helper method that connects to Boto3 client for S3 Bucket Args: diff --git a/tests/test_smoke.py b/tests/test_smoke.py index e2369ee4e00..c7aa9c2f172 100644 --- a/tests/test_smoke.py +++ b/tests/test_smoke.py @@ -3783,14 +3783,13 @@ def cli_region_cmd(store_type, bucket_name): if store_type == storage_lib.StoreType.S3: return ('aws s3api get-bucket-location ' f'--bucket {bucket_name} --output text') - if store_type == storage_lib.StoreType.GCS: + elif store_type == storage_lib.StoreType.GCS: return (f'gsutil ls -L -b gs://{bucket_name}/ | ' 'grep "Location constraint" | ' 'awk \'{print tolower($NF)}\'') - if store_type == storage_lib.StoreType.R2: - raise NotImplementedError - if store_type == storage_lib.StoreType.IBM: - raise NotImplementedError + else: + raise NotImplementedError(f'Region command not implemented for ' + f'{store_type}') @staticmethod def cli_count_name_in_bucket(store_type, bucket_name, file_name, suffix=''):