Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package openQA for openSUSE:Factory checked in at 2025-07-11 21:29:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openQA (Old) and /work/SRC/openSUSE:Factory/.openQA.new.7373 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openQA" Fri Jul 11 21:29:40 2025 rev:709 rq:1291795 version:5.1752164310.2f1c94d6 Changes: -------- --- /work/SRC/openSUSE:Factory/openQA/openQA.changes 2025-07-09 17:28:49.724601668 +0200 +++ /work/SRC/openSUSE:Factory/.openQA.new.7373/openQA.changes 2025-07-11 21:31:26.816350955 +0200 @@ -1,0 +2,14 @@ +Thu Jul 10 21:11:05 UTC 2025 - ok...@suse.com + +- Update to version 5.1752164310.2f1c94d6: + * openQA-bootstrap: Replace hardcoded openqa directory path with variable + * Avoid trying to insert job modules without all required fields + * Removed unused and erroneous function `update_backend` + * Validate fields of update status before using them + * Schema::Result::Jobs: Catch undefined parent jobs + * Skip upload of test modules and extra tests with no name + * worker: disconnect dbus from NameOwnerChanged signal (POO #183833) + * Fix race cond when date ref job got deleted while serving build list + * Prevent error when workers config not found, throw warning instead + +------------------------------------------------------------------- Old: ---- openQA-5.1751964812.235a2034.obscpio New: ---- openQA-5.1752164310.2f1c94d6.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openQA-client-test.spec ++++++ --- /var/tmp/diff_new_pack.bEVFZf/_old 2025-07-11 21:31:28.016400439 +0200 +++ /var/tmp/diff_new_pack.bEVFZf/_new 2025-07-11 21:31:28.016400439 +0200 @@ -18,7 +18,7 @@ %define short_name openQA-client Name: %{short_name}-test -Version: 5.1751964812.235a2034 +Version: 5.1752164310.2f1c94d6 Release: 0 Summary: Test package for %{short_name} License: GPL-2.0-or-later ++++++ openQA-devel-test.spec ++++++ --- /var/tmp/diff_new_pack.bEVFZf/_old 2025-07-11 21:31:28.044401593 +0200 +++ /var/tmp/diff_new_pack.bEVFZf/_new 2025-07-11 21:31:28.044401593 +0200 @@ -18,7 +18,7 @@ %define short_name openQA-devel Name: %{short_name}-test -Version: 5.1751964812.235a2034 +Version: 5.1752164310.2f1c94d6 Release: 0 Summary: Test package for %{short_name} License: GPL-2.0-or-later ++++++ openQA-test.spec ++++++ --- /var/tmp/diff_new_pack.bEVFZf/_old 2025-07-11 21:31:28.068402583 +0200 +++ /var/tmp/diff_new_pack.bEVFZf/_new 2025-07-11 21:31:28.072402748 +0200 @@ -18,7 +18,7 @@ %define short_name openQA Name: %{short_name}-test -Version: 5.1751964812.235a2034 +Version: 5.1752164310.2f1c94d6 Release: 0 Summary: Test package for openQA License: GPL-2.0-or-later ++++++ openQA-worker-test.spec ++++++ --- /var/tmp/diff_new_pack.bEVFZf/_old 2025-07-11 21:31:28.096403737 +0200 +++ /var/tmp/diff_new_pack.bEVFZf/_new 2025-07-11 21:31:28.100403902 +0200 @@ -18,7 +18,7 @@ %define short_name openQA-worker Name: %{short_name}-test -Version: 5.1751964812.235a2034 +Version: 5.1752164310.2f1c94d6 Release: 0 Summary: Test package for %{short_name} License: GPL-2.0-or-later ++++++ openQA.spec ++++++ --- /var/tmp/diff_new_pack.bEVFZf/_old 2025-07-11 21:31:28.128405057 +0200 +++ /var/tmp/diff_new_pack.bEVFZf/_new 2025-07-11 21:31:28.128405057 +0200 @@ -97,7 +97,7 @@ %define devel_requires %devel_no_selenium_requires chromedriver Name: openQA -Version: 5.1751964812.235a2034 +Version: 5.1752164310.2f1c94d6 Release: 0 Summary: The openQA web-frontend, scheduler and tools License: GPL-2.0-or-later ++++++ openQA-5.1751964812.235a2034.obscpio -> openQA-5.1752164310.2f1c94d6.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1751964812.235a2034/lib/OpenQA/BuildResults.pm new/openQA-5.1752164310.2f1c94d6/lib/OpenQA/BuildResults.pm --- old/openQA-5.1751964812.235a2034/lib/OpenQA/BuildResults.pm 2025-07-08 10:53:32.000000000 +0200 +++ new/openQA-5.1752164310.2f1c94d6/lib/OpenQA/BuildResults.pm 2025-07-10 18:18:30.000000000 +0200 @@ -232,7 +232,7 @@ unless (defined $jr{date}) { # job was not in @jobs - so fetch it from db my $job = $jobs_resultset->find($date_ref_job); - $jr{date} = $job->t_created; + $jr{date} = (defined $job) ? $job->t_created : DateTime->from_epoch(0); } $jr{escaped_version} = $jr{version}; $jr{escaped_version} =~ s/\W/_/g; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1751964812.235a2034/lib/OpenQA/Schema/Result/Jobs.pm new/openQA-5.1752164310.2f1c94d6/lib/OpenQA/Schema/Result/Jobs.pm --- old/openQA-5.1751964812.235a2034/lib/OpenQA/Schema/Result/Jobs.pm 2025-07-08 10:53:32.000000000 +0200 +++ new/openQA-5.1752164310.2f1c94d6/lib/OpenQA/Schema/Result/Jobs.pm 2025-07-10 18:18:30.000000000 +0200 @@ -35,7 +35,7 @@ use OpenQA::File; use OpenQA::Parser 'parser'; use OpenQA::WebSockets::Client; -use List::Util qw(any); +use List::Util qw(any all); use Scalar::Util qw(looks_like_number); # The state and results constants are duplicated in the Python client: # if you change them or add any, please also update const.py. @@ -1056,7 +1056,7 @@ } sub save_screenshot ($self, $screen) { - return unless length($screen->{name}); + return unless ref $screen eq 'HASH' && length($screen->{name}); my $tmpdir = $self->worker->get_property('WORKER_TMPDIR'); return unless -d $tmpdir; # we can't help @@ -1083,10 +1083,6 @@ } } -sub update_backend ($self, $backend_info) { - $self->update({backend => $backend_info->{backend}}); -} - sub update_result ($self, $result, $state = undef) { my %values = (result => $result); $values{state} = $state if defined $state; @@ -1096,6 +1092,9 @@ } sub insert_module ($self, $tm, $skip_jobs_update = undef) { + my @required_fields = ($tm->{name}, $tm->{category}, $tm->{script}); + return 0 unless all { defined $_ } @required_fields; + # prepare query to insert job module my $insert_sth = $self->{_insert_job_module_sth}; $insert_sth = $self->{_insert_job_module_sth} = $self->result_source->schema->storage->dbh->prepare( @@ -1112,7 +1111,7 @@ # note: We have 'important' in the DB but 'ignore_failure' in the flags for historical reasons (see #1266). my $flags = $tm->{flags}; $insert_sth->execute( - $self->id, $tm->{name}, $tm->{category}, $tm->{script}, + $self->id, @required_fields, $flags->{milestone} ? 1 : 0, $flags->{ignore_failure} ? 0 : 1, $flags->{fatal} ? 1 : 0, @@ -1126,7 +1125,7 @@ } sub insert_test_modules ($self, $testmodules) { - return undef unless scalar @$testmodules; + return undef unless ref $testmodules eq 'ARRAY' && scalar @$testmodules; # insert all test modules and update job module statistics uxing txn to avoid inconsistent job module # statistics in the error case @@ -1333,11 +1332,11 @@ $parser->load($tmp_extra_test)->results->each( sub { - return if !$_->test; - $_->test->script($script) if $script; - my $t_info = $_->test->to_openqa; - $self->insert_module($t_info); - $self->update_module($_->test->name, $_->to_openqa); + return unless my $test = $_->test; + return unless my $test_name = $test->name; + $test->script($script) if $script; + $self->insert_module($test->to_openqa); + $self->update_module($test_name, $_->to_openqa); }); $self->account_result_size("$type results", $parser->write_output($self->result_dir)); @@ -1481,10 +1480,8 @@ $self->append_log($status->{serial_terminal}, 'serial-terminal-live.txt'); $self->append_log($status->{serial_terminal_user}, 'serial-terminal-live.txt'); # delete from the hash so it becomes dumpable for debugging - my $screen = delete $status->{screen}; - $self->save_screenshot($screen) if $screen; - $self->update_backend($status->{backend}) if $status->{backend}; - $self->insert_test_modules($status->{test_order}) if $status->{test_order}; + $self->save_screenshot(delete $status->{screen}); + $self->insert_test_modules($status->{test_order}); my %known_image; my %known_files; my @failed_modules; @@ -2237,10 +2234,10 @@ $parents_list ||= [$self->parents->all]; for my $s (@$parents_list) { push(@{$parents{$s->to_string}}, $s->parent_job_id); - $has_parents = 1; my $jobs = $self->result_source->schema->resultset('Jobs'); - $parents_ok = $jobs->find($s->parent_job_id, {select => ['result']})->is_ok - if $is_final && $parents_ok; + next unless my $parent = $jobs->find($s->parent_job_id, {select => ['result']}); + $has_parents = 1; + $parents_ok &&= $parent->is_ok if $is_final; } $children_list ||= [$self->children->all]; for my $s (@$children_list) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1751964812.235a2034/lib/OpenQA/Utils.pm new/openQA-5.1752164310.2f1c94d6/lib/OpenQA/Utils.pm --- old/openQA-5.1751964812.235a2034/lib/OpenQA/Utils.pm 2025-07-08 10:53:32.000000000 +0200 +++ new/openQA-5.1752164310.2f1c94d6/lib/OpenQA/Utils.pm 2025-07-10 18:18:30.000000000 +0200 @@ -263,7 +263,7 @@ } sub save_base64_png ($dir, $newfile, $png) { - return unless $newfile; + return unless $newfile && defined($png); # sanitize $newfile =~ s,\.png,,; $newfile =~ tr/a-zA-Z0-9-/_/cs; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1751964812.235a2034/lib/OpenQA/Worker/Job.pm new/openQA-5.1752164310.2f1c94d6/lib/OpenQA/Worker/Job.pm --- old/openQA-5.1751964812.235a2034/lib/OpenQA/Worker/Job.pm 2025-07-08 10:53:32.000000000 +0200 +++ new/openQA-5.1752164310.2f1c94d6/lib/OpenQA/Worker/Job.pm 2025-07-10 18:18:30.000000000 +0200 @@ -1156,24 +1156,25 @@ my $test_order = $self->test_order; my (%ret, $last_test_module); return (\%ret, $last_test_module) unless $test_order; + my $skipped = 0; for my $test_module (@$test_order) { - my $test = $test_module->{name}; - my $result = $self->_read_module_result($test); - last unless $result; + ++$skipped and next unless my $test = $test_module->{name}; + ++$skipped and last unless my $result = $self->_read_module_result($test); $last_test_module = $test; $ret{$test} = $result; if ($result->{extra_test_results}) { for my $extra_test (@{$result->{extra_test_results}}) { - my $extra_result = $self->_read_module_result($extra_test->{name}); - next unless $extra_result; - $ret{$extra_test->{name}} = $extra_result; + ++$skipped and next unless my $extra_test_name = $extra_test->{name}; + ++$skipped and next unless my $extra_result = $self->_read_module_result($extra_test_name); + $ret{$extra_test_name} = $extra_result; } push @{$extra_test_order}, @{$result->{extra_test_results}}; } last if $test eq $upload_up_to; } + log_debug "Skipped $skipped invalid test modules or extra tests" if $skipped; return (\%ret, $last_test_module); } @@ -1185,7 +1186,7 @@ my $modules_considered_processed = 0; for my $test_module (@$test_order) { - my $test_name = $test_module->{name}; + next unless my $test_name = $test_module->{name}; last if $test_name eq $current_test_module; ++$modules_considered_processed; last if $test_name eq $last_test_module; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1751964812.235a2034/lib/OpenQA/Worker/Settings.pm new/openQA-5.1752164310.2f1c94d6/lib/OpenQA/Worker/Settings.pm --- old/openQA-5.1751964812.235a2034/lib/OpenQA/Worker/Settings.pm 2025-07-08 10:53:32.000000000 +0200 +++ new/openQA-5.1752164310.2f1c94d6/lib/OpenQA/Worker/Settings.pm 2025-07-10 18:18:30.000000000 +0200 @@ -10,7 +10,7 @@ use Config::IniFiles; use Time::Seconds; use OpenQA::Config; -use OpenQA::Log 'setup_log'; +use OpenQA::Log qw(setup_log log_info); use OpenQA::Utils 'is_host_local'; use Net::Domain 'hostfqdn'; @@ -23,7 +23,8 @@ sub new ($class, $instance_number = undef, $cli_options = {}) { my $config_paths = lookup_config_files(undef, 'workers.ini', 1); my $cfg = parse_config_files($config_paths); - my @parse_errors = @$config_paths ? (@Config::IniFiles::errors) : ('No config file found.'); + my @parse_errors = @$config_paths ? (@Config::IniFiles::errors) : (); + log_info 'workers.ini not found, using default settings' unless @$config_paths; # read settings from config my %global_settings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1751964812.235a2034/lib/OpenQA/Worker.pm new/openQA-5.1752164310.2f1c94d6/lib/OpenQA/Worker.pm --- old/openQA-5.1751964812.235a2034/lib/OpenQA/Worker.pm 2025-07-08 10:53:32.000000000 +0200 +++ new/openQA-5.1752164310.2f1c94d6/lib/OpenQA/Worker.pm 2025-07-10 18:18:30.000000000 +0200 @@ -611,8 +611,12 @@ sub is_ovs_dbus_service_running ($self) { try { defined &Net::DBus::system or require Net::DBus } catch ($e) { return 0 } - my $bus = ($self->{_system_dbus} //= Net::DBus->system(nomainloop => 1)); - try { return defined $bus->get_service('org.opensuse.os_autoinst.switch') } + unless (defined $self->{_system_dbus}) { + $self->{_system_dbus} = Net::DBus->system(nomainloop => 1); + # this avoids piling up signals we never do anything with - POO #183833 + $self->{_system_dbus}->get_bus_object->disconnect_from_signal('NameOwnerChanged', 1); + } + try { return defined $self->{_system_dbus}->get_service('org.opensuse.os_autoinst.switch') } catch ($e) { return 0 } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1751964812.235a2034/script/openqa-bootstrap new/openQA-5.1752164310.2f1c94d6/script/openqa-bootstrap --- old/openQA-5.1751964812.235a2034/script/openqa-bootstrap 2025-07-08 10:53:32.000000000 +0200 +++ new/openQA-5.1752164310.2f1c94d6/script/openqa-bootstrap 2025-07-10 18:18:30.000000000 +0200 @@ -3,6 +3,8 @@ set -xeuo pipefail +OPENQA_DIR=${OPENQA_DIR:=/usr/share/openqa} + dbname="${dbname:="openqa"}" dbuser="${dbuser:="geekotest"}" running_systemd= @@ -26,7 +28,7 @@ start-worker() { if [[ -z $running_systemd ]]; then /usr/bin/install -d -m 0755 -o _openqa-worker /var/lib/openqa/pool/1 - su _openqa-worker -c '/usr/share/openqa/script/worker --instance 1' & + su _openqa-worker -c "$OPENQA_DIR/script/worker --instance 1" & else systemctl enable --now openqa-worker@1 fi @@ -34,16 +36,16 @@ start-daemons() { if [[ -z $running_systemd ]]; then - pgrep -f openqa-scheduler-daemon > /dev/null || su geekotest -c /usr/share/openqa/script/openqa-scheduler-daemon & - pgrep -f openqa-websockets-daemon > /dev/null || su geekotest -c /usr/share/openqa/script/openqa-websockets-daemon & - pgrep -f openqa-gru > /dev/null || su geekotest -c /usr/share/openqa/script/openqa-gru & - pgrep -f openqa-livehandler-daemon > /dev/null || su geekotest -c /usr/share/openqa/script/openqa-livehandler-daemon & + pgrep -f openqa-scheduler-daemon > /dev/null || su geekotest -c "$OPENQA_DIR/script/openqa-scheduler-daemon" & + pgrep -f openqa-websockets-daemon > /dev/null || su geekotest -c "$OPENQA_DIR/script/openqa-websockets-daemon" & + pgrep -f openqa-gru > /dev/null || su geekotest -c "$OPENQA_DIR/script/openqa-gru" & + pgrep -f openqa-livehandler-daemon > /dev/null || su geekotest -c "$OPENQA_DIR/script/openqa-livehandler-daemon" & if [[ $setup_web_proxy == "nginx" ]]; then nginx else /usr/sbin/start_apache2 -k start fi - pgrep -f openqa-webui-daemon > /dev/null || su geekotest -c /usr/share/openqa/script/openqa-webui-daemon & + pgrep -f openqa-webui-daemon > /dev/null || su geekotest -c "$OPENQA_DIR/script/openqa-webui-daemon" & else if [[ $setup_web_proxy == "nginx" ]]; then systemctl enable --now nginx @@ -101,12 +103,12 @@ # setup database chown -R postgres: /var/lib/pgsql/ # fix broken postgres working dir permissions in the nspawn container start-database -su postgres -c "/usr/share/openqa/script/setup-db" "$dbuser" "$dbname" +su postgres -c "$OPENQA_DIR/script/setup-db" "$dbuser" "$dbname" # setup webserver and fake-auth proxy_args="" [[ -n "$setup_web_proxy" ]] && proxy_args="--proxy=$setup_web_proxy" -setup=/usr/share/openqa/script/configure-web-proxy +setup=$OPENQA_DIR/script/configure-web-proxy if command -v $setup; then bash -ex $setup "$proxy_args" else @@ -140,7 +142,7 @@ # use faster local mirror if run from within SUSE network export needles_giturl="https://gitlab.suse.de/openqa/os-autoinst-needles-opensuse-mirror.git" fi - /usr/share/openqa/script/fetchneedles + "$OPENQA_DIR/script/fetchneedles" if [[ ! -e /var/lib/openqa/tests/sle ]]; then ln -s opensuse /var/lib/openqa/tests/sle fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1751964812.235a2034/t/10-jobs.t new/openQA-5.1752164310.2f1c94d6/t/10-jobs.t --- old/openQA-5.1751964812.235a2034/t/10-jobs.t 2025-07-08 10:53:32.000000000 +0200 +++ new/openQA-5.1752164310.2f1c94d6/t/10-jobs.t 2025-07-10 18:18:30.000000000 +0200 @@ -39,6 +39,11 @@ # for "investigation" tests my $fake_git_log = 'deadbeef Break test foo'; +subtest 'adding job module without required fields' => sub { + my $res = $jobs->first->insert_module({name => undef, category => 'foo', script => 'unk'}); + is 0, $res, 'no job module inserted if name missing'; +}; + subtest 'handling of concurrent deletions in code updating jobs' => sub { ok my $job = $jobs->find(99927), 'job exists in first place'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1751964812.235a2034/t/24-worker-overall.t new/openQA-5.1752164310.2f1c94d6/t/24-worker-overall.t --- old/openQA-5.1751964812.235a2034/t/24-worker-overall.t 2025-07-08 10:53:32.000000000 +0200 +++ new/openQA-5.1752164310.2f1c94d6/t/24-worker-overall.t 2025-07-10 18:18:30.000000000 +0200 @@ -81,10 +81,16 @@ has availability_error => 'Cache service info error: Connection refused'; } { + package Test::FakeDBusObject; + use Mojo::Base -base, -signatures; + sub disconnect_from_signal ($self, $signal, $id) { } +} +{ package Test::FakeDBus; # uncoverable statement count:2 use Mojo::Base -base, -signatures; has mock_service_value => 1; sub get_service ($self, $service_name) { $self->mock_service_value } + sub get_bus_object ($self) { Test::FakeDBusObject->new } } my $dbus_mock = Test::MockModule->new('Net::DBus', no_auto => 1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1751964812.235a2034/t/24-worker-settings.t new/openQA-5.1752164310.2f1c94d6/t/24-worker-settings.t --- old/openQA-5.1751964812.235a2034/t/24-worker-settings.t 2025-07-08 10:53:32.000000000 +0200 +++ new/openQA-5.1752164310.2f1c94d6/t/24-worker-settings.t 2025-07-10 18:18:30.000000000 +0200 @@ -127,7 +127,7 @@ $config_mock->redefine(_config_dirs => [['does not exist']]); my $settings = OpenQA::Worker::Settings->new(1); ok !$settings->file_path, 'no file path present'; - is_deeply $settings->parse_errors, ['No config file found.'], 'error logged' + is_deeply $settings->parse_errors, [], 'no parse errors if file is missing' or always_explain $settings->parse_errors; }; ++++++ openQA.obsinfo ++++++ --- /var/tmp/diff_new_pack.bEVFZf/_old 2025-07-11 21:31:49.417282891 +0200 +++ /var/tmp/diff_new_pack.bEVFZf/_new 2025-07-11 21:31:49.421283056 +0200 @@ -1,5 +1,5 @@ name: openQA -version: 5.1751964812.235a2034 -mtime: 1751964812 -commit: 235a203455d52b02df10ddec70a27162ff78078b +version: 5.1752164310.2f1c94d6 +mtime: 1752164310 +commit: 2f1c94d6282ce7680cb949fe4ea42b5f0fa8b30a