diff --git a/.gitignore b/.gitignore index 1e308ac..7e81efb 100644 --- a/.gitignore +++ b/.gitignore @@ -118,3 +118,5 @@ /assetcache-b93eb7f4b04494cf3c7128a6db7ddb9b689a748b.tar.xz /openQA-f229f6d5c08963eb94886054c43d48a1d92c4d9a.tar.gz /assetcache-f229f6d5c08963eb94886054c43d48a1d92c4d9a.tar.xz +/openQA-0864455630bf2987681b56e57803a99bae73d742.tar.gz +/assetcache-0864455630bf2987681b56e57803a99bae73d742.tar.xz diff --git a/0001-Don-t-restart-scheduled-or-running-chained-parents.patch b/0001-Don-t-restart-scheduled-or-running-chained-parents.patch deleted file mode 100644 index 775db0b..0000000 --- a/0001-Don-t-restart-scheduled-or-running-chained-parents.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 29bcb6cd8bb0aeaf19372ad7a09269cc9557d8ab Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Mon, 19 Dec 2022 10:52:28 -0800 -Subject: [PATCH] Don't restart scheduled or running chained parents - -This is a follow-up to @martchus #4498. The intent of that PR, -as the commit message says, is to "Restart failed chained parents -"up the chain"". However, it actually does more than this: it -also restarts chained parents that are queued or running, because -they also do not have "OK" results. This tweaks the check a bit -so we only restart parents if they have a result which is known -to be not OK. This leaves out NONE, which is the result that -scheduled or running tests have. - -In a way we cannot know whether restarting a chained parent that -is still running is the right thing to do, but doing so definitely -causes problems in one real-world case: -https://progress.opensuse.org/projects/openqav3/activity?from=2022-12-19 -and from the examples backing the original change here, it seems -we only really intended to add the restart behaviour when the -parent test definitely failed, not when its result was not yet -decided. So on the principle of making minimal changes to the -previous behaviour, it seems reasonable to make this change, -which in fact restores the behaviour from before #4498 for -still-running parent jobs. The cases #4498 intended to address -with complex investigation jobs should still be addressed. - -This also updates the comments for `duplicate` to more accurately -reflect current behaviour, and highlight the problem that -ignoring children of a parent job can ignore not only other jobs -in the same parallel group as the child job, but other children of -the same parent that are *not* in the same parallel group as the -child job. - -Related progress issue: https://progress.opensuse.org/issues/110458 -Related progress issue: https://progress.opensuse.org/issues/112256 - -Signed-off-by: Adam Williamson ---- - lib/OpenQA/Schema/Result/Jobs.pm | 7 +++---- - t/05-scheduler-restart-and-duplicate.t | 5 +++-- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/lib/OpenQA/Schema/Result/Jobs.pm b/lib/OpenQA/Schema/Result/Jobs.pm -index 9a0675148..7e56a2749 100644 ---- a/lib/OpenQA/Schema/Result/Jobs.pm -+++ b/lib/OpenQA/Schema/Result/Jobs.pm -@@ -665,7 +665,6 @@ sub _create_clones ($self, $jobs, @clone_args) { - dependency => OpenQA::JobDependencies::Constants::PARALLEL, - }); - } -- # normally we don't clone chained parents, but you never know - _create_clone_with_parent($res, \%clones, $_, OpenQA::JobDependencies::Constants::CHAINED) - for @{$info->{chained_parents}}; - _create_clone_with_parent($res, \%clones, $_, OpenQA::JobDependencies::Constants::DIRECTLY_CHAINED) -@@ -750,7 +749,7 @@ sub cluster_jobs ($self, @args) { - unless ($skip_parents || $cancelmode) { - my $parent_result = $p->result; - $p->cluster_jobs(jobs => $jobs, skip_children => 1, cancelmode => $cancelmode) -- if !$parent_result || !OpenQA::Jobs::Constants::is_ok_result($parent_result); -+ if !$parent_result || grep { $parent_result eq $_ } NOT_OK_RESULTS; - } - next; - } -@@ -866,13 +865,13 @@ for PARALLEL dependencies: - + if child is clone, find the latest clone and clone it - - for CHAINED dependencies: --- do NOT clone parents -+- only clone failed parents, ignoring their children (our siblings, but also potentially our cousins from other child groups) - + create new dependency - duplicit cloning is prevented by ignorelist, webui will show multiple chained deps though - - clone children - + if child is clone, find the latest clone and clone it - - for DIRECTLY_CHAINED dependencies: --- clone parents recursively but ignore their children (our siblings) -+- clone parents recursively but ignore their children (our siblings, but also potentially our cousins from other child groups) - + if parent is clone, find the latest clone and clone it - - clone children - + if child is clone, find the latest clone and clone it -diff --git a/t/05-scheduler-restart-and-duplicate.t b/t/05-scheduler-restart-and-duplicate.t -index 03a8b9c40..a4296184a 100644 ---- a/t/05-scheduler-restart-and-duplicate.t -+++ b/t/05-scheduler-restart-and-duplicate.t -@@ -133,12 +133,13 @@ subtest 'restart with (directly) chained child' => sub { - ); - my $job_data_99926; - subtest 'cluster jobs for 99937 which has one chained child and one chained parent' => sub { -+ job_get_rs(99926)->update({result => FAILED}); - is_deeply job_get_rs(99937)->cluster_jobs, \%expected_cluster, -- 'chained parent considered for restarting as its result is not ok'; -+ 'chained parent considered for restarting as its result is failed'; - job_get_rs(99926)->update({result => SOFTFAILED}); - $job_data_99926 = delete $expected_cluster{99926}; - is_deeply job_get_rs(99937)->cluster_jobs, \%expected_cluster, -- 'only child considered for restarting as the parent result is ok'; -+ 'only child considered for restarting as the parent result is not failed'; - }; - - # restart the job --- -2.40.0 - diff --git a/openqa.spec b/openqa.spec index 8b3691f..adde4d3 100644 --- a/openqa.spec +++ b/openqa.spec @@ -23,9 +23,9 @@ %global github_owner os-autoinst %global github_name openQA %global github_version 4.6 -%global github_commit f229f6d5c08963eb94886054c43d48a1d92c4d9a +%global github_commit 0864455630bf2987681b56e57803a99bae73d742 # if set, will be a post-release snapshot build, otherwise a 'normal' build -%global github_date 20230424 +%global github_date 20230525 %global shortcommit %(c=%{github_commit}; echo ${c:0:7}) # can't use linebreaks here! @@ -39,7 +39,7 @@ %endif # diff from SUSE: we have 'openqa-client', they have 'openQA-client' -%define python_scripts_requires python3-requests python3-future openqa-client +%define python_scripts_requires python3-requests openqa-client # The following line is generated from dependencies.yaml (upstream) %define assetpack_requires perl(CSS::Minifier::XS) >= 0.01 perl(JavaScript::Minifier::XS) >= 0.11 perl(Mojolicious::Plugin::AssetPack) >= 1.36 @@ -79,12 +79,13 @@ %endif # diff from SUSE: perl(Devel::Cover::Report::Codecovbash) dropped because # it's not in Fedora (this means you can't run 'make coverage-codecov') -# xorg-x11-fonts dropped because that binary package doesn't exist in -# Fedora (it exists as a source package generating multiple binary -# packages) and I can't find any particular reason for it # The following line is generated from dependencies.yaml (upstream) -%define devel_requires %build_requires %qemu %test_requires curl perl(Devel::Cover) perl(Perl::Tidy) postgresql-devel rsync sudo tar -%define devel_no_selenium_requires %build_requires %qemu %test_requires curl perl(Devel::Cover) perl(Perl::Tidy) postgresql-devel rsync sudo tar +%define cover_requires perl(Devel::Cover) +# diff from SUSE: # xorg-x11-fonts dropped because that binary package +# doesn't exist in Fedora (it exists as a source package generating +# multiple binary packages) and I can't find any reason for it +# The following line is generated from dependencies.yaml (upstream) +%define devel_no_selenium_requires %build_requires %cover_requires %qemu %test_requires curl perl(Perl::Tidy) postgresql-devel rsync sudo tar # diff from SUSE: chromedriver dropped as we don't package it # that makes this look fairly silly, but we want to follow the SUSE # spec as close as we can @@ -123,13 +124,6 @@ Source4: 23-fedora-messaging.t Source5: geekotest.conf Source6: openQA-worker.conf -# Try and tweak parent restart behaviour to avoid orphaning -# cockpit jobs when a FreeIPA child fails: -# https://progress.opensuse.org/issues/112256 -# https://progress.opensuse.org/issues/110458 -# https://github.com/os-autoinst/openQA/pull/4962 -Patch0: 0001-Don-t-restart-scheduled-or-running-chained-parents.patch - BuildRequires: make BuildRequires: %{python_scripts_requires} BuildRequires: perl-generators @@ -692,6 +686,9 @@ fi %{_datadir}/openqa/lib/OpenQA/WebAPI/Plugin/FedoraUpdateRestart.pm %changelog +* Fri May 26 2023 Adam Williamson - 4.6^20230525git0864455-1 +- Update to latest git, drop merged patch, re-sync spec + * Mon Apr 24 2023 Adam Williamson - 4.6^20230424gitf229f6d-1 - Update to latest git, re-sync spec, rebase patch diff --git a/sources b/sources index 2f55824..d757906 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (openQA-f229f6d5c08963eb94886054c43d48a1d92c4d9a.tar.gz) = 781fac67b40ac27f77125bccf831506301267a830f8c2bd305d747c6e38b02ebe882c007b34aeeca059aa188eab91694fa7a8a60db4f9175f057ff95a336c147 -SHA512 (assetcache-f229f6d5c08963eb94886054c43d48a1d92c4d9a.tar.xz) = b67b24c2e163c392b4f68694f477f16d81b4113afdab3d44f3b7791f3fd22f5e35e8fd3eb3b03d6225b0dcdc821f7ce3513a79848c8cc53f49d684270c964b5e +SHA512 (openQA-0864455630bf2987681b56e57803a99bae73d742.tar.gz) = ed9fa80d8823c3a60ac54e6d3a5e669255f6f4623cb07ec640206605f9c0d2ccc0139b3c8aee10dce3e7251dbb28784f313778a4d4c5716c93274e4649fa2caa +SHA512 (assetcache-0864455630bf2987681b56e57803a99bae73d742.tar.xz) = dfdfbe8addd8485f667364496e8c74bc789d3e077153840dc79fc10654083f5e55907f21cf666e727f4d5ed9b27c327a495c7e927b4605eea448416116758aa1