awx
awx copied to clipboard
Feature prompt on launch on templates
SUMMARY
Enable prompting on launch of the following items in Job Templates:
- Execution Environment
- Labels
- Forks
- Job Slice Count
- Timeout
- Instance Groups
Enable prompting on launch for the following items in Workflow Job Templates:
- Labels
- Skip Tags
- Job Tags
ISSUE TYPE
- New or Enhanced Feature
COMPONENT NAME
- API
- UI
- Collection
- CLI
AWX VERSION
awx: 21.5.1.dev132+g2dfdf504f8
ADDITIONAL INFORMATION
Need QE re: @mabashian
I have test failures with /api/v2/jobs/142/create_schedule endpoint (test_prompt_ee_on_schedule test). I start job with an execution environment prompt. And then calling create_schedule produces the
tools_awx_1 | TypeError: Object of type ExecutionEnvironment is not JSON serializable
Here is simple pseudo code to reproduce:
jt = factories.job_template(ask_execution_environment_on_launch=True)
job = jt.launch(dict(execution_environment=ee_copy.id)).wait_until_completed()
create_schedule = job.related.create_schedule.get()
assert create_schedule.prompts == dict(execution_environment=ee_copy.id)
schedule = create_schedule.post()
The same happens for instance group prompt.
We need to review is_detached
, get_ophaned_labels
and is_candidate_for_detach
from the Labels model to make sure they account for the new relations to schedules and wfjtnodes and any other objects.
https://github.com/ansible/awx/pull/12888 - needs to be scoped in here as well
https://github.com/ansible/awx/compare/devel...AlanCoding:squash_attempt3?expand=1
if you want squashed