Cleanup Job Details. Configure days retention for the particular job entities.
#14,384 opened on Aug 27, 2023
Repository metrics
- Stars
- (13,071 stars)
- PR merge metrics
- (Avg merge 24d 6h) (30 merged PRs in 30d)
Description
Please confirm the following
- I agree to follow this project's code of conduct.
- I have checked the current issues for duplicates.
- I understand that AWX is open source software provided for free and that I might not receive a timely response.
Feature type
Enhancement to Existing Feature
Feature Summary
For now, in the management job Cleanup Job Schedule, we can only define the number of days for all job-related entities, including ad-hoc commands, project-updates, inventory-updates, management-jobs, notifications, and workflow jobs.
It would be very useful to make it configurable to define a different number of days for different entities.
For example, we need the job history for 90 days. Still, we don't need the notification history since we use notifications only for sending our logs to DataDog and don't use them anymore.
It can be done by using the awx-manage cli by command:
awx-manage cleanup_jobs --notifications --days 0
But we didn't find a way to do it from AWX UI by configuring the Management jobs, so we won't need to create an additional cronjob in K8s that will do it.
Select the relevant components
- UI
- API
- Docs
- Collection
- CLI
- Other
Steps to reproduce
Run cleanup for jobs that are older than 90 days.
Current results
All job-related entities were deleted.
Sugested feature result
Only particular job-related entities are deleted; the number of days is configurable for each type of job.
Additional information
No response