Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package openQA for openSUSE:Factory checked in at 2026-02-23 16:12:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openQA (Old) and /work/SRC/openSUSE:Factory/.openQA.new.1977 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openQA" Mon Feb 23 16:12:04 2026 rev:809 rq:1334300 version:5.1771626210.b82f14f2 Changes: -------- --- /work/SRC/openSUSE:Factory/openQA/openQA.changes 2026-02-21 21:04:37.747453993 +0100 +++ /work/SRC/openSUSE:Factory/.openQA.new.1977/openQA.changes 2026-02-23 16:12:08.108316713 +0100 @@ -1,0 +2,7 @@ +Sat Feb 21 20:10:39 UTC 2026 - [email protected] + +- Update to version 5.1771626210.b82f14f2: + * refactor(test/overview): use signatures and clean up code + * refactor(test/overview): reduce duplication + +------------------------------------------------------------------- Old: ---- openQA-5.1771589939.8f8502b4.obscpio New: ---- openQA-5.1771626210.b82f14f2.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openQA-client-test.spec ++++++ --- /var/tmp/diff_new_pack.MgWKka/_old 2026-02-23 16:12:09.656380528 +0100 +++ /var/tmp/diff_new_pack.MgWKka/_new 2026-02-23 16:12:09.660380693 +0100 @@ -18,7 +18,7 @@ %define short_name openQA-client Name: %{short_name}-test -Version: 5.1771589939.8f8502b4 +Version: 5.1771626210.b82f14f2 Release: 0 Summary: Test package for %{short_name} License: GPL-2.0-or-later ++++++ openQA-devel-test.spec ++++++ --- /var/tmp/diff_new_pack.MgWKka/_old 2026-02-23 16:12:09.684381683 +0100 +++ /var/tmp/diff_new_pack.MgWKka/_new 2026-02-23 16:12:09.688381848 +0100 @@ -18,7 +18,7 @@ %define short_name openQA-devel Name: %{short_name}-test -Version: 5.1771589939.8f8502b4 +Version: 5.1771626210.b82f14f2 Release: 0 Summary: Test package for %{short_name} License: GPL-2.0-or-later ++++++ openQA-test.spec ++++++ --- /var/tmp/diff_new_pack.MgWKka/_old 2026-02-23 16:12:09.724383331 +0100 +++ /var/tmp/diff_new_pack.MgWKka/_new 2026-02-23 16:12:09.728383496 +0100 @@ -18,7 +18,7 @@ %define short_name openQA Name: %{short_name}-test -Version: 5.1771589939.8f8502b4 +Version: 5.1771626210.b82f14f2 Release: 0 Summary: Test package for openQA License: GPL-2.0-or-later ++++++ openQA-worker-test.spec ++++++ --- /var/tmp/diff_new_pack.MgWKka/_old 2026-02-23 16:12:09.760384815 +0100 +++ /var/tmp/diff_new_pack.MgWKka/_new 2026-02-23 16:12:09.760384815 +0100 @@ -18,7 +18,7 @@ %define short_name openQA-worker Name: %{short_name}-test -Version: 5.1771589939.8f8502b4 +Version: 5.1771626210.b82f14f2 Release: 0 Summary: Test package for %{short_name} License: GPL-2.0-or-later ++++++ openQA.spec ++++++ --- /var/tmp/diff_new_pack.MgWKka/_old 2026-02-23 16:12:09.792386135 +0100 +++ /var/tmp/diff_new_pack.MgWKka/_new 2026-02-23 16:12:09.800386464 +0100 @@ -99,7 +99,7 @@ %define devel_requires %devel_no_selenium_requires chromedriver Name: openQA -Version: 5.1771589939.8f8502b4 +Version: 5.1771626210.b82f14f2 Release: 0 Summary: The openQA web-frontend, scheduler and tools License: GPL-2.0-or-later ++++++ openQA-5.1771589939.8f8502b4.obscpio -> openQA-5.1771626210.b82f14f2.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1771589939.8f8502b4/lib/OpenQA/WebAPI/Plugin/Helpers.pm new/openQA-5.1771626210.b82f14f2/lib/OpenQA/WebAPI/Plugin/Helpers.pm --- old/openQA-5.1771589939.8f8502b4/lib/OpenQA/WebAPI/Plugin/Helpers.pm 2026-02-20 13:18:59.000000000 +0100 +++ new/openQA-5.1771626210.b82f14f2/lib/OpenQA/WebAPI/Plugin/Helpers.pm 2026-02-20 23:23:30.000000000 +0100 @@ -21,71 +21,47 @@ use Feature::Compat::Try; sub register ($self, $app, $config) { + $app->helper(label_from_const => sub ($c, $val) { ucfirst $val =~ tr/_/ /r }); $app->helper( - format_time => sub { - my ($c, $timedate, $format) = @_; + format_time => sub ($c, $timedate, $format = undef) { return unless $timedate; $format ||= '%Y-%m-%d %H:%M:%S %z'; return $timedate->strftime($format); }); $app->helper( - format_time_duration => sub { - my ($c, $timedate) = @_; + format_time_duration => sub ($c, $timedate = undef) { return unless $timedate; if ($timedate->days() > 0) { - sprintf('%d days %02d:%02d hours', $timedate->days(), $timedate->hours(), $timedate->minutes()); + return sprintf('%d days %02d:%02d hours', $timedate->days(), $timedate->hours(), $timedate->minutes()); } elsif ($timedate->hours() > 0) { - sprintf('%02d:%02d hours', $timedate->hours(), $timedate->minutes()); - } - else { - sprintf('%02d:%02d minutes', $timedate->minutes(), $timedate->seconds()); + return sprintf('%02d:%02d hours', $timedate->hours(), $timedate->minutes()); } + return sprintf('%02d:%02d minutes', $timedate->minutes(), $timedate->seconds()); }); - $app->helper( - bugurl_for => sub { - my ($c, $bugref) = @_; - return bugurl($bugref); - }); + $app->helper(bugurl_for => sub ($c, $bugref = undef) { bugurl($bugref) }); $app->helper( - bugicon_for => sub { - my ($c, $text, $bug) = @_; + bugicon_for => sub ($c, $text, $bug = undef) { my $css_class = ($text =~ /(poo|gh)#/) ? 'label_bug fa fa-bolt' : 'label_bug fa fa-bug'; - if ($bug && !$bug->open) { - $css_class .= ' bug_closed'; - } + $css_class .= ' bug_closed' if $bug && !$bug->open; return $css_class; }); $app->helper( - bugtitle_for => sub { - my ($c, $bugid, $bug) = @_; + bugtitle_for => sub ($c, $bugid, $bug = undef) { my $text = "Bug referenced: $bugid"; - if ($bug && $bug->existing && $bug->title) { - $text .= "\n" . $bug->title; - } + $text .= "\n" . $bug->title if $bug && $bug->existing && $bug->title; return $text; }); - $app->helper( - bug_report_actions => sub { - my ($c, %args) = @_; - return $c->include_branding('external_reporting', %args); - }); + $app->helper(bug_report_actions => sub ($c, %args) { $c->include_branding('external_reporting', %args) }); + $app->helper(human_readable_size => sub ($c, $size) { human_readable_size($size) }); $app->helper( - human_readable_size => sub { - my ($c, $size) = @_; - return human_readable_size($size); - }); - - $app->helper( - stepaction_for => sub { - my ($c, $title, $url, $icon, $class) = @_; - $class //= ''; + stepaction_for => sub ($c, $title, $url, $icon, $class = '') { my $icons = $c->t(i => (class => "step_action fa $icon fa-lg fa-stack-1x")) . $c->t(i => (class => 'new fa fa-plus fa-stack-1x')); my $content = $c->t(span => (class => 'fa-stack') => sub { $icons }); @@ -93,37 +69,26 @@ }); $app->helper( - stepvideolink_for => sub { - my ($c, $testid, $file_name, $frametime) = @_; + stepvideolink_for => sub ($c, $testid, $file_name, $frametime) { my $t = sprintf('&t=%s,%s', $frametime->[0], $frametime->[1]); my $url = $c->url_for('video', testid => $testid)->query(filename => $file_name) . $t; - my $icon = $c->t(i => (class => 'step_action fa fa-file-video-o fa-lg')); my $class = 'step_action fa fa-file-video-o fa-lg'; return $c->link_to($url => (title => 'Jump to video', class => $class) => sub { '' }); }); - $app->helper( - rendered_refs_no_shortening => sub { - my ($c, $text) = @_; - return render_escaped_refs($text); - }); + $app->helper(rendered_refs_no_shortening => sub ($c, $text) { render_escaped_refs($text) }); $app->helper( - current_job_group => sub { - my ($c) = @_; - + current_job_group => sub ($c) { my $job = $c->stash('job') or return; my $distri = $c->stash('distri'); my $build = $c->stash('build'); my $version = $c->stash('version'); my $group_id = $job->group_id; - if (!$group_id && !($distri && $build && $version)) { - return; - } + return if !$group_id && !($distri && $build && $version); my %query = (build => $build, distri => $distri, version => $version); - my $crumbs; - my $overview_text; + my ($crumbs, $overview_text); if ($group_id) { $query{groupid} = $group_id; $crumbs .= "\n<li id='current-group-overview'>"; @@ -146,42 +111,32 @@ return Mojo::ByteStream->new($crumbs); }); - $app->helper(current_job => sub { shift->stash('job') }); - + $app->helper(current_job => sub ($c) { $c->stash('job') }); $app->helper(current_theme => sub ($c) { $c->session->{theme} || 'light' }); - - $app->helper(is_operator_js => sub { Mojo::ByteStream->new(shift->helpers->is_operator ? 'true' : 'false') }); - $app->helper(is_admin_js => sub { Mojo::ByteStream->new(shift->helpers->is_admin ? 'true' : 'false') }); + $app->helper(is_operator_js => sub ($c) { Mojo::ByteStream->new($c->helpers->is_operator ? 'true' : 'false') }); + $app->helper(is_admin_js => sub ($c) { Mojo::ByteStream->new($c->helpers->is_admin ? 'true' : 'false') }); $app->helper( # Just like 'include', but includes the template with the given # name from the correct directory for the 'branding' config setting # falls back to 'plain' if brand doesn't include the template, so # allowing partial brands - include_branding => sub { - my ($c, $name, %args) = @_; + include_branding => sub ($c, $name, %args) { my $path = 'branding/' . $c->app->config->{global}->{branding} . "/$name"; my $ret = $c->render_to_string($path, %args); - if (defined($ret)) { - return $ret; - } - else { - $path = "branding/plain/$name"; - return $c->render_to_string($path, %args); - } + return $ret if defined($ret); + return $c->render_to_string("branding/plain/$name", %args); }); $app->helper( - icon_url => sub { - my ($c, $icon) = @_; + icon_url => sub ($c, $icon) { my $icon_asset = $c->app->asset->processed($icon)->[0]; die "Could not find icon '$icon' in assets" unless $icon_asset; return $c->url_for(assetpack => $icon_asset->TO_JSON); }); $app->helper( - favicon_url => sub { - my ($c, $suffix) = @_; + favicon_url => sub ($c, $suffix) { return $c->icon_url("logo$suffix") unless my $job = $c->stash('job'); my $status = $job->status; return $c->icon_url("logo-$status$suffix"); @@ -218,18 +173,13 @@ $app->helper( # emit_event helper, adds user, connection to events - emit_event => sub { - my ($self, $event, $data) = @_; + emit_event => sub ($c, $event, $data = undef) { die 'Missing event name' unless $event; - my $user = $self->current_user ? $self->current_user->id : undef; - return OpenQA::Events->singleton->emit($event, [$user, $self->tx->connection, $event, $data]); + my $user = $c->current_user ? $c->current_user->id : undef; + return OpenQA::Events->singleton->emit($event, [$user, $c->tx->connection, $event, $data]); }); - $app->helper( - text_with_title => sub { - my ($c, $text) = @_; - return $c->tag('span', title => $text, $text); - }); + $app->helper(text_with_title => sub ($c, $text) { $c->tag('span', title => $text, $text) }); my %progress_bar_query_by_key = ( unfinished => [state => [EXECUTION_STATES, PRE_EXECUTION_STATES]], @@ -261,15 +211,13 @@ }); $app->helper( - build_progress_bar_title => sub { - my ($c, $res) = @_; + build_progress_bar_title => sub ($c, $res) { my @keys = qw(passed unfinished softfailed failed skipped total); return join("\n", map("$_: $res->{$_}", grep($res->{$_}, @keys))); }); $app->helper( - group_link_menu_entry => sub { - my ($c, $group) = @_; + group_link_menu_entry => sub ($c, $group) { return $c->tag( 'li', $c->link_to( @@ -278,25 +226,19 @@ }); $app->helper( - comment_icon => sub { - my ($c, $jobid, $comment_count) = @_; + comment_icon => sub ($c, $jobid, $comment_count = undef) { return '' unless $comment_count; - return $c->link_to( $c->url_for('test', testid => $jobid) . '#' . comments => sub { $c->tag( 'i', class => 'test-label label_comment fa fa-comment', - title => $comment_count . ($comment_count != 1 ? ' comments available' : ' comment available') - ), - ; + title => $comment_count . ($comment_count != 1 ? ' comments available' : ' comment available')); }); }); $app->helper( - populate_hash_with_needle_timestamps_and_urls => sub { - my ($c, $needle, $hash) = @_; - + populate_hash_with_needle_timestamps_and_urls => sub ($c, $needle, $hash) { $hash->{last_seen} = $needle ? $needle->last_seen_time_fmt : 'unknown'; $hash->{last_match} = $needle ? $needle->last_matched_time_fmt : 'unknown'; return $hash unless $needle; @@ -318,42 +260,30 @@ }); $app->helper( - popover_link => sub { - my ($c, $text, $url) = @_; + popover_link => sub ($c, $text, $url = undef) { return $text unless $url; return "<a href='$url'>$text</a>"; - # note: This code ends up in an HTML attribute and therefore needs to be escaped by the template - # rendering. Therefore not using link_to here (which would prevent escaping of the "a" tag). }); $app->helper( - setting_link => sub { - my ($c, $uri, $jobid) = @_; + setting_link => sub ($c, $uri, $jobid = undef) { my $uri_link = $uri =~ m{^https?://} ? $uri : "$jobid/settings/$uri"; return $c->link_to($uri => $uri_link); }); $app->helper(find_job_or_render_not_found => \&_find_job_or_render_not_found); - $app->helper( - 'reply.gru_result' => sub { - my ($c, $result, $error_code) = @_; - return $c->render(json => $result, status => ($error_code // 200)); + 'reply.gru_result' => sub ($c, $result, $error_code = 200) { + return $c->render(json => $result, status => $error_code); }); $app->helper('reply.validation_error' => \&_validation_error); - $app->helper(compose_job_overview_search_args => \&_compose_job_overview_search_args); $app->helper(every_non_empty_param => \&_every_non_empty_param); $app->helper(compute_overview_filtering_params => \&_compute_overview_filtering_params); - $app->helper(groups_for_globs => \&_groups_for_globs); $app->helper(param_hash => \&_param_hash); - $app->helper( - link_key_exists => sub { - my ($c, $value) = @_; - return exists $c->app->config->{settings_ui_links}->{$value}; - }); + $app->helper(link_key_exists => sub ($c, $value) { exists $c->app->config->{settings_ui_links}->{$value} }); $app->helper( render_testfile => sub ($c, $name) { @@ -363,11 +293,9 @@ $app->helper( pagination_links_header => sub ($c, $limit, $offset, $has_more) { my $url = $c->url_with->query({limit => $limit})->to_abs; - my $links = {first => $url->clone->query({offset => 0})}; $links->{next} = $url->clone->query({offset => $offset + $limit}) if $has_more; $links->{prev} = $url->clone->query({offset => $limit > $offset ? 0 : $offset - $limit}) if $offset > 0; - $c->res->headers->links($links); }); @@ -592,20 +520,13 @@ return undef; } -sub _validation_error { - my ($c, $args) = @_; +sub _validation_error ($c, $args = {}) { my $format = $args->{format} // 'text'; my @errors; for my $parameter (@{$c->validation->failed}) { - if (exists $c->validation->input->{$parameter}) { - push @errors, "$parameter invalid"; - } - else { - push @errors, "$parameter missing"; - } + push @errors, exists($c->validation->input->{$parameter}) ? "$parameter invalid" : "$parameter missing"; } - my $failed = join ', ', @errors; - my $error = "Erroneous parameters ($failed)"; + my $error = 'Erroneous parameters (' . join(', ', @errors) . ')'; return $c->render(json => {error => $error}, status => 400) if $format eq 'json'; return $c->render(text => $error, status => 400); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1771589939.8f8502b4/templates/webapi/test/_overview_filter_section.html.ep new/openQA-5.1771626210.b82f14f2/templates/webapi/test/_overview_filter_section.html.ep --- old/openQA-5.1771589939.8f8502b4/templates/webapi/test/_overview_filter_section.html.ep 1970-01-01 01:00:00.000000000 +0100 +++ new/openQA-5.1771626210.b82f14f2/templates/webapi/test/_overview_filter_section.html.ep 2026-02-20 23:23:30.000000000 +0100 @@ -0,0 +1,16 @@ +<div class="mb-3" id="filter-<%= $id_suffix %>"> + <div class="d-flex align-items-center mb-1"> + <input type="checkbox" class="filter-bulk-master form-check-input me-2" title="Select all / None"> + <strong class="me-2"><%= $label %></strong> + <span class="small"> + <a href="#" class="filter-bulk-invert text-decoration-none" title="Invert selection"><i class="fa fa-refresh"></i></a> + </span> + </div> + % for my $item (@$items) { + <label class="form-label"><input value="<%= $item %>" name="<%= $name %>" type="checkbox" id="filter-<%= $item %>"> <%= label_from_const $item %></label> + % } + <hr class="my-1"> + % for my $item (@$meta_items) { + <label class="form-label" title="Meta-category: <%= $item %>"><input value="<%= $item %>" name="<%= $name %>" type="checkbox" id="filter-<%= $item %>" class="filter-meta"> <strong><%= label_from_const $item %></strong></label> + % } +</div> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1771589939.8f8502b4/templates/webapi/test/overview.html.ep new/openQA-5.1771626210.b82f14f2/templates/webapi/test/overview.html.ep --- old/openQA-5.1771589939.8f8502b4/templates/webapi/test/overview.html.ep 2026-02-20 13:18:59.000000000 +0100 +++ new/openQA-5.1771626210.b82f14f2/templates/webapi/test/overview.html.ep 2026-02-20 23:23:30.000000000 +0100 @@ -85,38 +85,8 @@ </div> <div class="card-body"> <form action="#" method="get" id="filter-form"> - <div class="mb-3" id="filter-results"> - <div class="d-flex align-items-center mb-1"> - <input type="checkbox" class="filter-bulk-master form-check-input me-2" title="Select all / None"> - <strong class="me-2">Job result</strong> - <span class="small"> - <a href="#" class="filter-bulk-invert text-decoration-none" title="Invert selection"><i class="fa fa-refresh"></i></a> - </span> - </div> - % for my $result (OpenQA::Jobs::Constants::RESULTS) { - <label class="form-label"><input value="<%= $result %>" name="result" type="checkbox" id="filter-<%= $result %>"> <%= ucfirst $result =~ s/_/ /r %></label> - % } - <hr class="my-1"> - % for my $result (OpenQA::Jobs::Constants::META_RESULTS) { - <label class="form-label" title="Meta-category: <%= $result %>"><input value="<%= $result %>" name="result" type="checkbox" id="filter-<%= $result %>" class="filter-meta"> <strong><%= ucfirst $result =~ s/_/ /r %></strong></label> - % } - </div> - <div class="mb-3" id="filter-states"> - <div class="d-flex align-items-center mb-1"> - <input type="checkbox" class="filter-bulk-master form-check-input me-2" title="Select all / None"> - <strong class="me-2">Job state</strong> - <span class="small"> - <a href="#" class="filter-bulk-invert text-decoration-none" title="Invert selection"><i class="fa fa-refresh"></i></a> - </span> - </div> - % for my $state (OpenQA::Jobs::Constants::STATES) { - <label class="form-label"><input value="<%= $state %>" name="state" type="checkbox" id="filter-<%= $state %>"> <%= ucfirst $state =~ s/_/ /r %></label> - % } - <hr class="my-1"> - % for my $state (OpenQA::Jobs::Constants::META_STATES) { - <label class="form-label" title="Meta-category: <%= $state %>"><input value="<%= $state %>" name="state" type="checkbox" id="filter-<%= $state %>" class="filter-meta"> <strong><%= ucfirst $state =~ s/_/ /r %></strong></label> - % } - </div> + %= include 'test/_overview_filter_section', id_suffix => 'results', label => 'Job result', name => 'result', items => [OpenQA::Jobs::Constants::RESULTS], meta_items => [OpenQA::Jobs::Constants::META_RESULTS] + %= include 'test/_overview_filter_section', id_suffix => 'states', label => 'Job state', name => 'state', items => [OpenQA::Jobs::Constants::STATES], meta_items => [OpenQA::Jobs::Constants::META_STATES] <div class="row" id="filter-arch-flavor"> <div class="col-5"> <div class="mb-3"> ++++++ openQA.obsinfo ++++++ --- /var/tmp/diff_new_pack.MgWKka/_old 2026-02-23 16:12:21.584872252 +0100 +++ /var/tmp/diff_new_pack.MgWKka/_new 2026-02-23 16:12:21.592872581 +0100 @@ -1,5 +1,5 @@ name: openQA -version: 5.1771589939.8f8502b4 -mtime: 1771589939 -commit: 8f8502b43e06c431ef8c94e26c0160235e4236cd +version: 5.1771626210.b82f14f2 +mtime: 1771626210 +commit: b82f14f264a3bfd05ca065a2fe9ef1e22f3f580f
