New commits detected on ManageIQ/manageiq/gaprindashvili: https://github.com/ManageIQ/manageiq/commit/ee76f422c42f513122f0a379ea8c70bc65804cef commit ee76f422c42f513122f0a379ea8c70bc65804cef 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=1594386 app/models/miq_report_result.rb | 14 + 1 file changed, 14 insertions(+) https://github.com/ManageIQ/manageiq/commit/c98aecd9674a05a0afc9ee0987f60ff91d0acd6d commit c98aecd9674a05a0afc9ee0987f60ff91d0acd6d 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=1594386 tools/remove_grouping_from_report_results.rb | 63 + 1 file changed, 63 insertions(+) https://github.com/ManageIQ/manageiq/commit/d80c21a173aea3c0249dbea0ba0039428d44290d commit d80c21a173aea3c0249dbea0ba0039428d44290d 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=1594386 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/b7b13357292eb7b052ad429894ec941ecff3a3d0 commit b7b13357292eb7b052ad429894ec941ecff3a3d0 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=1594386 app/models/miq_report_result.rb | 4 +- 1 file changed, 2 insertions(+), 2 deletions(-)
https://github.com/ManageIQ/manageiq-ui-classic/pull/4204
New commits detected on ManageIQ/manageiq-ui-classic/gaprindashvili: https://github.com/ManageIQ/manageiq-ui-classic/commit/68cf0da7c79f75f0e0e9f697a4f574c9e973465b commit 68cf0da7c79f75f0e0e9f697a4f574c9e973465b 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 [GAP] Prefer valid_report_column? and contains_records? from MiqReportResult https://bugzilla.redhat.com/show_bug.cgi?id=1594386 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 | 16 +- spec/controllers/report_controller_spec.rb | 10 +- 5 files changed, 24 insertions(+), 15 deletions(-) https://github.com/ManageIQ/manageiq-ui-classic/commit/d3d0c445078c454b49bfb2fce744cab07c7579bb commit d3d0c445078c454b49bfb2fce744cab07c7579bb 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 [GAP] Prefer `rr.report` over `rr.report_results` in SavedReportPaging mixin https://bugzilla.redhat.com/show_bug.cgi?id=1594386 Gaprindashvili Backport commit from: https://github.com/ManageIQ/manageiq-ui-classic/pull/4143 Original SHA: cb118f0c34462eca296e460d7b01cee29b51066c 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/mixins/saved_report_paging.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) https://github.com/ManageIQ/manageiq-ui-classic/commit/f9c1659e315a4aafc74d99052e7bacc625956e00 commit f9c1659e315a4aafc74d99052e7bacc625956e00 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 [GAP] Prefer `.exists?` over `.length?` in report button helpers https://bugzilla.redhat.com/show_bug.cgi?id=1594386 Gaprindashvili Backport commit from: https://github.com/ManageIQ/manageiq-ui-classic/pull/4143 Original SHA: b5260fd3dff13c9aa0cf7593518bfb557c07c420 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(-)
Verified that the code is present in 5.9.3.3.
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:2184