What is the nature and description of the request?
When a job is deleted from the UI, the job details are removed, but the job events remain in the database. The customer wants the built-in Cleanup Job Details management job to include orphaned job events.
Currently, there is no way to remove these job events other than using the Cleanup Job Details management job, which uses the awx-manage cleanup_jobs command. This command is limited in what it can exclude from being cleaned up. The only filters for it are the number of days and job type. The customer wants to maintain a retention period that cleans up old job history and includes orphaned jobs.
Why does the customer need this? (List the business requirements here)
The customer runs Jobs with varying levels of job output. Some are very large (3GB per job). The customer wishes to delete the large jobs and also remove the job events. However, they do not want to remove other job data.
The Cleanup Job Details cannot differentiate between large and small jobs, so all jobs would be cleaned up outside of the retention period.
How would you like to achieve this? (List the functional requirements here)
The awx-manage cleanup_jobs command should allow for the inclusion of orphaned jobs. This should be set by default to true.