Say a registry came back only when the call worked, and retry from toRetry's set (issue 457 review)
The streaming blob PUT is left unwaited, with why, since its body cannot be read twice and the POST before it already waited.
This commit is contained in:
@@ -289,21 +289,23 @@ func retryPlan(ctx context.Context, open *stores, id string) (string, error) {
|
||||
}
|
||||
}
|
||||
// Settled from the build records before anything is judged (novox/hq issue 457): a build of the tier
|
||||
// that failed after the plan did is as failed as the one that failed it.
|
||||
// that failed after the plan did is as failed as the one that failed it. What toRetry says is the
|
||||
// failed set every step below works from.
|
||||
var failed []string
|
||||
if p.Tier < len(p.Tiers) {
|
||||
recorded, byID, err := recordsOfAsked(ctx, inv, &p, p.Tiers[p.Tier])
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
toRetry(&p, recorded, byID)
|
||||
failed = toRetry(&p, recorded, byID)
|
||||
}
|
||||
if err := retryRefusal(p, plans); err != nil {
|
||||
return "", err
|
||||
}
|
||||
if again := unjudgedAtGate(p); len(failedIn(p)) == 0 && len(again) > 0 {
|
||||
if again := unjudgedAtGate(p); len(failed) == 0 && len(again) > 0 {
|
||||
return retryTierWhole(ctx, open, &p, again)
|
||||
}
|
||||
if len(failedIn(p)) == 0 {
|
||||
if len(failed) == 0 {
|
||||
return retryRollouts(ctx, open, &p)
|
||||
}
|
||||
entries, err := inv.Catalogued(ctx)
|
||||
@@ -314,7 +316,6 @@ func retryPlan(ctx context.Context, open *stores, id string) (string, error) {
|
||||
for _, e := range entries {
|
||||
byName[e.Manifest.Module] = e
|
||||
}
|
||||
failed := failedIn(p)
|
||||
var asked []string
|
||||
for _, m := range failed {
|
||||
askModule(ctx, &p, m, byName)
|
||||
|
||||
Reference in New Issue
Block a user