Alert project admin that their project's cleanup policy is turned on
Context
You can use cleanup policies for your project's container registry that help you to programmatically remove old, unused container images. However, for GitLab.com projects, the policies are only enabled for projects created after milestone 12.8. This decision was made due to performance and scalability concerns of supporting the policies for many projects with many images with a large number of tags.
Over the past few milestones, we've addressed these scalability concerns and are ready to start rolling the feature out for projects created before 12.8.
Problem to solve
How can we create more awareness that a project created before 12.8 on GitLab.com has had its cleanup policy turned on? They may not think to check, especially since it's been a while that it hasn't been turned on.
Proposal
As we begin the percentage based rollout for historical projects, we will alert project admin in the application that the cleanup policy for their project's container registry is now turned on and that they should consider setting it up so that they can save money on storage and make it easier to find and validate an image in the container registry user interface.
Further details
- For GitLab.com only
- The global setting
container_expiration_policies_enable_historic_entries
is off. - The project has at least one container image.
- The project has no cleanup policy.
project.container_expiration_policy
isnil
. - The project has the feature flag
container_expiration_policies_historic_entry
. (Feature.enabled?(:container_expiration_policies_historic_entry, project)
).