Skip to content

Commit

Permalink
fix docker image name for workflows with special chars
Browse files Browse the repository at this point in the history
Signed-off-by: maximsmol <[email protected]>
  • Loading branch information
maximsmol committed Jul 25, 2023
1 parent 8be9cf6 commit 1355a62
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion latch_cli/centromere/ctx.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ class _Container:
image_name: str


docker_image_name_illegal_pat = re.compile(r"[^a-z0-9]+")


class _CentromereCtx:
"""Manages state for interaction with centromere.
Expand Down Expand Up @@ -249,7 +252,8 @@ def image(self):
else:
account_id = self.account_id

wf_name = identifier_suffix_from_str(self.workflow_name)
wf_name = identifier_suffix_from_str(self.workflow_name).lower()
wf_name = docker_image_name_illegal_pat.sub("_", wf_name)

return f"{account_id}_{wf_name}"

Expand Down

0 comments on commit 1355a62

Please sign in to comment.