Skip to content

Commit 6435664

Browse files
committed
fix bugs in download_s5cmd
1 parent afe6676 commit 6435664

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/dmaa/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@
2121
DMAA_DEFAULT_PROFILE_PARH = "~/.dmaa_default_profile"
2222

2323
MODEL_TAG_PATTERN = r'^[a-z0-9]([a-z0-9-_]{0,61}[a-z0-9])?$'
24+
25+
LOCAL_REGION = "local"
2426
# DMAA_USE_NO_PROFILE_CHOICE = "Don't set"

src/dmaa/sdk/deploy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
ENV_STACK_NAME,
1212
MODEL_DEFAULT_TAG,
1313
VERSION,
14+
LOCAL_REGION
1415
)
1516
from dmaa.models import Model
1617
from dmaa.models.utils.constants import FrameworkType, ServiceType,InstanceType
@@ -311,7 +312,7 @@ def deploy_local(
311312
f" --service_type {service_type}"
312313
f" --backend_type {engine_type}"
313314
f" --framework_type {framework_type}"
314-
f" --region 'local'"
315+
f" --region '{LOCAL_REGION}'"
315316
f" --extra_params '{extra_params}'"
316317
)
317318
logger.info(f"pipeline cmd: {pipeline_cmd}")

src/pipeline/pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import logging
88
from concurrent.futures import as_completed,ProcessPoolExecutor
99
from dmaa.models import Model
10-
from dmaa.constants import MODEL_DEFAULT_TAG
10+
from dmaa.constants import MODEL_DEFAULT_TAG,LOCAL_REGION
1111
from dmaa.models.utils.constants import FrameworkType,ServiceType,InstanceType
1212
from utils.common import str2bool
1313
from dmaa.utils.aws_service_utils import check_cn_region
@@ -217,7 +217,7 @@ def download_s5cmd():
217217
t0 = time.time()
218218
start_time = time.time()
219219
args = parse_args()
220-
if not check_cn_region(args.region):
220+
if not (check_cn_region(args.region) or args.region == LOCAL_REGION):
221221
download_s5cmd()
222222
extra_params = args.extra_params
223223
for k,v in extra_params.items():

0 commit comments

Comments
 (0)