Archived
Remove what an earlier delivery of a check left before raising its store again
An ask redelivered after the build agent stopped mid-check (the rollout it was checking updated it) found its own throwaway store under its name, and the check said it could not run (mesh-controller#105, build-1791331512096605198).
This commit is contained in:
@@ -298,6 +298,13 @@ func Check(ctx context.Context, run Runner, spec CheckSpec, workspace, registry
|
||||
say("check", "the facts of %s (%s): %d machine(s), the bus at %s, the store at %s", f.Taken.Format(time.RFC3339),
|
||||
short(strings.TrimPrefix(digest, "sha256:")), len(f.Machines), f.Versions.Bus, f.Versions.Store)
|
||||
|
||||
// **What an earlier delivery of this same ask left is removed first** (novox/hq issue 285): an ask is
|
||||
// redelivered when the holder that took it stopped mid-check — the build agent itself updated by the
|
||||
// rollout it is checking — and its containers, named by the ask's id, are still there. Raising the
|
||||
// store again under that name was refused, and the check said it could not run.
|
||||
if n, err := RemoveContainersOf(ctx, run, spec.ID); err == nil && n > 0 {
|
||||
say("check", "removed %d throwaway container(s) an earlier delivery of this check left", n)
|
||||
}
|
||||
// The throwaway store and bus, of the versions the mesh runs, removed whatever happens.
|
||||
defer func() {
|
||||
removing, done := context.WithTimeout(context.Background(), time.Minute)
|
||||
|
||||
Reference in New Issue
Block a user