Skip to content

Commit 881afb9

Browse files
committed
Add EKS cluster only if it is in config
1 parent 9a1c668 commit 881afb9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

gen3workflow/aws_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def get_boto3_client(service_name: str, **kwargs):
4040
s3_client = get_boto3_client("s3")
4141
kms_client = get_boto3_client("kms", region_name=config["USER_BUCKETS_REGION"])
4242
sts_client = get_boto3_client("sts")
43-
eks_client = get_boto3_client("eks", region_name=config["EKS_CLUSTER_REGION"])
43+
44+
if "EKS_CLUSTER_REGION" in config:
45+
eks_client = get_boto3_client("eks", region_name=config["EKS_CLUSTER_REGION"])
4446

4547

4648
def get_safe_name_from_hostname(

gen3workflow/routes/ga4gh_tes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def get_non_allowed_images(images: set, username: str) -> set:
7676
# Update each whitelisted image to a regex with updated {username} value with an actual username
7777
# and `*` with `.*` to match any sequence of characters, storing the resulting patterns in a set
7878
whitelisted_images_regex = {
79+
# TODO: I think the ECR repos have escaped usernames
7980
image.replace("{username}", username).replace("*", ".*")
8081
for image in config["TASK_IMAGE_WHITELIST"]
8182
}

0 commit comments

Comments
 (0)