Bug 1949459

Summary: Web console crashes if 10+ migration plans are created and the browser is refreshed
Product: Migration Toolkit for Containers Reporter: Sergio <sregidor>
Component: UIAssignee: John Matthews <jmatthew>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: medium Docs Contact: Avital Pinnick <apinnick>
Priority: unspecified    
Version: 1.4.3CC: dagur, ernelson, ibolton, rjohnson, whu, xjiang
Target Milestone: ---   
Target Release: 1.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-28 04:08:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sergio 2021-04-14 10:31:07 UTC
Description of problem:
When there are too many migration plans created, and we try to see the migration details of a single plan, if the browser is refreshed and we try to see the migration resources, the UI crashes and becomes blank


Version-Release number of selected component (if applicable):
MTC 1.4.3
Browser: Chrome Version 89.0.4389.90 (Official Build) (64-bit)

How reproducible:
Always

Steps to Reproduce:
1. Create 10 or 20 migration plans, we don't need to execute them and they don't need to be in "Ready" status, they only need to be there.

2. In any migration plan, click on the "0" displayed in the "Migrations" column.

A new screen is displayed, it says "No migrations started" (if we didn't run the plans).

There is a section in the screen saying "Migration plan resources" that can be clicked.

3. Press F5 to refresh the browser

4. The "No migrations started" text will disappear for a long while (the more plans are created in step 1, the longer it will take to show the text). Click on "Migration plan resources" BEFORE the "No migrations started" message is shown.

Actual results:
The UI crashes and the screen goes blank. This error is shown in the browser's console:

TypeError: Cannot read property 'PlanStatus' of undefined
    at Object.t.getPlanStatusText (app.bundle.js:2)
    at t.default (app.bundle.js:2)
    at ci (app.bundle.js:2)
    at Br (app.bundle.js:2)
    at bs (app.bundle.js:2)
    at Ms (app.bundle.js:2)
    at Os (app.bundle.js:2)
    at hs (app.bundle.js:2)
    at app.bundle.js:2
    at t.unstable_runWithPriority (app.bundle.js:2)

Expected results:
The UI should not crash

Additional info:

Comment 1 Ian 2021-04-16 13:54:30 UTC
Closed via https://github.com/konveyor/mig-ui/pull/1163

Comment 7 whu 2021-06-25 10:14:18 UTC
Due to in MTC 1.5.0. the layout of webpage  was changed a little. 
The "Migration plan resources" section does not exist any more in Migrations page if this migplan has not run.

So the step2 is invalid any more. 

But a new bug is found about "Migration details" page refresh. it's https://bugzilla.redhat.com/show_bug.cgi?id=1976136

Comment 13 errata-xmlrpc 2021-07-28 04:08:04 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 (Migration Toolkit for Containers (MTC) image release advisory 1.5.0), 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:2929