Skip to content

Delete old pipelines

Marius Bobin requested to merge 498969-test-poc into master

What does this MR do and why?

Allow users to set pipeline expiry times per project and delete expired pipelines.

This won't work effectively with millions of projects, but that's expected. We want to see how popular this feature is before investing more time into building a robust solution.

References

Please include cross links to any resources that are relevant to this MR This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

image

How to set up and validate locally

  1. In rails console enable the experiment fully
    Feature.enable(:ci_delete_old_pipelines)
  2. Visit any project CI/CD settings pages such as http://127.0.0.1:3000/root/new-taggings/-/settings/ci_cd
  3. Fill in Delete old pipelines with a desired value
  4. Wait till the cron worker is executed(11 minutes tops).
  5. Notice that 250 pipelines are gone.

Related to #498969

Edited by Marius Bobin

Merge request reports

Loading