Define the cadence for which to regularly purge the group's Dependency Proxy.
Problem to solve
#11631 (closed) proposes adding an API that will Admin to purge the Dependency Proxy cache. However, it does not allow them to define a cadence for which to regularly purge the cache, resulting in an inefficient workflow and manual intervention.
Intended users
Further details
Proposed MR breakdown
This could be split into the following MRs:
- Add
cadence
column todependency_proxy_group_settings
Weight:1
- Add the endpoint to update the
cadence
value for a group: Weight:1
- Set up
DependencyProxyCleanupWorker
to run a cleanup job daily based on the cadence:2
Proposal
Define the cadence for which to regularly purge the group's Dependency Proxy.
POST /groups/:id/dependency_proxy/expiration_cadence
To create a recurring job, we need a cronjob, similar to the existing ContainerExpirationPolicyWorker
that is supported by a table or column to hold the cadence. I would suggest we add the setting to dependency_proxy_group_settings
, where NULL is allowed, and when NULL, the cache is never purged. The default would be set to 60 days.
Permissions and Security
- This functionality should be limited to admin only
Documentation
- Update the Dependency Proxy API documentation
Availability & Testing
What does success look like, and how can we measure that?
- Success looks like Administrators are able to define a simple expiration policy for the Dependency Proxy cache and avoid manual intervention and higher storage costs.
Metrics
- Count total number of API events
What is the type of buyer?
- The Dependency Proxy is an ultimate feature