diff --git a/.gitignore b/.gitignore index 12a5ff8..1e308ac 100644 --- a/.gitignore +++ b/.gitignore @@ -116,3 +116,5 @@ /assetcache-8ea2059dfcd6f84740bfb4e61ee8209535bad135.tar.xz /openQA-b93eb7f4b04494cf3c7128a6db7ddb9b689a748b.tar.gz /assetcache-b93eb7f4b04494cf3c7128a6db7ddb9b689a748b.tar.xz +/openQA-f229f6d5c08963eb94886054c43d48a1d92c4d9a.tar.gz +/assetcache-f229f6d5c08963eb94886054c43d48a1d92c4d9a.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 index 69f6f3f..775db0b 100644 --- a/0001-Don-t-restart-scheduled-or-running-chained-parents.patch +++ b/0001-Don-t-restart-scheduled-or-running-chained-parents.patch @@ -1,4 +1,4 @@ -From 60cc55aa03583988751144a9f47024a110b4a9bb Mon Sep 17 00:00:00 2001 +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 @@ -37,15 +37,23 @@ Related progress issue: https://progress.opensuse.org/issues/112256 Signed-off-by: Adam Williamson --- - lib/OpenQA/Schema/Result/Jobs.pm | 6 +++--- + lib/OpenQA/Schema/Result/Jobs.pm | 7 +++---- t/05-scheduler-restart-and-duplicate.t | 5 +++-- - 2 files changed, 6 insertions(+), 5 deletions(-) + 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/OpenQA/Schema/Result/Jobs.pm b/lib/OpenQA/Schema/Result/Jobs.pm -index b49a60661..0084777ea 100644 +index 9a0675148..7e56a2749 100644 --- a/lib/OpenQA/Schema/Result/Jobs.pm +++ b/lib/OpenQA/Schema/Result/Jobs.pm -@@ -745,7 +744,7 @@ sub cluster_jobs ($self, @args) { +@@ -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) @@ -54,7 +62,7 @@ index b49a60661..0084777ea 100644 } next; } -@@ -861,13 +860,13 @@ for PARALLEL dependencies: +@@ -866,13 +865,13 @@ for PARALLEL dependencies: + if child is clone, find the latest clone and clone it for CHAINED dependencies: @@ -91,5 +99,5 @@ index 03a8b9c40..a4296184a 100644 # restart the job -- -2.39.0 +2.40.0 diff --git a/openqa.spec b/openqa.spec index 18c8b72..8b3691f 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 b93eb7f4b04494cf3c7128a6db7ddb9b689a748b +%global github_commit f229f6d5c08963eb94886054c43d48a1d92c4d9a # if set, will be a post-release snapshot build, otherwise a 'normal' build -%global github_date 20221123 +%global github_date 20230424 %global shortcommit %(c=%{github_commit}; echo ${c:0:7}) # can't use linebreaks here! @@ -45,17 +45,20 @@ %define assetpack_requires perl(CSS::Minifier::XS) >= 0.01 perl(JavaScript::Minifier::XS) >= 0.11 perl(Mojolicious::Plugin::AssetPack) >= 1.36 # Diff from SUSE: we use 'perl-interpreter' where they use 'perl', # our 'perl' is a metapackage and we don't want all of it +# we use 'chrony' where they use 'ntp-daemon' # The following line is generated from dependencies.yaml (upstream) -%define common_requires perl-interpreter >= 5.20.0 perl(Archive::Extract) > 0.7 perl(Carp::Always) >= 0.14.02 perl(Config::IniFiles) perl(Config::Tiny) perl(Cpanel::JSON::XS) >= 4.09 perl(Cwd) perl(Data::Dump) perl(Data::Dumper) perl(Digest::MD5) perl(Filesys::Df) perl(Getopt::Long) perl(Minion) >= 10.25 perl(Mojolicious) >= 9.20 perl(Regexp::Common) perl(Storable) perl(Time::Moment) perl(Try::Tiny) +%define common_requires chrony perl-interpreter >= 5.20.0 perl(Carp::Always) >= 0.14.02 perl(Config::IniFiles) perl(Config::Tiny) perl(Cpanel::JSON::XS) >= 4.09 perl(Cwd) perl(Data::Dump) perl(Data::Dumper) perl(Digest::MD5) perl(Filesys::Df) perl(Getopt::Long) perl(Minion) >= 10.25 perl(Mojolicious) >= 9.30 perl(Regexp::Common) perl(Storable) perl(Time::Moment) perl(Try::Tiny) +# Diff from SUSE: we package bsdcat and bsdtar separately # runtime requirements for the main package that are not required by other sub-packages # The following line is generated from dependencies.yaml (upstream) -%define main_requires %assetpack_requires git-core hostname perl(BSD::Resource) perl(Carp) perl(CommonMark) perl(Config::Tiny) 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::OptimisticLocking) perl(DBIx::Class::ResultClass::HashRefInflator) perl(DBIx::Class::Schema::Config) perl(DBIx::Class::Storage::Statistics) perl(Date::Format) perl(DateTime) perl(DateTime::Duration) perl(DateTime::Format::Pg) perl(Exporter) perl(Fcntl) perl(File::Basename) perl(File::Copy) perl(File::Copy::Recursive) perl(File::Path) perl(File::Spec) perl(FindBin) perl(Getopt::Long::Descriptive) perl(IO::Handle) perl(IPC::Run) perl(JSON::Validator) perl(LWP::UserAgent) perl(Module::Load::Conditional) perl(Module::Pluggable) perl(Mojo::Base) perl(Mojo::ByteStream) perl(Mojo::IOLoop) perl(Mojo::JSON) perl(Mojo::Pg) perl(Mojo::RabbitMQ::Client) >= 0.2 perl(Mojo::URL) perl(Mojo::Util) perl(Mojolicious::Commands) perl(Mojolicious::Plugin) perl(Mojolicious::Static) perl(Net::OpenID::Consumer) perl(POSIX) perl(Pod::POM) perl(SQL::Translator) perl(Scalar::Util) perl(Sort::Versions) perl(Text::Diff) perl(Time::HiRes) perl(Time::ParseDate) perl(Time::Piece) perl(Time::Seconds) perl(URI::Escape) perl(YAML::PP) >= 0.026 perl(YAML::XS) perl(aliased) perl(base) perl(constant) perl(diagnostics) perl(strict) perl(warnings) +%define main_requires %assetpack_requires bsdcat bsdtar git-core hostname perl(BSD::Resource) perl(Carp) perl(CommonMark) perl(Config::Tiny) 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::OptimisticLocking) perl(DBIx::Class::ResultClass::HashRefInflator) perl(DBIx::Class::Schema::Config) perl(DBIx::Class::Storage::Statistics) perl(Date::Format) perl(DateTime) perl(DateTime::Duration) perl(DateTime::Format::Pg) perl(Exporter) perl(Fcntl) perl(File::Basename) perl(File::Copy) perl(File::Copy::Recursive) perl(File::Path) perl(File::Spec) perl(FindBin) perl(Getopt::Long::Descriptive) perl(IO::Handle) perl(IPC::Run) perl(JSON::Validator) perl(LWP::UserAgent) perl(Module::Load::Conditional) perl(Module::Pluggable) perl(Mojo::Base) perl(Mojo::ByteStream) perl(Mojo::IOLoop) perl(Mojo::JSON) perl(Mojo::Pg) perl(Mojo::RabbitMQ::Client) >= 0.2 perl(Mojo::URL) perl(Mojo::Util) perl(Mojolicious::Commands) perl(Mojolicious::Plugin) perl(Mojolicious::Static) perl(Net::OpenID::Consumer) perl(POSIX) perl(Pod::POM) perl(SQL::Translator) perl(Scalar::Util) perl(Sort::Versions) perl(Text::Diff) perl(Time::HiRes) perl(Time::ParseDate) perl(Time::Piece) perl(Time::Seconds) perl(URI::Escape) perl(YAML::PP) >= 0.026 perl(YAML::XS) perl(aliased) perl(base) perl(constant) perl(diagnostics) perl(strict) perl(warnings) # The following line is generated from dependencies.yaml (upstream) %define client_requires curl git-core jq perl(Getopt::Long::Descriptive) perl(IO::Socket::SSL) >= 2.009 perl(IPC::Run) perl(JSON::Validator) perl(LWP::Protocol::https) perl(LWP::UserAgent) perl(Test::More) perl(YAML::PP) >= 0.020 perl(YAML::XS) # Diff from SUSE 1: case (they have openQA-client, we have openqa-client) # Diff from SUSE 2: we have 'sqlite' not 'sqlite3' +# Diff from SUSE 3: we package bsdcat and bsdtar separately # The following line is generated from dependencies.yaml (upstream) -%define worker_requires openqa-client optipng os-autoinst < 5 perl(Capture::Tiny) perl(File::Map) perl(Minion::Backend::SQLite) >= 5.0.7 perl(Mojo::IOLoop::ReadWriteProcess) >= 0.26 perl(Mojo::SQLite) psmisc sqlite >= 3.24.0 +%define worker_requires bsdcat bsdtar openqa-client optipng os-autoinst < 5 perl(Capture::Tiny) perl(File::Map) perl(Minion::Backend::SQLite) >= 5.0.7 perl(Mojo::IOLoop::ReadWriteProcess) >= 0.26 perl(Mojo::SQLite) psmisc sqlite >= 3.24.0 # The following line is generated from dependencies.yaml (upstream) %define build_requires %assetpack_requires rubygem(sass) @@ -92,7 +95,7 @@ Name: openqa Version: %{github_version}%{?github_date:^%{github_date}git%{shortcommit}} -Release: 4%{?dist} +Release: 1%{?dist} Summary: OS-level automated testing framework License: GPLv2+ Url: http://os-autoinst.github.io/openQA/ @@ -124,6 +127,7 @@ Source6: openQA-worker.conf # 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 @@ -154,10 +158,17 @@ Recommends: perl(Mojolicious::Plugin::OAuth2) Recommends: perl(IO::Uncompress::UnXz) # server needs to run an rsync server if worker caching is used Recommends: rsync +# Optionally enabled with USE_PNGQUANT=1 +Recommends: pngquant # For the httpd subpackage split in 4.3-7, needed for updates to work right Obsoletes: openqa < 4.3-7 +# Note: Fedora does not have the issue SUSE has with noarch. on Fedora +# if build for *any* arch fails, the build is considered failed for +# *all* arches, so we can never get in a situation where the +# perl-Mojolicious-Plugin-AssetPack version differs across arches as +# SUSE can BuildArch: noarch %description @@ -291,8 +302,9 @@ Additional scripts for the use of openQA in the python programming language. %package local-db Summary: Helper package to ease setup of postgresql DB -Requires: %name +Requires: %{name} = %{version} Requires: postgresql-server +BuildRequires: postgresql-server Supplements: packageand(%name:postgresql-server) %description local-db @@ -302,7 +314,8 @@ next to the webui. %package single-instance Summary: Convenience package for a single-instance setup Requires: %{name}-local-db -Requires: %{name}-worker +Requires: %{name} = %{version} +Requires: %{name}-worker = %{version} Requires: httpd %description single-instance @@ -410,9 +423,7 @@ sed -i -e '/fails without network/d' t/32-openqa_client-script.t t/40-openqa-clo rm \ t/01-test-utilities.t \ t/17-labels_carry_over.t \ - t/25-cache-service.t \ - t/34-developer_mode-unit.t \ - t/44-scripts.t + t/25-cache-service.t # "CI" set with longer timeouts as needed for higher performance variations # within CI systems, e.g. OBS. See t/lib/OpenQA/Test/TimeLimit.pm @@ -488,8 +499,11 @@ fi %{_unitdir}/openqa-webui.service %{_unitdir}/openqa-livehandler.service %{_unitdir}/openqa-gru.service +%dir %{_unitdir}/openqa-gru.service.requires %{_unitdir}/openqa-scheduler.service +%dir %{_unitdir}/openqa-scheduler.service.requires %{_unitdir}/openqa-websockets.service +%dir %{_unitdir}/openqa-websockets.service.requires %{_unitdir}/openqa-enqueue-audit-event-cleanup.service %{_unitdir}/openqa-enqueue-audit-event-cleanup.timer %{_unitdir}/openqa-enqueue-asset-cleanup.service @@ -659,6 +673,9 @@ fi %files local-db %{_unitdir}/openqa-setup-db.service +%{_unitdir}/openqa-gru.service.requires/postgresql.service +%{_unitdir}/openqa-scheduler.service.requires/postgresql.service +%{_unitdir}/openqa-websockets.service.requires/postgresql.service %{_datadir}/openqa/script/setup-db %{_bindir}/openqa-setup-db @@ -675,6 +692,9 @@ fi %{_datadir}/openqa/lib/OpenQA/WebAPI/Plugin/FedoraUpdateRestart.pm %changelog +* Mon Apr 24 2023 Adam Williamson - 4.6^20230424gitf229f6d-1 +- Update to latest git, re-sync spec, rebase patch + * Thu Jan 19 2023 Fedora Release Engineering - 4.6^20221123gitb93eb7f-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index 6446ce5..2f55824 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (openQA-b93eb7f4b04494cf3c7128a6db7ddb9b689a748b.tar.gz) = 1933c19c422f11f32d0870e5f2c2003a8a7b947c5fd9524bd497baf6fe5187637d84d5b2eb47d5999439760d79b45f33a9e3fe1210126c3c5884366ecc44fc3a -SHA512 (assetcache-b93eb7f4b04494cf3c7128a6db7ddb9b689a748b.tar.xz) = 01adf55b2bbf1058e267a33d8eb34b2d6307ab487bd1bce6f114e4c082c40ac8581eae5ef9af9a3be6b18b088709ea30b21ea12f7c2911585b53193ac50969e8 +SHA512 (openQA-f229f6d5c08963eb94886054c43d48a1d92c4d9a.tar.gz) = 781fac67b40ac27f77125bccf831506301267a830f8c2bd305d747c6e38b02ebe882c007b34aeeca059aa188eab91694fa7a8a60db4f9175f057ff95a336c147 +SHA512 (assetcache-f229f6d5c08963eb94886054c43d48a1d92c4d9a.tar.xz) = b67b24c2e163c392b4f68694f477f16d81b4113afdab3d44f3b7791f3fd22f5e35e8fd3eb3b03d6225b0dcdc821f7ce3513a79848c8cc53f49d684270c964b5e diff --git a/update-cache.sh b/update-cache.sh index f0146f1..176c957 100755 --- a/update-cache.sh +++ b/update-cache.sh @@ -8,6 +8,7 @@ rpm -qi perl-Mojolicious > /dev/null 2>&1 || baddeps="${baddeps} perl-Mojoliciou rpm -qi perl-Mojolicious-Plugin-AssetPack > /dev/null 2>&1 || baddeps="${baddeps} perl-Mojolicious-Plugin-AssetPack" rpm -qi perl-JavaScript-Minifier-XS > /dev/null 2>&1 || baddeps="${baddeps} perl-JavaScript-Minifier-XS" rpm -qi perl-CSS-Minifier-XS > /dev/null 2>&1 || baddeps="${baddeps} perl-CSS-Minifier-XS" +rpm -qi perl-YAML-PP > /dev/null 2>&1 || baddeps="${baddeps} perl-YAML-PP" if [ -n "${baddeps}" ]; then echo "${baddeps} must be installed!" exit 1