-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle possibility of no orchestration stacks #84
Conversation
@miq-bot add_label fine/yes |
@miq-bot add_label euwe/yes |
LTGM. Thanks. |
@djberg96 - any chance of a spec? |
@djberg96 the easiest way I can see testing this is to refactor the way that deployments are collected by adding a Then, you can easily stub out that method to return an empty array, or Without that wrapper method, it looks like lots and lots of digging holes to stub out weird things. #justathought |
Add spec for possibly empty template deployment list.
@blomquisg I was able to figure it out. :) That said, I did split out a |
Checked commit https://github.com/djberg96/manageiq-providers-azure/commit/2d4a7fccf144b3734e355e9a1da9153aee65c7c3 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 app/models/manageiq/providers/azure/cloud_manager/refresh_parser.rb
|
@djberg96 Is there a BZ for this? Can you please create if it doesn't exist? |
@djberg96 ++<<<<<<< HEAD
+ old_status_message = get_resource_status_message(old_resource)
+
+ old_resource.properties['status_message'] = if old_status_message
+ "#{old_status_message}\n#{new_status_message}"
+ else
+ new_status_message
+ end
+ end
+
+ def get_stack_template(stack, content)
+ process_collection([stack], :orchestration_templates) { |the_stack| parse_stack_template(the_stack, content) }
++=======
+ # link stacks to templates, convert raw_template to template
+ Hash(@data_index[:orchestration_stacks]).each do |_stack_uid, stack|
+ raw_template = stack[:orchestration_template]
+ stack[:orchestration_template] = @data_index.fetch_path(:orchestration_templates, raw_template[:uid])
+ end
++>>>>>>> cb8acf4... Merge pull request #84 from djberg96/orchestration_stack_fix
end |
@blomquisg dang, i suck. |
@miq-bot add_label euwe/no |
@simaishi I will submit a separate PR for Euwe. Sorry about that. |
@miq-bot remove_label euwe/yes |
Handle possibility of no orchestration stacks (cherry picked from commit cb8acf4) https://bugzilla.redhat.com/show_bug.cgi?id=1468703
Fine backport details:
|
Backported to Euwe via ManageIQ/manageiq#15527 |
Fixes a potential bug in the
get_stack_templates
method.Addresses #83