Bug 1839077 - [MIG-UI] Forbidden executionNamespace names break the edit UI screen and they cannot be fixed
Summary: [MIG-UI] Forbidden executionNamespace names break the edit UI screen and they...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Migration Tooling
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.4.0
Assignee: Erik Nelson
QA Contact: Xin jiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-22 12:49 UTC by Sergio
Modified: 2020-05-28 11:11 UTC (History)
9 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:2326 0 None None None 2020-05-28 11:11:15 UTC

Description Sergio 2020-05-22 12:49:33 UTC
Description of problem:
When we create a hook and configure a executionNamespace with a forbidden name (with spaces, for instance) the migration plan show a critical condition. We cannot edit the migration plan to fix this error, since this critical condition breaks the edit screen before we can reach the hooks screen.

Version-Release number of selected component (if applicable):
CAM 1.2 stage

How reproducible:
Always

Steps to Reproduce:
1. Create a migration plan
2. In the hook screen click on "Add Hook"
3. Fill in the form, and in the field "Service account namespace" use a value with spaces, for instance at the beginning, like that: '     namespacewithspaces'
4. Click "Add hook" and "Finish"
5. The migration plan will show a critical condition
      message: The executionNamespace specified is invalid, DNS-1123 label regex used
        for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?'.
6. Click on "Edit" in order to edit the migration plan's problem with the executionNamespace value
7. Try to fix the value you entered in step 3

Actual results:
The edit screen will fail before you can reach the "hooks" screen to fix the wrong value.

Expected results:
We should be able to edit the plan and fix the wrong value that we used when we created the plan.

Additional info:

Comment 1 Erik Nelson 2020-05-22 13:44:57 UTC
Think the UI is simply missing a validation that rejects a hook before creation if it has an invalid value. Need to add this.

Comment 2 Erik Nelson 2020-05-22 17:48:16 UTC
https://github.com/konveyor/mig-ui/pull/876

Comment 3 Sergio 2020-05-26 15:01:17 UTC
Verified in 1.2 CAM stage
openshift-migration-ui-rhel8@sha256:7475399a5d660fdc3fb89c94cc3984b347d6e2ad0c4119836cf2957907be700e

The field is validated and no wrong names are allowed. This warning is shown when a wrong name is introduced:

Invalid character: "xxx ". Name must be DNS-1123 label compliant, starting and ending with a lowercase alphanumeric character and containing only lowercase alphanumeric characters, "." or "-".

Comment 6 errata-xmlrpc 2020-05-28 11:10: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, 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-2020:2326


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