Project

General

Profile

Actions

action #166676

closed

Render valid URL links in WebUI autoinst-log size:S

Added by ybonatakis 2 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2024-09-11
Due date:
% Done:

0%

Estimated time:
Tags:

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


Related issues 1 (1 open0 closed)

Related to openQA Project - action #108554: [ux][ui] Wrong formatting on some links in single quotes includes trailing quotes to the linkNew2022-03-18

Actions
Actions #1

Updated by ybonatakis 2 months ago

  • Description updated (diff)
Actions #2

Updated by ybonatakis 2 months ago

https://github.com/os-autoinst/os-autoinst/pull/2544 submitted but we want to check alternatives

Actions #3

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
Actions #4

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
Actions #5

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

Actions #6

Updated by tinita 2 months ago

  • Status changed from In Progress to Feedback
Actions #7

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.

Actions #8

Updated by tinita 2 months ago

ybonatakis wrote in #note-7:

As a note the .txt still "linkify" some URLs wrong but it is not on us. they are coming from git output.

Can you link to an example?

Actions #9

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

Actions #10

Updated by ybonatakis 2 months ago

tinita wrote in #note-8:

ybonatakis wrote in #note-7:

As a note the .txt still "linkify" some URLs wrong but it is not on us. they are coming from git output.

Can you link to an example?

Actions #11

Updated by livdywan 2 months ago

  • Subject changed from render valid URL links in WebUI autoinst-log to render valid URL links in WebUI autoinst-log size:S
  • Description updated (diff)
Actions #12

Updated by ybonatakis 2 months ago

https://github.com/os-autoinst/os-autoinst/pull/2544 updated.

  • commit message
  • quote missing variable
Actions #13

Updated by tinita 2 months ago

All three PRs merged. Some already deployed.

Actions #14

Updated by tinita 2 months ago

  • Subject changed from render valid URL links in WebUI autoinst-log size:S to Render valid URL links in WebUI autoinst-log size:S
Actions #15

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.

Actions #16

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

Actions #17

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

Actions #19

Updated by tinita about 2 months ago

  • Status changed from Workable to Feedback
Actions #20

Updated by okurz about 2 months ago

  • Status changed from Feedback to Resolved

Both PRs merged. That should suffice

Actions #21

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
Actions #22

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

Actions #23

Updated by okurz about 2 months ago

  • Assignee changed from tinita to okurz
Actions #24

Updated by okurz about 2 months ago

  • Status changed from Workable to Feedback
Actions #25

Updated by okurz about 2 months ago

  • Status changed from Feedback to Resolved
  • Assignee changed from okurz to tinita

merged

Actions

Also available in: Atom PDF