v0.2.2 - spark-vllm-docker update checks + Apply Update

Backend:
- updates.py: get_update_status() runs git fetch + git rev-list --left-right --count HEAD...origin/main to learn ahead/behind/dirty, plus git log for pending commits
- UpdateManager class with asyncio.Lock; one update at a time
- POST /api/updates/apply triggers "git pull --ff-only && ./build-and-copy.sh -c" over SSH with streamed log + phase detection (Pulling / Building the vLLM container / Copying to peer Sparks)
- GET /api/updates returns {ok, behind, ahead, dirty, current, log[], branch}

Frontend:
- Persistent banner near footer: hidden when up-to-date, blue when N commits behind, warn (orange) when local dirty changes block update
- 'Show details' expands a list of pending commits
- 'Apply update' triggers the long-running build with phase + elapsed timer + collapsible logs
- Confirmation dialog explains the 5–40 min duration

Package: bump 0.2.2:0
This commit is contained in:
Grant
2026-05-12 11:26:55 -05:00
parent 9dde938348
commit 474417b458
6 changed files with 408 additions and 2 deletions
+21
View File
@@ -217,6 +217,27 @@ main {
word-break: break-word;
}
/* ===== Update banner ===== */
.update-banner {
background: var(--surface);
border: 1px solid rgba(96, 165, 250, 0.4);
border-radius: var(--radius);
padding: 10px 14px;
margin-top: 18px;
font-size: 13px;
}
.update-banner.up-to-date {
border-color: var(--border);
color: var(--muted);
}
.update-banner.warn { border-color: var(--warn); }
.ub-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ub-row .spacer { flex: 1; }
#ub-list { margin-top: 8px; }
#ub-list summary { cursor: pointer; padding: 4px 0; }
#ub-progress { margin-top: 10px; }
/* ===== Section header (title + action button) ===== */
.section-header {