Project

General

Profile

Actions

action #51989

closed

Use of uninitialized value $distri in branding/openSUSE/external_reporting.html.ep , uncovered "microos" distri causes warning and bug report icon to not show up

Added by okurz almost 5 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Regressions/Crashes
Target version:
-
Start date:
2019-05-25
Due date:
% Done:

0%

Estimated time:

Description

Observation

Errors found in `journalctl -u openqa-webui on o3

May 25 10:36:00 ariel openqa[7965]: Use of uninitialized value $distri in concatenation (.) or string at template branding/openSUSE/external_reporting.html.ep line 104.
May 25 10:36:00 ariel openqa[7965]: Use of uninitialized value $distri in string eq at template branding/openSUSE/external_reporting.html.ep line 107.

Problem

Since we did not have a change to that file since

commit 49c5007b
Author: Marius Kittler <mkittler@suse.de>
Date:   Mon Jan 14 13:54:55 2019 +0100

    Fix external reporting if scenario description not present

diff --git a/templates/branding/openSUSE/external_reporting.html.ep b/templates/branding/openSUSE/external_reporting.html.ep
index e4b95361..89942f1e 100644
--- a/templates/branding/openSUSE/external_reporting.html.ep
+++ b/templates/branding/openSUSE/external_reporting.html.ep
@@ -2,7 +2,7 @@
 % my $step_url = url_for('step')->to_abs;
 % my $module = stash('moduleid');
 % my %product_details = ();
-% my $scenario_description = $job->scenario_description;
+% my $scenario_description = $job->scenario_description // '';

I assume it is visible now either because it always was present or new database settings cause this.

https://github.com/os-autoinst/openQA/blob/master/templates/branding/openSUSE/external_reporting.html.ep#L104 is the line where the first warning occurs with $distri that comes from https://github.com/os-autoinst/openQA/blob/master/templates/branding/openSUSE/external_reporting.html.ep#L33 . Probably the value of $job->DISTRI is neither "sle", nor "opensuse", "caasp" or "kubic".


Related issues 1 (0 open1 closed)

Related to openQA Project - action #55424: Error about "Use of uninitialized value in join or string at template branding/openSUSE/external_reporting.html.ep line 45" on every view of a screenshot of a job that has non-standard flavor, e.g. "Regression-on-migrated-system-from-SLE12-SPx"Resolvedokurz2019-08-13

Actions
Actions #1

Updated by okurz almost 5 years ago

  • Subject changed from Use of uninitialized value $distri in branding/openSUSE/external_reporting.html.ep to Use of uninitialized value $distri in branding/openSUSE/external_reporting.html.ep , uncovered "microos" distri causes warning and bug report icon to not show up

Based on the timestamp looking into /var/log/apache2/access_log I could find a single job https://openqa.opensuse.org/tests/942601 was accessed. Accessing any thumbnail in there, e.g. https://openqa.opensuse.org/tests/942601#step/bootloader/7 triggers the warning in the logfile again. I can see that there is no bug icon even though the flash still shows. The "distri" value in this case is "microos" which is not covered in the lookup table. I suggest to add that value but also provide a fallback option or clear error (or silently ignore).

Actions #2

Updated by okurz over 4 years ago

  • Status changed from New to Feedback
  • Assignee set to okurz
Actions #3

Updated by okurz over 4 years ago

  • Related to action #55424: Error about "Use of uninitialized value in join or string at template branding/openSUSE/external_reporting.html.ep line 45" on every view of a screenshot of a job that has non-standard flavor, e.g. "Regression-on-migrated-system-from-SLE12-SPx" added
Actions #4

Updated by okurz over 4 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF