Merge pull request #771 from knl/fix-unprocessed-notificationpendingsince

Fix: Set notificationpendingsince for dependent builds
This commit is contained in:
Eelco Dolstra 2020-05-28 11:15:24 +02:00 committed by GitHub
commit d5844897da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,7 +63,13 @@ sub buildFinished {
}
}
$build->update({ notificationpendingsince => undef });
# We have to iterate through all dependents as well, and if they are finished
# to mark their notificationpendingsince.
# Otherwise, the dependent builds will remain with notificationpendingsince set
# until hydra-notify is started, as buildFinished is never emitted for them.
foreach my $b ($build, @dependents) {
$b->update({ notificationpendingsince => undef }) if $b->finished;
}
}
sub stepFinished {