Bug 1594387 - Unable to download largest chargeback report on production
Summary: Unable to download largest chargeback report on production
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.8.5
Assignee: Nick LaMuro
QA Contact: Nandini Chandra
URL:
Whiteboard:
Depends On: 1590908
Blocks: 1595269
TreeView+ depends on / blocked
 
Reported: 2018-06-22 19:29 UTC by Satoe Imaishi
Modified: 2021-12-10 16:49 UTC (History)
9 users (show)

Fixed In Version: 5.8.5.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1590908
Environment:
Last Closed: 2018-09-26 18:36:47 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:2745 0 None None None 2018-09-26 18:37:41 UTC

Comment 2 CFME Bot 2018-06-22 19:41:31 UTC
New commits detected on ManageIQ/manageiq/fine:

https://github.com/ManageIQ/manageiq/commit/d1177fd98c4f3fbc1825c9a432bb92017bc99d6e
commit d1177fd98c4f3fbc1825c9a432bb92017bc99d6e
Author:     Joe Rafaniello <jrafanie.github.com>
AuthorDate: Mon Jun 18 15:05:17 2018 -0400
Commit:     Joe Rafaniello <jrafanie.github.com>
CommitDate: Mon Jun 18 15:05:17 2018 -0400

    Merge pull request #17590 from NickLaMuro/faster_saved_report_methods

    Add faster MiqReportResult helper methods for viewing saved report results
    (cherry picked from commit dbf6596ca6903a4c7d30cc16fe9f137db9a6a026)

    https://bugzilla.redhat.com/show_bug.cgi?id=1594387

 app/models/miq_report_result.rb | 14 +
 1 file changed, 14 insertions(+)


https://github.com/ManageIQ/manageiq/commit/7a3b8d247c77be02fea51c622466aa457c081052
commit 7a3b8d247c77be02fea51c622466aa457c081052
Author:     Nick Carboni <ncarboni>
AuthorDate: Mon Jun 18 16:09:05 2018 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Mon Jun 18 16:09:05 2018 -0400

    Merge pull request #17589 from jrafanie/remove_grouping_from_report_results

    Add tool to remove grouping from report results
    (cherry picked from commit c36370d2a19196d780c2bfc3ec632955473236e8)

    https://bugzilla.redhat.com/show_bug.cgi?id=1594387

 tools/remove_grouping_from_report_results.rb | 63 +
 1 file changed, 63 insertions(+)


https://github.com/ManageIQ/manageiq/commit/49df80e32e4ebf2646b5cd759430e5db3df29d7e
commit 49df80e32e4ebf2646b5cd759430e5db3df29d7e
Author:     Nick Carboni <ncarboni>
AuthorDate: Mon Jun 18 18:03:39 2018 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Mon Jun 18 18:03:39 2018 -0400

    Merge pull request #17598 from NickLaMuro/prevent_groupings_from_being_saved_on_report_results

    Add save hooks on MiqReportResult to remove groupings
    (cherry picked from commit 28dc33781dbe888dd8b0aaff4ada7af070891f7e)

    https://bugzilla.redhat.com/show_bug.cgi?id=1594387

 app/models/miq_report_result.rb | 14 +
 spec/models/miq_report_result_spec.rb | 17 +
 2 files changed, 31 insertions(+)


https://github.com/ManageIQ/manageiq/commit/44dd61ae10c84b4cd6d07bf69a70d8282b0b1358
commit 44dd61ae10c84b4cd6d07bf69a70d8282b0b1358
Author:     Joe Rafaniello <jrafanie.github.com>
AuthorDate: Mon Jun 18 21:49:59 2018 -0400
Commit:     Joe Rafaniello <jrafanie.github.com>
CommitDate: Mon Jun 18 21:49:59 2018 -0400

    Merge pull request #17605 from NickLaMuro/fix_specs_and_issues_from_miq_report_result_save_hooks

    Add `nil` check for report.extras on save hooks
    (cherry picked from commit 8a6adec06ba3fda7efc37fb42ca2af1ea44e6b92)

    https://bugzilla.redhat.com/show_bug.cgi?id=1594387

 app/models/miq_report_result.rb | 4 +-
 1 file changed, 2 insertions(+), 2 deletions(-)

Comment 4 CFME Bot 2018-06-26 13:23:29 UTC
New commits detected on ManageIQ/manageiq-ui-classic/fine:

