Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

[BZ#1677677] Fatal Error in Mapping Wizard: When mapping more than one source cluster, cannot switch between clusters on storage step #1032

Closed
mturley opened this issue Sep 12, 2019 · 1 comment · Fixed by #1033
Labels
bug bz Issues filed by QE or having a BZ
Projects

Comments

@mturley
Copy link
Contributor

mturley commented Sep 12, 2019

Associated RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1677677

I observed this bug while testing #1030, but it also appears to be present on master.

  1. Open the Create Infrastructure Mapping wizard.
  2. On the "Map Compute" step, add mappings for at least two different source clusters.
  3. Proceed to the "Map Storage" step, and try to select a cluster in the dropdown.
  4. An error appears, the cluster is not selected, and you cannot proceed.

alUZOvWrVR

Screenshot 2019-09-12 16 24 55

The line that is causing the error is here: https://github.com/ManageIQ/manageiq-v2v/blob/master/app/javascript/react/screens/App/Mappings/screens/MappingWizard/components/MappingWizardDatastoresStep/MappingWizardDatastoresStep.js#L109
Apparently, there is an issue with the reference to this.setState being set as a default parameter value in the function definition, which is causing React to get confused about this internally.

The fix is pretty simple (use this.setState directly in the method body instead of assigning it and calling it by reference), but (a) I don't really understand why it doesn't work as written, and (b) I don't know why we're only seeing this now, I'm pretty sure it was working fine when that code was introduced in #796.

@himdel, @mzazrivec , @Hyperkid123 .. would you guys mind helping me figure out what's going on here and identify which ManageIQ releases are affected? I imagine we should also make sure QE is testing this wizard with more than one source cluster.. I'm surprised we didn't catch it sooner. I'll post a PR shortly to fix the bug, but I'm not sure how to proceed with damage control here.

@mturley mturley added this to Backlog in v2v UI via automation Sep 12, 2019
@mturley
Copy link
Contributor Author

mturley commented Sep 12, 2019

Maybe this started happening at some earlier React version upgrade? I'm having trouble getting my local dev environment working on older versions at the moment.

@mturley mturley assigned mturley and unassigned mturley Sep 12, 2019
mturley added a commit to mturley/manageiq-v2v that referenced this issue Sep 12, 2019
@mturley mturley added bz Issues filed by QE or having a BZ and removed bugzilla needed labels Sep 16, 2019
@mturley mturley changed the title Fatal Error in Mapping Wizard: When mapping more than one source cluster, cannot switch between clusters on storage step [BZ#1677677] Fatal Error in Mapping Wizard: When mapping more than one source cluster, cannot switch between clusters on storage step Sep 17, 2019
v2v UI automation moved this from Backlog to Done Sep 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug bz Issues filed by QE or having a BZ
Projects
v2v UI
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant