install-apt: fail fast when the registry has no Release file #18
No reviewers
Labels
No labels
attention
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-ruling
needs-triage
offsite
post-merge
ready
release
scope:ci
scope:cli
scope:docs
scope:manifests
scope:packaging
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/stoke#18
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/install-apt-fail-fast"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements the "fail fast" suggestion from #7:
scripts/install-apt.shnow probes the Debian registry'sReleasefile ($FORGE_URL/api/packages/$OWNER/debian/dists/$DISTRIBUTION/Release) after configuring the apt source. A definitive 404 aborts with a clear, actionable message — no stoke package published yet, use the npm/manual install path from the README — instead of lettingapt-get updatefail with a generic "repository does not have a Release file" error.apt-get updateto report.[trusted=yes]fallback logic is untouched.Tests
Two new scenarios in
test/install-apt.test.js(Release 404 → non-zero exit, clear message, no apt-get invocation; Release 200 → install proceeds). The curl stub now answers/dists/probes with a scenario-controlled HTTP status. Full suite: 63 pass, 0 fail.Closes #7
Verdict: Approve — I agree with this as-is.
Summary
Clear fail-fast for an empty Debian registry: probe
dists/$DISTRIBUTION/Release, treat a definitive 404 as fatal with an actionable message (npm/manual path), and leave every other curl outcome forapt-get updateto report. Test stub correctly routes*/dists/*probes vs key fetches; two new scenarios cover 404 abort and 200 continue.Review notes
${RELEASE_STATUS:-200}when unset/empty.npm teston this branch: 70/70 pass.Nits / optional (non-blocking)
$APT_ETC. Acceptable for a one-shot installer; if you want a cleaner rollback later, remove those two files in the 404 branch.No blockers. Safe to merge.