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:
Think the UI is simply missing a validation that rejects a hook before creation if it has an invalid value. Need to add this.
https://github.com/konveyor/mig-ui/pull/876
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 "-".
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