Skip to content

tb delete: manifest-before-check, blocks healthy idle env, image reclaim fails on multi-repo images, jargonΒ #362

Description

@LukasWodka

Part of epic tracebloc/backend#1142 (Theme F / copy + correctness). Found by Lukas running tb delete live.

tb delete (offboarding) had several bugs β€” two that make it feel broken, plus a functional teardown bug and jargon:

  • πŸ… Manifest printed before the safety checks. renderOffboardSummary ran before the work-guard and confirm, so tb delete dumped the full "Removed from this machine …" manifest and then errored ("still online, nothing happened") β€” a destruction receipt for something that didn't occur.
  • πŸ…‘ Manifest worded as a result ("Removed", "revoked") though it's a pre-confirm preview, and several steps are best-effort (may not deliver what it claims).
  • πŸ…’ Work-guard blocked a healthy idle environment. It refused on status == online β€” but a healthy environment is always online (heartbeating) β€” and told the user to "stop its training jobs first" when there were none. So a normal environment couldn't be offboarded without --force, with a false reason.
  • πŸ…• Image reclaim removed by image ID (docker rmi <id>) β†’ failed on a multi-repo image (conflict … must be forced). And πŸ…– the raw docker/daemon error leaked to the user.
  • πŸ…“ Jargon throughout: banner, "client", "Helm release", "local cluster", "ghcr.io/tracebloc/*", "Docker/kubectl/k3d/helm".

Fix: preconditions first (fail fast before printing); guard on running experiments (num_running_experiments), not "online"; manifest β†’ preview ("This will remove:") after the guard/before confirm; image reclaim by reference (repo:tag, never -f); soften the reclaim failure (no daemon jargon); plain "secure environment" terminology.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions