Skip to content

Commit

Permalink
Merge pull request #61 from shinybrar/60-bug-logging-for-container-re…
Browse files Browse the repository at this point in the history
…gistry

60 bug logging for container registry
  • Loading branch information
shinybrar authored Oct 30, 2024
2 parents e7dbac2 + 1e96c68 commit 03dad64
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

```python
from skaha.models import ContainerRegistry

registry = ContainerRegistry()
```

Expand Down
7 changes: 6 additions & 1 deletion skaha/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator
from typing_extensions import Self

from skaha.utils import logs

log = logs.get_logger(__name__)

KINDS = Literal["desktop", "notebook", "carta", "headless"]
STATUS = Literal["Pending", "Running", "Terminating", "Succeeded", "Error"]
VIEW = Literal["all"]
Expand Down Expand Up @@ -161,7 +165,8 @@ def _check_secret(cls, value: str) -> str:
str: Validated value.
"""
if not value:
environ.get("SKAHA_REGISTRY_SECRET", None)
value = environ.get("SKAHA_REGISTRY_SECRET", None) # type: ignore
log.info("Using SKAHA_REGISTRY_SECRET from environment")
assert value, "secret is required"
return value

Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 03dad64

Please sign in to comment.