A failed first build of a root module is kept under a key the bus takes, and the real ask's test has the identity store (issue 1146)
This commit is contained in:
@@ -424,7 +424,7 @@ func askBuilds(ctx context.Context, inv *inventory.Inventory, m link.SourceMoved
|
||||
request := inventory.BuildRequest{ID: id, Repository: source.Repository, Seat: source.Seat, Path: path,
|
||||
Ref: m.Base, Commit: m.Commit, For: "merge"}
|
||||
if err != nil {
|
||||
request.ID = fmt.Sprintf("not-asked-%s-%s", short(m.Commit), strings.ReplaceAll(dir, "/", "-"))
|
||||
request.ID = notAskedID(m.Commit, dir)
|
||||
request.NotAsked = err.Error()
|
||||
recordBuildRequest(ctx, inv, request)
|
||||
fmt.Printf(" %s is a new module in %s/%s and could not be built: %v — a hand `build` of it "+
|
||||
@@ -439,6 +439,15 @@ func askBuilds(ctx context.Context, inv *inventory.Inventory, m link.SourceMoved
|
||||
return asked
|
||||
}
|
||||
|
||||
// notAskedID is the id a merge's build that could not be asked is kept under: a key the bus takes, so a module at the
|
||||
// repository's root (".") is kept as one in a folder is.
|
||||
func notAskedID(commit, dir string) string {
|
||||
if dir == "." || dir == "" {
|
||||
return "not-asked-" + short(commit)
|
||||
}
|
||||
return fmt.Sprintf("not-asked-%s-%s", short(commit), strings.ReplaceAll(strings.Trim(dir, "/"), "/", "-"))
|
||||
}
|
||||
|
||||
// actingOnMerges keeps one merge acted on at a time (novox/hq issue 266).
|
||||
var actingOnMerges sync.Mutex
|
||||
|
||||
|
||||
Reference in New Issue
Block a user