mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-06 17:57:49 +02:00
update comments
This commit is contained in:
@@ -943,6 +943,11 @@ def deploy(
|
||||
|
||||
|
||||
def _normalize_image_name(value: str | None) -> str:
|
||||
"""Sanitize a deployment/directory name into a valid Docker repository name.
|
||||
|
||||
Docker repository names must be lowercase and may only contain
|
||||
[a-z0-9._-]. Invalid characters are replaced with hyphens.
|
||||
"""
|
||||
if not value:
|
||||
return "app"
|
||||
slug = re.sub(r"[^a-z0-9._-]+", "-", value.lower()).strip("-.")
|
||||
@@ -950,6 +955,10 @@ def _normalize_image_name(value: str | None) -> str:
|
||||
|
||||
|
||||
def _normalize_image_tag(value: str) -> str:
|
||||
"""Validate and return a Docker image tag.
|
||||
|
||||
Tags may only contain [A-Za-z0-9_.-]. Defaults to "latest" when empty.
|
||||
"""
|
||||
if not value:
|
||||
value = "latest"
|
||||
if not re.fullmatch(r"[A-Za-z0-9_.-]+", value):
|
||||
|
||||
Reference in New Issue
Block a user