Project

General

Profile

Actions

action #166154

closed

[tools] failed to open the Scheduled product link of the sle-micro test size:S

Added by rfan1 4 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
Low
Category:
Regressions/Crashes
Target version:
Start date:
2024-09-02
Due date:
% Done:

0%

Estimated time:

Description

Description

I tried to open the Scheduled product link of a sle-micro test, but it got stuck at the loading phase.

The job id is: https://openqa.suse.de/tests/15296462
Scheduled product link is: https://openqa.suse.de/admin/productlog?id=2303923

More detail information can be seen at https://suse.slack.com/archives/C02CANHLANP/p1725272892839539

Can you please take a look at it?
Thanks.

Observation

Job settings (see https://openqa.suse.de/tests/15296462#settings) contains "structured" variables.

REPO_SLE_SL_MICRO_EXTRAS        {"SL-Micro-Extras-6.1-x86_64-Build14.2","SL-Micro-Extras-6.1-x86_64-Debug-Build14.2","SL-Micro-Extras-6.1-x86_64-Source-Build14.2"}
REPO_SLE_SL_MICRO_PACKAGES        {"SL-Micro-Packages-6.1-x86_64-Build14.2","SL-Micro-Packages-6.1-x86_64-Debug-Build14.2","SL-Micro-Packages-6.1-x86_64-Source-Build14.2"}

or from https://openqa.suse.de/tests/15296462/file/vars.json:

   "REPO_SLE_SL_MICRO_EXTRAS" : "{\"SL-Micro-Extras-6.1-x86_64-Build14.2\",\"SL-Micro-Extras-6.1-x86_64-Debug-Build14.2\",\"SL-Micro-Extras-6.1-x86_64-Source-Build14.2\"}",
   "REPO_SLE_SL_MICRO_PACKAGES" : "{\"SL-Micro-Packages-6.1-x86_64-Build14.2\",\"SL-Micro-Packages-6.1-x86_64-Debug-Build14.2\",\"SL-Micro-Packages-6.1-x86_64-Source-Build14.2\"}",

The renderHttpUrlAsLink function (https://github.com/os-autoinst/openQA/blob/f755652b58fe535683c967507ae41690563f44fd/assets/javascripts/openqa.js#L568) cannot handle that, according to the debugger the value of value is not a string, but an array; in this particular case

[
    "SL-Micro-Extras-6.1-x86_64-Build14.2",
    "SL-Micro-Extras-6.1-x86_64-Debug-Build14.2",
    "SL-Micro-Extras-6.1-x86_64-Source-Build14.2"
]

Calling value.match(/https?:\/\/[^\s,]*/) on that causes "TypeError: value.match is not a function" exception.

It is scheduled from https://gitlab.suse.de/openqa/openqa-trigger-from-ibs-plugin/-/commit/09758e574039b42ffee3afa166b6ebf6cfa0b08a#683495b296e4f5e6fa8cc637ced6e892bd78129d

Acceptance Criteria

  • AC1:: The Scheduled Product page is more robust and can display any content without an error.
  • AC2: Settings are treated as key-value pairs where keys and values can be arbitrary text that is preserved and displayed as-is by openQA.
  • AC3:: When scheduling, repeated settings (settings that are specified multiple times) are handled in a way that makes sense (e.g. the last setting wins), or reported as an error to the client.

Suggestions

  • Check whether escaping is missing/wrong on any level where we handle those settings.
  • Change the behavior when there are repated settings for AC3.

Files

Screenshot from 2024-09-02 18-53-00.png (28.1 KB) Screenshot from 2024-09-02 18-53-00.png screen shot rfan1, 2024-09-02 10:53
array_after_PR.png (34.1 KB) array_after_PR.png robert.richardson, 2024-10-16 13:20
array_before_PR.png (39 KB) array_before_PR.png robert.richardson, 2024-10-16 13:23
Actions #1

Updated by jbaier_cz 4 months ago

  • Description updated (diff)

I added the observation section with some debug info.

Actions #2

Updated by tinita 4 months ago

I can reproduce it with:

openqa-cli schedule \
--host "http://localhost:9526" \
--param-file SCENARIO_DEFINITIONS_YAML=scenario-definitions.yaml \
DISTRI=example VERSION=0 FLAVOR=DVD ARCH=x86_64 TEST=simple_boot \
BUILD="test" _GROUP_ID="0" \
FOO=BAR FOO=BOO
Actions #3

Updated by tinita 4 months ago

  • Project changed from openQA Tests (public) to openQA Project (public)
  • Category set to Regressions/Crashes
  • Target version set to Ready
Actions #4

Updated by jbaier_cz 4 months ago

  • Description updated (diff)
Actions #5

Updated by tinita 4 months ago

  • Description updated (diff)
Actions #6

Updated by tinita 4 months ago

  • Description updated (diff)
Actions #7

Updated by livdywan 4 months ago

  • Subject changed from [tools] failed to open the Scheduled product link of the sle-micro test to [tools] failed to open the Scheduled product link of the sle-micro test size:S
  • Description updated (diff)
Actions #8

Updated by jbaier_cz 4 months ago

  • Status changed from New to Workable
Actions #9

Updated by okurz 4 months ago

  • Priority changed from Normal to Low
Actions #10

Updated by robert.richardson 3 months ago

  • Status changed from Workable to In Progress
  • Assignee set to robert.richardson
Actions #12

Updated by okurz 3 months ago

  • Status changed from In Progress to Resolved
Actions #13

Updated by tinita 3 months ago

What about the other ACs?

Actions #14

Updated by okurz 3 months ago

  • Status changed from Resolved to Feedback

Ok, please cross-check those

Actions #16

Updated by okurz 3 months ago ยท Edited

If I do openqa-cli api --osd -X post jobs TEST=okurz-poo166154 TEST=foo FOO=BAR FOO=BOO then we get https://openqa.suse.de/tests/15692683#settings with

FOO     {"BAR","BOO"}
NAME    15692683-__okurz-poo166154___foo__
TEST    {"okurz-poo166154","foo"}

and the settings page of tests details have no problem rendering that.

What we want instead is stringified JSON compatible arrays

FOO     ["BAR","BOO"]
NAME    15692683-__okurz-poo166154___foo__
TEST    ["okurz-poo166154","foo"]

@robert.richardson we suggest you debug a unit test or a manually started openQA webUI instance and follow the data stream and ensure that data is not "magically" transformed.

Actions #18

Updated by okurz 3 months ago

  • Status changed from Feedback to In Progress

set back to "In Progress" as you are working on this regarding AC3

Updated by robert.richardson 3 months ago

Currently multiple values for a field are displayed in inconsistent way, some fields such as e.g. WORKER_CLASS are not correctly displayed at all if they contain multiple values
array worker class
To reproduce this, call openqa-cli api --host "http://localhost:9526" -X post jobs TEST=okurz-poo166154 TEST=foo FOO=BAR FOO=BOO WORKER_CLASS=FOO WORKER_CLASS=BAR

In regards to AC3 we have decided to not throw an error or warning to the client and instead use JSON syntax to handle such values consistently
array with changes applied

Actions #20

Updated by robert.richardson 2 months ago

  • Status changed from In Progress to Feedback
Actions #21

Updated by robert.richardson 2 months ago

  • Status changed from Feedback to Resolved

PR is merged

Actions

Also available in: Atom PDF