Project

General

Profile

Actions

action #179395

closed

coordination #154768: [saga][epic][ux] State-of-art user experience for openQA

coordination #157345: [epic] Improved test reviewer user experience

[beginner] ariel.suse-dmz.opensuse.org: »Can't call method "taskname" on an undefined value at template test/infopanel.html.ep line 49.« size:S

Added by nicksinger 10 days ago. Updated 2 days ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Regressions/Crashes
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Observation

We received an e-mail from logwarn about the following errors:

[2025-03-24T08:27:26.368740Z] [error] [kLs_wpYg_yOq] Can't call method "taskname" on an undefined value at template test/infopanel.html.ep line 49.
Context:
  44:                         Result: <b><%= $job->result %></b>\
  45:                     % }
  46:                     % else {
  47:                         % my $state_detail = '';
  48:                         % if (my @gru_deps = $job->gru_dependencies) {
  49:                             % $state_detail = join(';', map { 'id: ' . $_->gru_task_id . ', name: ' . $_->gru_task->taskname } @gru_deps);
  50:                             % $state_detail = ", waiting for background tasks ($state_detail)";
  51:                         % }
  52:                         State: <b><%= $job->state %></b><%= $state_detail %>\
  53:                     % }
  54:                     % if ($job->t_finished) {
Traceback (most recent call first):
  File "template test/infopanel.html.ep", line 49, in "Mojo::Template::__ANON__"
…
  File "/usr/share/openqa/script/../lib/OpenQA/WebAPI/Controller/Test.pm", line 559, in "Mojolicious::Controller::render"
  File "/usr/share/openqa/script/../lib/OpenQA/WebAPI/Controller/Test.pm", line 538, in "OpenQA::WebAPI::Controller::Test::_show"
  File "/usr/lib/perl5/vendor_perl/5.26.1/Mojolicious.pm", line 193, in "OpenQA::WebAPI::Controller::Test::show"
…
  File "/usr/lib/perl5/vendor_perl/5.26.1/Mojolicious.pm", line 184, in "Mojolicious::Commands::run"
  File "/usr/share/openqa/script/../lib/OpenQA/WebAPI.pm", line 521, in "Mojolicious::start"
  File "/usr/share/openqa/script/openqa", line 23, in "OpenQA::WebAPI::run"

Acceptance Criteria

  • AC1: OpenQA job page does not result in a server error even if there is no gru_task for a gru_dependencies entry in the database
  • AC2: gru_dependencies is ensured to only have entries for still existing corresponding gru_task entries [checked]

Suggestions

  • The state where the job id had an entry in gru_dependencies but not in gru_task anymore lasted only for a moment. Currently the job is not in the gru_dependencies table anymore

Example

openqa=> select * from gru_dependencies limit 1;
 job_id  | gru_task_id 
---------+-------------
 4873132 |    21055332
(1 row)

openqa=> select * from gru_tasks where id=21055332;
    id    | taskname  |                                                                 args                                                                 |       run_at        | priority |      t_created    
  |      t_updated      
----------+-----------+--------------------------------------------------------------------------------------------------------------------------------------+---------------------+----------+-------------------
--+---------------------
 21055332 | git_clone | [{"\/var\/lib\/openqa\/share\/tests\/opensuse":null,"\/var\/lib\/openqa\/share\/tests\/opensuse\/products\/opensuse\/needles":null}] | 2025-02-21 13:10:59 |       10 | 2025-02-21 13:10:5
9 | 2025-02-21 13:10:59
(1 row)
Actions

Also available in: Atom PDF