Bug 1953938 - Text of migration concerns in VM selection page does not render line breaks ('\n')
Summary: Text of migration concerns in VM selection page does not render line breaks (...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Virtualization
Classification: Red Hat
Component: General
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 2.0.0
Assignee: Fabien Dupont
QA Contact: Amos Mastbaum
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-27 08:55 UTC by Maayan Hadasi
Modified: 2021-06-10 17:11 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-10 17:11:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
mini-rhel7⁄mguetta (94.37 KB, image/png)
2021-04-27 08:55 UTC, Maayan Hadasi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2021:2381 0 None None None 2021-06-10 17:11:57 UTC

Description Maayan Hadasi 2021-04-27 08:55:35 UTC
Created attachment 1775878 [details]
mini-rhel7⁄mguetta

Description of problem:
The validation returns a multiline string, i.e. with "\n", for the concern message in "Select VMs for migration" stage, but the new line is not reflected in UI (attached image)
The UI should reflect it OR the validation service should be changed to return a single line


Version-Release number of selected component (if applicable):
MTV-2.0.0-20 (iib 69034)


How reproducible:
100%


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Fabien Dupont 2021-04-27 09:29:14 UTC
@vconzola do you think multiline concern description would be fine? Or should we ensure that it's single line?

Comment 2 vconzola 2021-04-27 17:22:21 UTC
@fdupont Multi-line descriptions are fine, but looking at the screenshot it appears they're already supported. I don't understand the issue.

Comment 3 Fabien Dupont 2021-05-10 09:40:27 UTC
The issue is that the message provided by the validation service contains "\n\t" and the critical concern should show a list of criteria like below:

Kubernetes only supports names that follow DNS subdomain name as defined in RFC 1123. This means that the name must:
    - contain no more than 64 characters
    - contain only lowercase alphanumeric characters or '-'
    - state with an alphanumeric character
    - end with an alphanumeric character

The new line and tabulation should be respected by the UI.

Comment 4 Avital Pinnick 2021-05-10 11:15:20 UTC
The current error message is rather long. Perhaps the text could be replaced by the VM name description in OCP docs:

"The VM name can contain lowercase letters (a-z), numbers (0-9), and hyphens (-), up to a maximum of 64 characters. The first and last characters must be alphanumeric. The name must not contain uppercase letters, spaces, periods (.), or special characters."

I am not sure we need a reference to RFC 1123. Replacing the list with sentences would solve the problem of the non-rendering '\n\t'.

Comment 5 Igor Braginsky 2021-05-10 11:47:24 UTC
I guess it is OK to reference RFC 1123, but also it is OK to put everything in one long sentence to avoid making list with `\n` for new lines

Comment 6 Fabien Dupont 2021-05-11 07:31:04 UTC
I've created this pull request: https://github.com/konveyor/forklift-validation/pull/24. Would you mind reviewing?

Comment 7 Avital Pinnick 2021-05-11 09:29:22 UTC
(In reply to Fabien Dupont from comment #6)
> I've created this pull request:
> https://github.com/konveyor/forklift-validation/pull/24. Would you mind
> reviewing?

I am not sure who you wanted to review the text because there was no need_info set. 

I left a comment on the PR suggesting the following text:

"assessment": "The VM name must comply with the DNS subdomain name format defined in RFC 1123. The name can contain lowercase letters (a-z), numbers (0-9), and hyphens (-), up to a maximum of 64 characters. The first and last characters must be alphanumeric. The name must not contain uppercase letters, spaces, periods (.), or special characters."

Comment 8 Amos Mastbaum 2021-05-18 10:20:37 UTC
build 2.0.0-15 / iib:75270

Comment 11 errata-xmlrpc 2021-06-10 17:11:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (MTV 2.0.0 images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:2381


Note You need to log in before you can comment on or make changes to this bug.