-
Notifications
You must be signed in to change notification settings - Fork 898
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
Refactor MiqProvisionWorkflow#initialize method and subclasses #21014
base: master
Are you sure you want to change the base?
Refactor MiqProvisionWorkflow#initialize method and subclasses #21014
Conversation
Should these new methods be private methods? |
@lfu when you get a chance, if you can review and validate in a real provision workflow (I don't have environment to try it), that would be great. This is NOT URGENT and very low priority. |
app/models/miq_request_workflow.rb
Outdated
end | ||
normalize_numeric_fields unless @dialogs.nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious why this was moved from the if @dialogs.nil?
branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is the way some of the subclasses had it. so I commonized the code.
def initialize(values, requester, options = {}) | ||
super | ||
|
||
load_source_object if initial_pass?(values, options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this have to happen before the dialogs are loaded? (i.e. in between initialize_dialogs and configure_dialogs?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good question - maybe @lfu knows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #21014 (comment)
77b9dea
to
518f6d9
Compare
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation. |
This removes a bunch of copy paste code. Do we want to pick this up, or let |
I'm surprised this PR is still mergeable - would like @agrare to review and then either accept or close. |
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation. |
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
1 similar comment
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
1 similar comment
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
…cal to MiqProvisionVirtWorkflow#initialize
…rkflow#initialize
…s and configure_dialogs
4094852
to
c7243c9
Compare
Checked commits chessbyte/manageiq@55f03f0~...c7243c9 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint app/models/miq_provision_virt_workflow.rb
app/models/miq_request_workflow.rb
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, a couple of the options[:skip_dialog_load] == true
look like they could drop the == true
but that is just moving existing code around.
No description provided.