Open jolly-green opened 6 years ago
This is best done with a normal launch with providing additional prompts. We would not do arbitrary relaunching with changed parameters for RBAC reasons.
The API has an endpoint that shows what prior prompts the job was launched with. Yes, the UI would go through the normal launch, POST to the JT launch endpoint, just pre-filling the form with those fields.
Also realized this one some time ago. Relaunch and prefill survey with already stored extra_vars from the failed job(which is now opened) will be very usefull feature.
This is probably a non-trivial amount of work on the ui-side. It's definitely doable but we need to hash out the UX and we'll need to make sure we line up the previous launch data such that the prompt modal knows what to do with it all. I think we could go a few different ways with this. One option would be to always show the launch modal when relaunch is clicked and if the user doesn't want to change any values then they just click all the way through. If the JT doesn't have any promptable fields then the flow would remain as it is today. Alternatively we could turn the relaunch button into a dropdown where the user decides if they want to relaunch using the same params or replace some. The problem with this approach is that I'm not sure that we'd know if anything is promptable until we hit the api. If that's the case I think we'd need to hit the api when the user hits relaunch and then show the dropdown. We'll also have to take into account the existing host status dropdown on relaunch:
which could complicate path 2 because the user would need to make two different decisions from a single dropdown.
Any updates on this Feature idea?
Any updates on this Feature?
I would like to get tech debt cleared out around https://github.com/ansible/awx/pull/12944 if at all possible first. Relaunching a job is different from relaunching a workflow, but the handling of the prompts payload should be the same for both, and they are not consistently stored in the expected place, so that's the tech debt I would like to address.
ISSUE TYPE
COMPONENT NAME
SUMMARY
Make relaunching more flexible as sometimes the users want to relaunch the same job with only a few input modifications from the original job.
ADDITIONAL INFORMATION