From 770453989d23db71fec7aa048e5ab8c4cf13af32 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Feb 13 2020 17:58:15 +0000 Subject: Bump to latest git again, tweak restart plugin --- diff --git a/.gitignore b/.gitignore index e5424a0..b56c8f5 100644 --- a/.gitignore +++ b/.gitignore @@ -82,3 +82,5 @@ /assetcache-8fcf81ff8b3d0276c41ff698a9dd6ed443a710e4.tar.xz /openQA-68ae00aa4e2b95e07daab8d718f4dd7f974f0766.tar.gz /assetcache-68ae00aa4e2b95e07daab8d718f4dd7f974f0766.tar.xz +/assetcache-4861e34893826b6da4f5bdcaecad1cb66fc4e5cc.tar.xz +/openQA-4861e34893826b6da4f5bdcaecad1cb66fc4e5cc.tar.gz diff --git a/FedoraUpdateRestart.pm b/FedoraUpdateRestart.pm index 6ac1954..f96e175 100644 --- a/FedoraUpdateRestart.pm +++ b/FedoraUpdateRestart.pm @@ -29,10 +29,10 @@ sub register { } # when a job completes, if it's an update test, it failed, and it's -# not already a clone, restart it, unless it's one of the FreeIPA -# tests (which don't work properly on restart and take forever). We -# could use the `dup_type_auto` behaviour, but that allows 3 restarts, -# which is kinda a lot. +# not already a clone, restart it. Also restart all incomplete jobs +# that aren't clones, as a hack for https://progress.opensuse.org/issues/62417 . +# We could use the `dup_type_auto` behaviour, but that allows 3 +# restarts, which is kinda a lot. sub on_job_done { my ($self, $app, $args) = @_; my ($user_id, $connection_id, $event, $event_data) = @$args; @@ -41,11 +41,13 @@ sub on_job_done { OpenQA::Utils::log_debug("Update restarter considering job $jobid"); my $job = $schema->resultset('Jobs')->find({id => $jobid}); my $clone_of = $schema->resultset("Jobs")->find({clone_id => $jobid}); - if ( + my $restart = 0; + $restart = 1 if ( $job->result eq OpenQA::Schema::Result::Jobs::FAILED && !$clone_of && - $job->FLAVOR =~ /^updates-/ && - $job->TEST !~ /^.*(domain|realmd)/ - ) { + $job->FLAVOR =~ /^updates-/ + ); + $restart = 1 if ($job->result eq OpenQA::Schema::Result::Jobs::INCOMPLETE && !$clone_of); + if ($restart) { OpenQA::Utils::log_info("Update restarter restarting job $jobid"); $job->auto_duplicate; } diff --git a/openqa.spec b/openqa.spec index 90630c9..fb724e0 100644 --- a/openqa.spec +++ b/openqa.spec @@ -23,13 +23,13 @@ %global github_owner os-autoinst %global github_name openQA %global github_version 4.6 -%global github_commit 68ae00aa4e2b95e07daab8d718f4dd7f974f0766 +%global github_commit 4861e34893826b6da4f5bdcaecad1cb66fc4e5cc # if set, will be a post-release snapshot build, otherwise a 'normal' build -%global github_date 20200101 +%global github_date 20200205 %global shortcommit %(c=%{github_commit}; echo ${c:0:7}) # can't use linebreaks here! -%global openqa_services openqa-webui.service openqa-gru.service openqa-websockets.service openqa-scheduler.service openqa-livehandler.service openqa-enqueue-audit-event-cleanup.service openqa-enqueue-audit-event-cleanup.timer openqa-enqueue-asset-and-result-cleanup.service openqa-enqueue-asset-and-result-cleanup.timer +%global openqa_services openqa-webui.service openqa-gru.service openqa-websockets.service openqa-scheduler.service openqa-enqueue-audit-event-cleanup.service openqa-enqueue-audit-event-cleanup.timer openqa-enqueue-asset-cleanup.service openqa-enqueue-asset-cleanup.timer openqa-enqueue-result-cleanup.service openqa-enqueue-result-cleanup.timer %global openqa_worker_services openqa-worker.target openqa-slirpvde.service openqa-vde_switch.service openqa-worker-cacheservice.service openqa-worker-cacheservice-minion.service %if %{undefined tmpfiles_create} @@ -44,8 +44,8 @@ # runtime requirements for the main package that are not required by other sub-packages # diff from suse: we need perl(Time::Seconds) and perl(Time::Piece) # here, do not lose them when copying from suse -%define main_requires %assetpack_requires git-core perl(Carp::Always) perl(Date::Format) perl(DateTime::Format::Pg) perl(DBD::Pg) >= 3.7.4, perl(DBI) >= 1.632, perl(DBIx::Class) >= 0.082801, perl(DBIx::Class::DeploymentHandler) perl(DBIx::Class::DynamicDefault) perl(DBIx::Class::Schema::Config) perl(DBIx::Class::Storage::Statistics) perl(DBIx::Class::OptimisticLocking) perl(File::Copy::Recursive) perl(Net::OpenID::Consumer) perl(Module::Pluggable) perl(aliased) perl(Config::Tiny) perl(Text::Diff) perl(CommonMark) perl(JSON::Validator) perl(IPC::Run) perl(Archive::Extract) perl(Time::ParseDate) perl(Sort::Versions) perl(BSD::Resource) perl(Pod::POM) perl(Mojo::Pg) perl(Mojo::RabbitMQ::Client) >= 0.2, perl(SQL::Translator) perl(YAML::XS) >= 0.67, perl(LWP::UserAgent) perl(Time::Seconds) perl(Time::Piece) -%define client_requires curl jq git-core perl(IO::Socket::SSL) >= 2.009, perl(LWP::UserAgent) perl(IPC::Run) +%define main_requires %assetpack_requires git-core perl(Carp::Always) perl(Date::Format) perl(DateTime::Format::Pg) perl(DBD::Pg) >= 3.7.4, perl(DBI) >= 1.632, perl(DBIx::Class) >= 0.082801, perl(DBIx::Class::DeploymentHandler) perl(DBIx::Class::DynamicDefault) perl(DBIx::Class::Schema::Config) perl(DBIx::Class::Storage::Statistics) perl(DBIx::Class::OptimisticLocking) perl(File::Copy::Recursive) perl(Net::OpenID::Consumer) perl(Module::Pluggable) perl(aliased) perl(Config::Tiny) perl(Text::Diff) perl(CommonMark) perl(JSON::Validator) perl(IPC::Run) perl(Archive::Extract) perl(Time::ParseDate) perl(Sort::Versions) perl(BSD::Resource) perl(Pod::POM) perl(Mojo::Pg) perl(Mojo::RabbitMQ::Client) >= 0.2, perl(SQL::Translator) perl(YAML::XS) >= 0.67, perl(LWP::UserAgent) perl(Getopt::Long::Descriptive) perl(Time::Seconds) perl(Time::Piece) +%define client_requires curl jq git-core perl(IO::Socket::SSL) >= 2.009, perl(LWP::UserAgent) perl(LWP::Protocol::https) perl(IPC::Run) %define worker_requires os-autoinst < 5, perl(Mojo::IOLoop::ReadWriteProcess) > 0.19, perl(Minion::Backend::SQLite) perl(Mojo::SQLite) openqa-client optipng %define build_requires rubygem(sass) %assetpack_requires @@ -66,7 +66,7 @@ Name: openqa Version: %{github_version} -Release: 42%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} +Release: 43%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} Summary: OS-level automated testing framework License: GPLv2+ Url: http://os-autoinst.github.io/openQA/ @@ -88,15 +88,6 @@ Source3: FedoraMessaging.pm # tests for the fedora-messaging publishing plugin Source4: 23-fedora-messaging.t -# https://github.com/os-autoinst/openQA/pull/2636 -# Fixes a broken return statement in asset download code that's -# breaking our tests -Patch0: 0001-Asset-download-fix-return-statement-broken-in-f0d70f.patch -# https://github.com/os-autoinst/openQA/pull/2667 -# Hopefully fixes a scheduling race that occasionally causes incomplete -# jobs -Patch1: 2667.patch - BuildRequires: %{python_scripts_requires} BuildRequires: perl-generators # Standard for packages that have systemd services @@ -314,6 +305,7 @@ ln -s %{_datadir}/openqa/script/openqa-clone-job %{buildroot}%{_bindir}/openqa-c ln -s %{_datadir}/openqa/script/dump_templates %{buildroot}%{_bindir}/openqa-dump-templates ln -s %{_datadir}/openqa/script/load_templates %{buildroot}%{_bindir}/openqa-load-templates ln -s %{_datadir}/openqa/script/openqa-clone-custom-git-refspec %{buildroot}%{_bindir}/openqa-clone-custom-git-refspec +ln -s %{_datadir}/openqa/script/openqa-validate-yaml %{buildroot}%{_bindir}/openqa-validate-yaml ln -s %{_datadir}/openqa/script/openqa-label-all %{buildroot}%{_bindir}/openqa-label-all @@ -342,7 +334,7 @@ chmod a+w openqa-debug.log autoinst-log.txt # we can't use 'unshare' in Fedora package build env sed -i -e 's,unshare -r -n ,,g' t/40-script_openqa-clone-custom-git-refspec.t # Skip tests not working currently, or flaky -rm t/25-cache-service.t +rm t/25-cache-service.t t/17-labels_carry_over.t # GIT_CEILING_DIRECTORIES here avoids a case where git error handling # can differ when you run the build in mock and cause 16-utils-runcmd @@ -364,6 +356,7 @@ getent passwd _openqa-worker >/dev/null || \ -c "openQA worker" _openqa-worker || : %post +%tmpfiles_create %{_tmpfilesdir}/openqa-webui.conf %systemd_post %{openqa_services} %post worker @@ -418,8 +411,11 @@ fi %{_unitdir}/openqa-websockets.service %{_unitdir}/openqa-enqueue-audit-event-cleanup.service %{_unitdir}/openqa-enqueue-audit-event-cleanup.timer -%{_unitdir}/openqa-enqueue-asset-and-result-cleanup.service -%{_unitdir}/openqa-enqueue-asset-and-result-cleanup.timer +%{_unitdir}/openqa-enqueue-asset-cleanup.service +%{_unitdir}/openqa-enqueue-asset-cleanup.timer +%{_unitdir}/openqa-enqueue-result-cleanup.service +%{_unitdir}/openqa-enqueue-result-cleanup.timer +%{_tmpfilesdir}/openqa-webui.conf # web libs %{_datadir}/openqa/templates %{_datadir}/openqa/public @@ -516,6 +512,7 @@ fi %{_datadir}/openqa/script/load_templates %{_datadir}/openqa/script/openqa-clone-job %{_datadir}/openqa/script/openqa-clone-custom-git-refspec +%{_datadir}/openqa/script/openqa-validate-yaml %{_datadir}/openqa/script/configure-web-proxy %dir %{_datadir}/openqa/lib %{_datadir}/openqa/lib/OpenQA/Client.pm @@ -524,6 +521,7 @@ fi %{_bindir}/openqa-dump-templates %{_bindir}/openqa-load-templates %{_bindir}/openqa-clone-custom-git-refspec +%{_bindir}/openqa-validate-yaml %files python-scripts %{_datadir}/openqa/script/openqa-label-all @@ -546,6 +544,13 @@ fi %{_datadir}/openqa/lib/OpenQA/WebAPI/Plugin/FedoraUpdateRestart.pm %changelog +* Wed Feb 05 2020 Adam Williamson - 4.6-43.20200205git4861e34 +- Bump to latest git again (mainly for scheduling fixes) +- Resync spec with upstream +- Tweak restart plugin: + + Restart FreeIPA jobs (we have the capacity now, and it should work) + + Restart incomplete jobs (as a hack for POO #62417) + * Wed Feb 05 2020 Adam Williamson - 4.6-42.20200101git68ae00a - Backport #2667 to fix a scheduling race causing incomplete jobs diff --git a/sources b/sources index 5d70e02..ee36950 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (openQA-68ae00aa4e2b95e07daab8d718f4dd7f974f0766.tar.gz) = a7eb1d2a47e33d4b89ea8776ae2ee12c6c0e1abdf35cb1f747db62f17176792097615e331000128dd67a85173f3942e6a370732c4a87eecb5e2f2b1a9bf32c5a -SHA512 (assetcache-68ae00aa4e2b95e07daab8d718f4dd7f974f0766.tar.xz) = 2098653009e82c184ab5679c613670e9f24f34f7db1b722a6a19e3c6747fa969af5b650ca61bf5edb7bfb7912fb477ab5de79c32c5ee2db44571dbb13cf7c802 +SHA512 (assetcache-4861e34893826b6da4f5bdcaecad1cb66fc4e5cc.tar.xz) = 0283392b972affc065df0903df648df61da4bf641dc24679a018a7a688adf304cbab449df6a01c5cda97d99e17fbcd5a0683e2436b685e6a8a109299e602ed31 +SHA512 (openQA-4861e34893826b6da4f5bdcaecad1cb66fc4e5cc.tar.gz) = c66bb5acdded6353bbf0808332ec23e59b1cb8a4b401ac33562f8566e41bbd935d86fff9c6fe3dbb4acc58fb00df3c8e03900c777246f763ae9c857067b0ef67