-
Notifications
You must be signed in to change notification settings - Fork 896
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
extra_var to have metadata #14697
extra_var to have metadata #14697
Conversation
@miq-bot add_label enhancement, providers/ansible_tower, services, fine/yes cc @h-kataria UI will need an update to use the new format to pass in the extra_vars to backend. |
This pull request is not mergeable. Please rebase and repush. |
Before extra_vars are hash key-default_value pairs. Now the hash value is another hash used to be store metadata. The first metadata is default value
Checked commit bzwei@e57b5ef with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
UI changes to support extra vars format in ManageIQ/manageiq#14697
UI changes to support extra vars format in ManageIQ/manageiq#14697
UI changes to support extra vars format in ManageIQ/manageiq#14697
UI changes to support extra vars format in ManageIQ/manageiq#14697
- UI changes to support extra vars format in ManageIQ/manageiq#14697 - fixed broken spec test
- UI changes to support extra vars format in ManageIQ/manageiq#14697 - fixed broken spec test
extra_var to have metadata (cherry picked from commit b84a4eb)
Fine backport details:
|
@@ -75,6 +75,9 @@ def get_job_options(action) | |||
|
|||
def save_job_options(action, overrides) | |||
job_options = options.fetch_path(:config_info, action.downcase.to_sym).slice(:hosts, :extra_vars).with_indifferent_access | |||
job_options[:extra_vars].try(:transform_values!) do |val| | |||
val.kind_of?(String) ? val : val[:default] # TODO: support Hash only |
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 belong in a migration?
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. Since beta release every new service is having the new format. We don't need provide a migration for pre-beta versions.
Before extra_vars are hash key-default_value pairs. Now the hash value is another hash used to be store metadata. The first metadata is default value
For example this is the format for
:config_info
beforeand this is the new format
In the future we can add more metadata, for example