awx icon indicating copy to clipboard operation
awx copied to clipboard

Feature prompt on launch on templates

Open john-westcott-iv opened this issue 1 year ago • 4 comments

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

john-westcott-iv avatar Sep 13 '22 14:09 john-westcott-iv

Need QE re: @mabashian

AlexSCorey avatar Sep 13 '22 20:09 AlexSCorey

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.

obaranov avatar Sep 15 '22 14:09 obaranov

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.

john-westcott-iv avatar Sep 15 '22 15:09 john-westcott-iv

https://github.com/ansible/awx/pull/12888 - needs to be scoped in here as well

sarabrajsingh avatar Sep 15 '22 17:09 sarabrajsingh

https://github.com/ansible/awx/compare/devel...AlanCoding:squash_attempt3?expand=1

if you want squashed

AlanCoding avatar Sep 22 '22 20:09 AlanCoding