Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump truss version in control reqs #619

Merged
merged 14 commits into from
Aug 25, 2023
Merged
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "truss"
version = "0.6.2"
version = "0.6.5rc1"
description = "A seamless bridge from model development to model delivery"
license = "MIT"
readme = "README.md"
Expand Down
2 changes: 2 additions & 0 deletions truss/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,5 @@
TRAINING_VARIABLES_FILENAME = "variables.yaml"

HTTP_PUBLIC_BLOB_BACKEND = "http_public"

REGISTRY_BUILD_SECRET_PREFIX = "DOCKER_REGISTRY_"
2 changes: 1 addition & 1 deletion truss/contexts/image_builder/cache_warmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def download_file(
except Exception as e:
raise RuntimeError(f"Failure downloading file from GCS: {e}")
else:
secret_path = Path("/etc/secrets/hf_access_token")
secret_path = Path("/etc/secrets/hf-access-token")
secret = secret_path.read_text().strip() if secret_path.exists() else None
try:
hf_hub_download(repo_name, file_name, revision=revision_name, token=secret)
Expand Down
2 changes: 1 addition & 1 deletion truss/templates/control/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dataclasses-json==0.5.7
truss==0.4.10rc2
truss==0.6.5rc1
fastapi==0.95.0
uvicorn==0.21.1
uvloop==0.17.0
Expand Down
5 changes: 4 additions & 1 deletion truss/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from pathlib import Path
from typing import Pattern, Set

from truss.constants import REGISTRY_BUILD_SECRET_PREFIX
from truss.errors import ValidationError

SECRET_NAME_MATCH_REGEX: Pattern[str] = re.compile(r"^[-._a-zA-Z0-9]+$")
Expand All @@ -24,7 +25,9 @@ def constraint_violation_msg():
f"Secret name `{secret_name}` is longer than max allowed 253 chars."
)

if not SECRET_NAME_MATCH_REGEX.match(secret_name):
if not SECRET_NAME_MATCH_REGEX.match(secret_name) and not secret_name.startswith(
REGISTRY_BUILD_SECRET_PREFIX
):
raise ValueError(
constraint_violation_msg() + ", invalid characters found in secret name."
)
Expand Down