Skip to content

Commit

Permalink
OBS: Fix status detection even more
Browse files Browse the repository at this point in the history
Require build state = published before considering such a build as being
finished. States with other states (scheduling) and stale statuses do
happen. We need to filter those out.
  • Loading branch information
patrickbkr committed Nov 1, 2022
1 parent 1ab6149 commit 5f64fa2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/OBS.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ method process-worklist() is serial-dedup {

my $test-name = $build.arch ~ "-" ~ $build.repository;

my $status = $build.state eq "building" ?? DB::IN_PROGRESS !!
$build.status.values.grep( * eq "failed") ?? DB::FAILURE !!
$build.status.values.grep( * eq "building") ?? DB::IN_PROGRESS !!
([&&] $build.status.values.map( * eq "succeeded")) ?? DB::SUCCESS !!
DB::UNKNOWN;
my $status = $build.state eq "building" ?? DB::IN_PROGRESS !!
$build.status.values.grep( * eq "building") ?? DB::IN_PROGRESS !!
$build.state eq "published" && $build.status.values.grep( * eq "failed") ?? DB::FAILURE !!
$build.state eq "published" && ([&&] $build.status.values.map( * eq "succeeded")) ?? DB::SUCCESS !!
DB::UNKNOWN;

my $test-is-new = False;
my $test =
Expand Down

0 comments on commit 5f64fa2

Please sign in to comment.