Skip to content

Commit

Permalink
fix: New sessions always falling into PULLING status under specific…
Browse files Browse the repository at this point in the history
… setup (#2556)
  • Loading branch information
kyujin-cho authored Jul 25, 2024
1 parent b177ee3 commit 859b09d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions changes/2556.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Prevent session status from being transit to `PULLING` status event if image pull is not required
8 changes: 4 additions & 4 deletions src/ai/backend/manager/models/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def _parse_row(self):
"tag": self.tag,
"architecture": self.architecture,
"registry": self.registry,
"digest": self.config_digest,
"digest": self.config_digest.strip() if self.config_digest else None,
"labels": self.labels,
"size_bytes": self.size_bytes,
"resource_limits": res_limits,
Expand Down Expand Up @@ -547,7 +547,7 @@ def populate_row(
registry=row.registry,
architecture=row.architecture,
is_local=row.is_local,
digest=row.config_digest,
digest=row.config_digest.strip() if row.config_digest else None,
labels=[KVPair(key=k, value=v) for k, v in row.labels.items()],
aliases=[alias_row.alias for alias_row in row.aliases],
size_bytes=row.size_bytes,
Expand All @@ -563,7 +563,7 @@ def populate_row(
installed=len(installed_agents) > 0,
installed_agents=installed_agents if not hide_agents else None,
# legacy
hash=row.config_digest,
hash=row.config_digest.strip() if row.config_digest else None,
)
ret.raw_labels = row.labels
return ret
Expand Down Expand Up @@ -788,7 +788,7 @@ def from_row(cls, row: ImageRow | None) -> ImageNode | None:
registry=row.registry,
architecture=row.architecture,
is_local=row.is_local,
digest=row.config_digest,
digest=row.config_digest.strip() if row.config_digest else None,
labels=[KVPair(key=k, value=v) for k, v in row.labels.items()],
size_bytes=row.size_bytes,
resource_limits=[
Expand Down

0 comments on commit 859b09d

Please sign in to comment.