Skip to content

Commit

Permalink
[backend] aggregates: remove creation of a retry event for broken repos
Browse files Browse the repository at this point in the history
If a repo is broken there should already be a retry event for it.  It
makes no sense to generate retry events of projects that use it.
  • Loading branch information
mlschroe committed Mar 20, 2023
1 parent 0d75c3f commit 8de2286
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/backend/BSSched/BuildJob/Aggregate.pm
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,7 @@ sub check {
for my $aggregate (@$aggregates) {
my $aprojid = $aggregate->{'project'};
my $proj = $remoteprojs->{$aprojid} || $projpacks->{$aprojid};
if (!$proj) {
push @broken, $aprojid;
next;
}
if ($proj->{'error'}) {
if (BSSched::RPC::is_transient_error($proj->{'error'})) {
# XXX: hmm, there's already a project retryevent on $aprojid
$gctx->{'retryevents'}->addretryevent({'type' => 'package', 'project' => $projid, 'package' => $packid});
$delayed = 1;
}
if (!$proj || $proj->{'error'}) {
push @broken, $aprojid;
next;
}
Expand Down Expand Up @@ -252,9 +243,11 @@ sub check {
if (@broken) {
my $error = 'missing repositories: '.join(', ', @broken);
print " - $packid (aggregate)\n";
if ($delayed) {
print " delayed ($error)\n";
return ('delayed', $error);
}
print " broken ($error)\n";
print " (delayed)\n" if $delayed;
return ('delayed', $error) if $delayed;
return ('broken', $error);
}
if (@blocked) {
Expand Down

0 comments on commit 8de2286

Please sign in to comment.