mesh-issues: say a delivered fix left in fixing, and flag a stale claim (hq issue 483)
mesh/merge-gate pass: builds mesh-issues → novox; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
mesh/delivery superseded: a newer head of the same pull request
mesh/merge-gate pass: builds mesh-issues → novox; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
mesh/delivery superseded: a newer head of the same pull request
The operator found 13 issues in fixing whose fix was delivered hours before: their pull requests were linked, not in fixed-by, so their delivery was never measured, and nothing said an issue left there or a worker gone.
This commit is contained in:
@@ -90,7 +90,9 @@ type workOutcome struct {
|
||||
took bool // a worker started, or the issue changed hands
|
||||
from string // the worker it was taken over from
|
||||
wasStale bool // the worker taken over from was stale
|
||||
released string // the worker whose work ended, on a move to a status that has none
|
||||
// staleClaim is a stale worker with no pull request open: a claim nobody works on (novox/hq issue 483).
|
||||
staleClaim bool
|
||||
released string // the worker whose work ended, on a move to a status that has none
|
||||
}
|
||||
|
||||
// workerFor applies a move's worker to an issue, under ADR 0283 §1 and §2: another worker not stale is refused
|
||||
@@ -121,6 +123,7 @@ func workerFor(is *Issue, to, by, takeOver string, now time.Time, staleAfter tim
|
||||
return out, nil
|
||||
}
|
||||
out.wasStale = cur.stale(now, staleAfter)
|
||||
out.staleClaim = out.wasStale && !openPullRequest(is)
|
||||
if !out.wasStale && takeOver == "" {
|
||||
return out, fmt.Errorf("%s works on issue %d (%s) since %s, last active %s. Ask them, or take it over with "+
|
||||
"take-over saying why; the reason is noted on the issue. A worker who did nothing on it for %s may be "+
|
||||
@@ -136,7 +139,10 @@ func workerFor(is *Issue, to, by, takeOver string, now time.Time, staleAfter tim
|
||||
func takeOverNote(o workOutcome, by, reason string, prev *Worker) string {
|
||||
s := fmt.Sprintf("Taken over by %s from %s, who worked on it since %s and was last active %s", by, o.from,
|
||||
prev.Since.Format(time.RFC3339), prev.Active.Format(time.RFC3339))
|
||||
if o.wasStale {
|
||||
switch {
|
||||
case o.staleClaim:
|
||||
s += " (a stale claim: nothing done on it past the bound, and no pull request open)"
|
||||
case o.wasStale:
|
||||
s += " (stale)"
|
||||
}
|
||||
if reason != "" {
|
||||
|
||||
Reference in New Issue
Block a user