aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2018-10-15 19:27:42 +0000
committerPascal Terjan <pterjan@mageia.org>2018-10-16 08:53:07 +0000
commit3a962ef8766b0a735b8491f40f34d31e9a6c3bb7 (patch)
tree23aefc561247884f78a6b4315f12da0e2d06566b
parentb80458f48eeab1469d48fa334e5fafa218536ff2 (diff)
downloadiurt-3a962ef8766b0a735b8491f40f34d31e9a6c3bb7.tar
iurt-3a962ef8766b0a735b8491f40f34d31e9a6c3bb7.tar.gz
iurt-3a962ef8766b0a735b8491f40f34d31e9a6c3bb7.tar.bz2
iurt-3a962ef8766b0a735b8491f40f34d31e9a6c3bb7.tar.xz
iurt-3a962ef8766b0a735b8491f40f34d31e9a6c3bb7.zip
Ignore failures when cancelling builds
This will avoid listing other architectures as failed, and giving some confusing logs.
-rw-r--r--NEWS2
-rw-r--r--lib/Iurt/Queue.pm2
-rwxr-xr-xulri30
3 files changed, 22 insertions, 12 deletions
diff --git a/NEWS b/NEWS
index 641e263..08bc45b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- ulri: ignore failures when cancelling build
+
0.7.7
- ulri: only use mandatory archs for noarch builds
- ulri: kill builds for other architectures in case of failure
diff --git a/lib/Iurt/Queue.pm b/lib/Iurt/Queue.pm
index 7cbc991..3930ca4 100644
--- a/lib/Iurt/Queue.pm
+++ b/lib/Iurt/Queue.pm
@@ -236,6 +236,8 @@ sub get_upload_tree_state {
$pkg_tree{$prefix}{media}{$media}{excluded_arch}{$arch} = 1;
} elsif ($result eq 'fail') {
$pkg_tree{$prefix}{media}{$media}{failed_arch}{$arch} = 1;
+ } elsif ($result eq 'cancelled') {
+ $pkg_tree{$prefix}{media}{$media}{cancelled_arch}{$arch} = 1;
} else {
plog('WARNING', "unknown state $arch.$result for $prefix");
}
diff --git a/ulri b/ulri
index ff1f76d..d493eaf 100755
--- a/ulri
+++ b/ulri
@@ -300,6 +300,8 @@ foreach my $prefix (keys %pkg_tree) {
# Kill it if that package had failed on a mandatory arch
if (check_if_mandatory_arch_failed($media, $ent, $config)) {
ssh($remote, "kill -14 $pid");
+ $pkg_tree{$prefix}{media}{$media}{cancelled_arch}{$arch} = 1;
+ create_file("$done_dir/${prefix}_$arch.cancelled", "$bot $host");
}
next bot;
}
@@ -407,12 +409,15 @@ foreach my $prefix (keys %pkg_tree) {
make_path($fail_dir);
- mkdir("$fail_dir/$prefix");
- if (sget($remote, "$prefix_dir/*", "$fail_dir/$prefix")) {
- plog('ERROR', "copying from $host:$prefix_dir/ " .
- "to $fail_dir/ failed ($!)");
- $pkg_tree{$prefix}{media}{$media}{arch}{$arch} = 0;
+ unless ($pkg_tree{$prefix}{media}{$media}{cancelled_arch}{$arch}) {
+ mkdir("$fail_dir/$prefix");
+ if (sget($remote, "$prefix_dir/*", "$fail_dir/$prefix")) {
+ plog('ERROR', "copying from $host:$prefix_dir/ " .
+ "to $fail_dir/ failed ($!)");
+ $pkg_tree{$prefix}{media}{$media}{arch}{$arch} = 0;
+ }
}
+
# clean the log on the compilation machine
ssh($remote, "rm -rf $prefix_dir");
@@ -421,16 +426,17 @@ foreach my $prefix (keys %pkg_tree) {
cleanup_failed_build($todo_dir, $done_dir, $fail_dir, $prefix, $ent, $media, $arch, $config);
- plog('FAIL', "build failed");
- create_file("$done_dir/${prefix}_$arch.fail", "$bot $host");
- $pkg_tree{$prefix}{media}{$media}{failed_arch}{$arch} = 1;
+ unless ($pkg_tree{$prefix}{media}{$media}{cancelled_arch}{$arch}) {
+ plog('FAIL', "build failed");
+ create_file("$done_dir/${prefix}_$arch.fail", "$bot $host");
+ $pkg_tree{$prefix}{media}{$media}{failed_arch}{$arch} = 1;
- # Notify user if build failed
- if ($user) {
- warn_about_failure($config, $user, $ent, $arch, $fail_dir, $path, $prefix);
+ # Notify user if build failed
+ if ($user) {
+ warn_about_failure($config, $user, $ent, $arch, $fail_dir, $path, $prefix);
+ }
}
-
} # end bot
} # end path
} # end prefix