-
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
Cleanup after Ansible runner. #19383
Conversation
4eb0c8e
to
bba6458
Compare
cc @NickLaMuro Please review |
$log.log_hashes(jt_options) | ||
job_template_klass.raw_create_in_provider(manager, jt_options) | ||
end | ||
DEFAULT_EXECUTION_TTL = 100.minutes # automate state machine aborts after 100 retries at a minite interval |
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.
minor typo minite
-> minute
hash[k] = match_data ? ManageIQ::Password.decrypt(v.gsub(/password::/, '')) : v | ||
end | ||
|
||
extra_vars |
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.
No need to set a temporary variable and return it because it would be returned anyway.
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.
To be fair, this was a copy-paste from what was done in EmbeddedAnsible::AutomationManager::ConfigurationScript
previously.
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 am still wrapping my head around a lot of this, but my initial reaction to this change is I don't think this should be something that we should be pushing into the ivanchuk
branch. I am fine with it conceptually (I think), but making such a massive code delete like this should be saved for a later release so the QA effort that has already been done on the existing code isn't wasted.
</my_2cents>
bba6458
to
c8e686d
Compare
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.
So I did take the resulting patch of this PR and apply it to fresh appliance to try it out. Everything works as far as I can tell, so I am good with merging this into master.
I still haven't heard as response regarding my "2 cents" to not have this as part of ivanchuk
, but in addition, I found a unused method as part of my more thorough review. But other than that, I am cool with these changes, and it also proves I am still pretty unfamiliar to the architecture surrounding all of this code.
app/models/manageiq/providers/embedded_ansible/automation_manager/job.rb
Show resolved
Hide resolved
@NickLaMuro Thanks for reviewing and testing. |
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.
Per @lfu 's comment:
this decision will be made separately, so I don't think my review should be keeping this from going into master
. Approving.
c8e686d
to
f64693f
Compare
@mkanoor Please review. |
@@ -96,7 +98,7 @@ def retireable? | |||
# If extra_vars are passed through automate, all keys are considered as attributes and | |||
# converted to lower case. Need to convert them back to original definitions in the | |||
# job template through survey_spec or variables | |||
def self.reconcile_extra_vars_keys(_template, options) | |||
def self.reconcile_extra_vars_keys(_playbook, 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.
@lfu is this just returning back the options that were passed in
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.
Seems that is the case here.
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.
@lfu can we get rid of it
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.
If it is ok with @gmcculloug. I promised him this is a refactor PR.
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.
@lfu Since this is a private method it seems like a straight-forward change that would be fine for this PR.
f64693f
to
3b3184c
Compare
Checked commit lfu@3b3184c with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
With this change in place, the server application no longer works. #19432 seems to be fixing it. |
I am wondering why is this ivanchuk/yes. Making #19432 the same though. |
@martinpovolny Thanks for pointing out the release flag. I have discussed the viability of back-porting this with @dmetzger57 as it would be nice to keep Ivanchuk in-sync with master this early on but will come down to when we can get it properly tested. Without a BZ this will not get back-ported so leaving it currently set to |
Cleanup after Ansible runner. (cherry picked from commit 1e1ef97) https://bugzilla.redhat.com/show_bug.cgi?id=1784103
Ivanchuk backport details:
|
Ansible runner support has been added in Ivanchuk.
This pull request is to clean up the Ansible playbook service to get rid of the temporary Ansible template implementation.
Blocks ManageIQ/manageiq-automation_engine#378
Requires #19432
Includes ManageIQ/manageiq-content#594
Includes ManageIQ/manageiq-automation_engine#383
Includes #19466
https://bugzilla.redhat.com/show_bug.cgi?id=1765682
@miq-bot assign @tinaafitz
@miq-bot add_label services, changelog/yes, ivanchuk/yes, hammer/no