Add an option to override the job type at the workflow level (issue #14180) #15932
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
Fixes 14180 issue.
This PR introduces a feature that allows overriding the job type of each workflow node at launch time. To enable this, the
Enable prompt on launch for nodes job type
field must be checked when creating or editing the workflow template.During testing, I noticed that the override does not apply to nodes unless they have
ask_job_type_on_launch
enabled. It appears that thejob_type
is hardcoded at the node level upon creation. This can be easily addressed by settingask_job_type_on_launch
toTrue
within theget_job_kwargs
method. However, I wanted to confirm whether this behavior is intentional before doing that.ISSUE TYPE
COMPONENT NAME
AWX VERSION
ADDITIONAL INFORMATION
Please note that if the workflow includes nodes with mixed
job_type
values, enabling this feature will override all of them with a singlejob_type
at execution time. I’ll include this clarification in theask_nodes_job_type_on_launch
help text in the corresponding Ansible-UI PR.