action #166154
Updated by livdywan 8 months ago
## 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. 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:**: **AC2:**: When scheduling, repeated settings (settings that are specified multiple times) are handled in a way that makes sense (e.g. the last setting wins), sense, 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. client