Bug 1444965 - Getting undefined method `get_folder_paths' after applying RHSA-2017:0898
Summary: Getting undefined method `get_folder_paths' after applying RHSA-2017:0898
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.9.0
Assignee: Drew Bomhof
QA Contact: Dmitry Misharov
URL:
Whiteboard:
Depends On:
Blocks: 1445804 1445806
TreeView+ depends on / blocked
 
Reported: 2017-04-24 15:43 UTC by Saif Ali
Modified: 2020-05-14 16:00 UTC (History)
7 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1445804 1445806 (view as bug list)
Environment:
Last Closed: 2018-03-06 15:03:20 UTC
Category: ---
Cloudforms Team: VMware
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Saif Ali 2017-04-24 15:43:17 UTC
Description of problem:
Getting undefined method `get_folder_paths' after applying RHSA-2017:0898

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

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 6 Greg McCullough 2017-04-25 18:41:44 UTC
This issue was caused by PR https://github.com/ManageIQ/manageiq/pull/13629.

We should restore the logic for this method since it is a regression effecting a z-stream update.

If yours do not want to apply a hotfix they can replace the call with eligible_folders.


Here is an example of how to replace `prov.get_folder_paths` with a call to eligible_folders.


Initial code example:
prov.get_folder_paths.each { |key, path| log_and_update_message(:info, "Eligible folders:<#{key.inspect}> - <#{path.inspect}>") }

------------------------------

Replacement code:
1. Use the eligible_folders method to build hash similar to what get_folder_paths returned
2. Replace `prov.get_folder_paths` from the original code with the new `folder_paths` variable


folder_paths = prov.eligible_folders.each_with_object({}) do |x, h|
  h[x.id] = x.folder_path(:exclude_non_display_folders => true)
end

folder_paths.each { |key, path| log_and_update_message(:info, "Eligible folders:<#{key.inspect}> - <#{path.inspect}>") }

Comment 8 CFME Bot 2017-04-25 20:11:11 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/104d16bb9c32454b430ffe61c64c1055f5617bf6

commit 104d16bb9c32454b430ffe61c64c1055f5617bf6
Author:     Drew Bomhof <dbomhof>
AuthorDate: Tue Apr 25 15:34:31 2017 -0400
Commit:     Drew Bomhof <dbomhof>
CommitDate: Tue Apr 25 15:34:31 2017 -0400

    Revert removal of get_folder_paths
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1444965

 app/models/mixins/miq_provision_mixin.rb | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comment 13 Milan Falešník 2018-02-05 10:49:33 UTC
Verified in 5.9.0.19 ^^^


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