https://github.com/ManageIQ/manageiq-ui-classic/commit/64f8b1f07e8fe088778419d88145c0b7cf82fb62
commit 64f8b1f07e8fe088778419d88145c0b7cf82fb62
Author:     Nick LaMuro <nicklamuro>
AuthorDate: Thu Jun 14 17:43:10 2018 -0400
Commit:     Nick LaMuro <nicklamuro>
CommitDate: Thu Jun 14 17:43:10 2018 -0400

    [FINE] Prefer valid_report_column? and contains_records? from MiqReportResult

    https://bugzilla.redhat.com/show_bug.cgi?id=1594387

    Gaprindashvili Backport commit from:

        https://github.com/ManageIQ/manageiq-ui-classic/pull/4143

    Original SHA:

       ff7ee24f4d50b38e96d5c0eccd8ca7398d6d310e

    Rest of original message below...

    * * *

    These are new methods added in:

    https://github.com/ManageIQ/manageiq/pull/17590

    And are far more efficient for the use cases of ChargebackController and
    ReportController::SavedReports.

 app/controllers/chargeback_controller.rb | 5 +-
 app/controllers/report_controller/saved_reports.rb | 5 +-
 spec/controllers/chargeback_controller_spec.rb | 3 +-
 spec/controllers/miq_report_controller/trees_spec.rb | 9 +-
 4 files changed, 12 insertions(+), 10 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/adba577026db89dd78ef7f1ce3a7a1d45f4f63f5
commit adba577026db89dd78ef7f1ce3a7a1d45f4f63f5
Author:     Nick LaMuro <nicklamuro>
AuthorDate: Thu Jun 14 17:52:53 2018 -0400
Commit:     Nick LaMuro <nicklamuro>
CommitDate: Thu Jun 14 17:52:53 2018 -0400

    [FINE] Prefer `.exists?` over `.length?` in report button helpers

    https://bugzilla.redhat.com/show_bug.cgi?id=1594387

    Gaprindashvili Backport commit from:

        https://github.com/ManageIQ/manageiq-ui-classic/pull/4143

    Original SHA:

       cb118f0c34462eca296e460d7b01cee29b51066c

    Rest of original message below...

    * * *

    Calls to `.length` will fetch the entire record set or rows for the
    MiqReportResult, and in the current case of these button helpers, throw
    them all away without using any of the data fetched.  In most cases, the
    `html_details` relation is probably what was is being used, so even
    caching these ahead of time is wasteful.

    By using `.exists?` as an alternative, we basically do a:

      SELECT 1 as one
      FROM miq_report_result_details
      WHERE "miq_report_result_details"."miq_report_result_id" = ?
      LIMIT 1

    Which only returns a single digit from the database if it has at least
    one record and nothing if it doesn't.  This will also be cached in a
    controller action by the ActiveRecord query cache, so it will also
    require zero queries the second time around.

 app/helpers/application_helper/button/report_download_choice.rb | 2 +-
 app/helpers/application_helper/button/report_only.rb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/02fd904d1d10adfcdb5a06efa82f1110780edf8c
commit 02fd904d1d10adfcdb5a06efa82f1110780edf8c
Author:     Nick LaMuro <nicklamuro>
AuthorDate: Thu Jun 14 18:34:52 2018 -0400
Commit:     Nick LaMuro <nicklamuro>
CommitDate: Thu Jun 14 18:34:52 2018 -0400

    [FINE] Prefer `rr.report` over `rr.report_results` in SavedReportPaging mixin

    https://bugzilla.redhat.com/show_bug.cgi?id=1594387

    Gaprindashvili Backport commit from:

        https://github.com/ManageIQ/manageiq-ui-classic/pull/4143

    Original SHA:

       b5260fd3dff13c9aa0cf7593518bfb557c07c420

    Rest of original message below...

    * * *

    This not only makes it so we are consistent between the main controller
    and the mixin, but this is also much faster to use this over
    `MiqReportResult#report_results` when there is a large `binary_blob`
    associated with the `MiqReportResult` record.

 app/controllers/application_controller.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 7 Nandini Chandra 2018-08-23 19:04:39 UTC
Verified that the code is present in 5.8.5

Comment 9 errata-xmlrpc 2018-09-26 18:36: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/RHSA-2018:2745


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