Bug 1258927 - UI: Reports explorer rebuilds trees on every transaction after Queue Report button is pressed once in UI.
UI: Reports explorer rebuilds trees on every transaction after Queue Report b...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS (Show other bugs)
5.4.0
Unspecified Unspecified
high Severity high
: GA
: 5.5.0
Assigned To: Harpreet Kataria
Pete Savage
: ZStream
Depends On:
Blocks: 1258933
  Show dependency treegraph
 
Reported: 2015-09-01 10:25 EDT by Harpreet Kataria
Modified: 2015-12-08 08:29 EST (History)
7 users (show)

See Also:
Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1258933 (view as bug list)
Environment:
Last Closed: 2015-12-08 08:29:08 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Harpreet Kataria 2015-09-01 10:25:44 EDT
Description of problem: Reports explorer rebuilds trees on every transaction after Queue Report button is pressed once in UI.


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


How reproducible: 100%


Steps to Reproduce:
1. Go to Reports Explorer
2. Press "Queue" button to run a report
3. After that Reports explorer rebuilds trees in Reports explorer on each transaction. 

Actual results: Trees are being rebuilt on each transaction


Expected results: Trees should only be rebuilt when there is a new report result record in the database that was created after the trees were built last time.


Additional info: This can be verified by the time each transaction took before/after the fix.
Comment 2 CFME Bot 2015-09-02 10:20:19 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/1137496321b6cf4d1c77c3d332e690609a7498ad

commit 1137496321b6cf4d1c77c3d332e690609a7498ad
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Tue Sep 1 11:05:19 2015 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Tue Sep 1 13:37:34 2015 -0400

    Fixed code to not rebuild trees on each transaction in reports explorer
    
    - Fixed code that was rebuilding reports trees on every transaction after user pressed Queue report to run button once in UI, code was not setting rep_tree_build_time correctly in some of the places, removed setting of rep_tree_build_time from other places in code and moved it into rebuild_trees method.
    - added spec tests around rebuild_trees method and replace_right_cell method to verify changes.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1258927
    https://bugzilla.redhat.com/show_bug.cgi?id=1258933

 app/controllers/report_controller.rb               |   8 +-
 app/controllers/report_controller/menus.rb         |   1 -
 app/controllers/report_controller/reports.rb       |   2 -
 .../report_controller/reports/editor.rb            |   1 -
 app/controllers/report_controller/saved_reports.rb |   1 -
 spec/controllers/report_controller_spec.rb         | 100 +++++++++++++++++++++
 6 files changed, 105 insertions(+), 8 deletions(-)
Comment 3 CFME Bot 2015-09-03 15:29:24 EDT
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=ae9fd1fd0104d0f87bc9d4b47e675c14c714d1ee

commit ae9fd1fd0104d0f87bc9d4b47e675c14c714d1ee
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Wed Sep 2 12:51:57 2015 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Thu Sep 3 14:19:52 2015 -0400

    Fixed code to not rebuild trees on each transaction in reports explorer
    
    - Fixed code that was rebuilding reports trees on every transaction after user pressed Queue report to run button once in UI, code was not setting rep_tree_build_time correctly in some of the places, removed setting of rep_tree_build_time from other places in code and moved it into rebuild_trees method.
    - added spec tests around rebuild_trees method and replace_right_cell method to verify changes.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1258927
    https://bugzilla.redhat.com/show_bug.cgi?id=1258933

 vmdb/app/controllers/report_controller.rb          |   8 +-
 vmdb/app/controllers/report_controller/menus.rb    |   1 -
 vmdb/app/controllers/report_controller/reports.rb  |   2 -
 .../report_controller/reports/editor.rb            |   1 -
 .../controllers/report_controller/saved_reports.rb |   1 -
 vmdb/spec/controllers/report_controller_spec.rb    | 100 +++++++++++++++++++++
 6 files changed, 105 insertions(+), 8 deletions(-)
Comment 4 CFME Bot 2015-09-03 15:29:30 EDT
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=ad38ad1a150c9fb4b2f89bce48571883a33c3212

commit ad38ad1a150c9fb4b2f89bce48571883a33c3212
Merge: 43eda55 ae9fd1f
Author:     Dan Clarizio <dclarizi@redhat.com>
AuthorDate: Thu Sep 3 15:26:27 2015 -0400
Commit:     Dan Clarizio <dclarizi@redhat.com>
CommitDate: Thu Sep 3 15:26:27 2015 -0400

    Merge branch '54z_bz_1258933' into '5.4.z'
    
    Fixed code to not rebuild trees on each transaction in reports explorer
    
    - Fixed code that was rebuilding reports trees on every transaction after user pressed Queue report to run button once in UI, code was not setting rep_tree_build_time correctly in some of the places, removed setting of rep_tree_build_time from other places in code and moved it into rebuild_trees method.
    - added spec tests around rebuild_trees method and replace_right_cell method to verify changes.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1258927
    https://bugzilla.redhat.com/show_bug.cgi?id=1258933
    
    @dclarizio please review, clean patch was applied.
    Original PR: https://github.com/ManageIQ/manageiq/pull/4149
    
    See merge request !242

 vmdb/app/controllers/report_controller.rb          |   8 +-
 vmdb/app/controllers/report_controller/menus.rb    |   1 -
 vmdb/app/controllers/report_controller/reports.rb  |   2 -
 .../report_controller/reports/editor.rb            |   1 -
 .../controllers/report_controller/saved_reports.rb |   1 -
 vmdb/spec/controllers/report_controller_spec.rb    | 100 +++++++++++++++++++++
 6 files changed, 105 insertions(+), 8 deletions(-)
Comment 6 CFME Bot 2015-09-08 18:02:26 EDT
Detected commit referencing this ticket while ticket status is POST.
Comment 8 CFME Bot 2015-09-08 18:03:56 EDT
Detected commit referencing this ticket while ticket status is POST.
Comment 10 CFME Bot 2015-09-08 18:04:52 EDT
Detected commit referencing this ticket while ticket status is POST.
Comment 11 Pete Savage 2015-10-05 11:00:34 EDT
Can you please give information on how we can verify that the tree is/is not being rebuilt. Do we have click on the reload/refresh button?
Comment 12 Harpreet Kataria 2015-10-19 11:47:57 EDT
Pete,

This is more of a performance fix, you will not see any visible UI changes. In Order to recreate: Create a Report then Queue the report to run. After this step you can go to Reports editor and change tabs, then in log verify before/after times should differ. Before it was building tree on each transaction and now it only rebuilds the tree when it needs to.

After Queuing a report you should see each click in Reports explorer will take longer time to load the screen before the fix. Let me know if you have more questions.

Thanks,
~Harpreet
Comment 13 Pete Savage 2015-10-26 17:13:22 EDT
I believe this is fixed in 5.5.0.7
Comment 15 errata-xmlrpc 2015-12-08 08:29:08 EST
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/RHSA-2015:2551

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