Builder: a released build counts as reserved for the build step (A-456a)

Builds: design 47 G A-456a, A-456
This commit is contained in:
2026-11-17 21:22:09 +01:00
parent ab8a8ddfc4
commit 43ec4017be
8 changed files with 77 additions and 8 deletions
@@ -244,6 +244,7 @@ func run(ctx context.Context, getenv func(string) string, logOut io.Writer) erro
Acted: awaitedReserved{awaitedVersions{b: actedKV, bucket: own.acted}}, Entry: entryVia(calls.Call), Send: sendVia(calls.Call),
Unreleased: reserved.unreleasedWords, Max: republishMax, Logf: logger.Printf,
Holders: holders} // a registry seat's holder from the seat-holders view, from the start (design 47 G A-416, A-416a)
reserved.r.Releases = awaitedReserved{awaitedVersions{b: actedKV, bucket: own.acted}} // the record of the releases it saw (design 47 G A-456a)
acts.Republish = republish.Republish
reserved.publishAtEnd = republish.Ended
// builder_reserve_done: a done trunk build that reserved none is given a version, and its publish queued as publish again does.
@@ -360,3 +360,8 @@ func reserveDoneAct(reserve func(ctx context.Context, module, fp string) (versio
return fmt.Sprintf("reserved %s for %s at %s and queued %d versions to publish: %s; builder_publish_queue shows them", res.Version, module, fp, len(queued), strings.Join(queued, ", ")), nil
}
}
// ReleasedFor says whether a version was released for the build of fingerprint (design 47 G A-456a).
func (rv *reservations) ReleasedFor(ctx context.Context, module, fingerprint string) (bool, error) {
return rv.r.ReleasedFor(ctx, module, fingerprint)
}