You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Currently, our container names may not fully comply with Google Cloud Platform's (GCP) naming restrictions. To prevent deployment issues and ensure compatibility, we need to enforce that all container names meet the following GCP constraints:
Must be lowercase
Can only include alphanumeric characters and dashes (-)
No leading or trailing dashes
Expected Behavior
All container names generated during deployment should strictly follow the GCP naming rules.
Steps to Reproduce
Deploy a container with a name that violates GCP restrictions (e.g., contains uppercase letters, underscores, or invalid characters).
Observe any errors or warnings during deployment.
Tasks
Validate container names before deployment.
Add automated checks to enforce lowercase alphanumeric and dash-only naming.
Make sure no leading or trailing dashes are allowed.
importredefget_container_name(script_path: str) ->str:
"""Generate a consistent container name for a given script"""container_name=f"preswald-app-{Path(script_path).stem}"container_name=container_name.lower()
container_name=re.sub(r"[^a-z0-9-]", "", container_name)
container_name=container_name.strip('-')
returncontainer_name
Description
Currently, our container names may not fully comply with Google Cloud Platform's (GCP) naming restrictions. To prevent deployment issues and ensure compatibility, we need to enforce that all container names meet the following GCP constraints:
-
)Expected Behavior
Steps to Reproduce
Tasks
Resources
Code Pointers
preswald/cli.py
Linkpreswald/deploy.py
LinkThe text was updated successfully, but these errors were encountered: