action #166676
closedRender valid URL links in WebUI autoinst-log size:S
0%
Description
Observation¶
the autoinst logs do not render valid URL links.
The reason hides in the Anser.linkify
. Which requires whitespaces between urls. The produced links also are incorrect when one is directly following another one.
[2024-09-12T08:54:16.658128Z] [info] [pid:37912] ::: OpenQA::Isotovideo::Utils::_fetch_new_refs: Updating Git cache for 'https://github.com/os-autoinst/os-autoinst-distri-openQA' under '/var/lib/openqa/cache/git//os-autoinst/os-autoinst-distri-openQA'
The quotes in this case end up as part of the linkification.
To reproduce¶
go to https://openqa.opensuse.org/tests/overview?distri=openqa&version=Tumbleweed&groupid=24
goto openqa_from_git autoinst-log.txt and check every link (git repos)
you will see something like
or
We noticed this in Clone.pm mainly
not sure how some URL conventions should be handled here or what improvement can be considered
Acceptance Criteria¶
- AC1: Only URLs from logs are linkified
- AC2: os-autoinst logs produce URLs that can reliably be linkified by the web UI
Suggestions¶
- Use double quotes consistently around URLs (or no quotes at all) and ensure that the URL is rendered correctly without the
"
character included in the link- the fact is double quote can't be in the URL (needs to be escaped everytime), single quotes can be in URL in unescaped form (however are usually escaped)
- Fix anser or use linkify or our own implementation
- Regarding links in autoinst-log.txt try out the rendering in terminal emulators
Files
Updated by ybonatakis 2 months ago
https://github.com/os-autoinst/os-autoinst/pull/2544 submitted but we want to check alternatives
Updated by ybonatakis 2 months ago
- Subject changed from render valid URL links in os-autoinst.log to render valid URL links in autoinst-log.txt
Updated by ybonatakis 2 months ago
- Subject changed from render valid URL links in autoinst-log.txt to render valid URL links in WebUI autoinst-log
Updated by tinita 2 months ago
- Status changed from New to In Progress
- Assignee set to tinita
- Target version changed from Tools - Next to Ready
https://github.com/os-autoinst/openQA/pull/5920 Fix linkify to only link to proper URLs
Updated by ybonatakis 2 months ago
tinita wrote in #note-5:
https://github.com/os-autoinst/openQA/pull/5920 Fix linkify to only link to proper URLs
https://github.com/os-autoinst/os-autoinst/pull/2544 updated as well. As a note the .txt still "linkify" some URLs wrong but it is not on us. they are coming from git output.
Updated by tinita 2 months ago
We also do git operations in openQA: https://github.com/os-autoinst/openQA/pull/5922 Use double quotes for quoting links
Updated by ybonatakis 2 months ago
Updated by ybonatakis 2 months ago
https://github.com/os-autoinst/os-autoinst/pull/2544 updated.
- commit message
- quote missing variable
Updated by okurz 2 months ago
- Status changed from Feedback to Workable
In https://openqa.opensuse.org/tests/4482790/logfile?filename=autoinst-log.txt I found
OpenQA::Isotovideo::Utils::_fetch_new_refs: Updating Git cache for 'https://github.com/os-autoinst/os-autoinst-distri-openQA' under '/var/lib/openqa/cache/git//os-autoinst/os-autoinst-distri-openQA'
where the final '
is erroneously included in the link. On https://openqa.opensuse.org/tests/4482790/logfile?filename=worker-log.txt I found
[2024-09-16T08:01:10.032960Z] [error] REST-API error (POST https://openqa.opensuse.org/api/v1/jobs/4482790/status): Connection error: Premature connection close (remaining tries: 59)
where ):
is erroneously included in the link. About 30 other links that I found are fine.
Updated by tinita 2 months ago
Those are actually correct, as '
, :
and ()
can be part of urls.
We should add double quotes: here https://github.com/os-autoinst/os-autoinst/pull/2544#pullrequestreview-2306241987 and for the REST-API error
Updated by okurz 2 months ago
tinita wrote in #note-16:
Those are actually correct, as
'
,:
and()
can be part of urls.
I know, they are technically correctly rendered but we still want working links
We should add double quotes: here https://github.com/os-autoinst/os-autoinst/pull/2544#pullrequestreview-2306241987 and for the
REST-API error
Updated by tinita about 2 months ago
For the remaining places @okurz found:
Updated by okurz about 2 months ago
- Status changed from Feedback to Resolved
Both PRs merged. That should suffice
Updated by tinita about 2 months ago
- Related to action #108554: [ux][ui] Wrong formatting on some links in single quotes includes trailing quotes to the link added
Updated by tinita about 2 months ago
- Status changed from Resolved to Workable
anser has been updated with my fix, so we can remove my workaround: https://github.com/os-autoinst/openQA/pull/5954
Updated by okurz about 2 months ago
- Status changed from Workable to Feedback
removing workaround
https://github.com/os-autoinst/openQA/pull/5960
Updated by okurz about 2 months ago
- Status changed from Feedback to Resolved
- Assignee changed from okurz to tinita
merged