Skip to content

Cleanup old stopped environments

James Ramsay (ex-GitLab) requested to merge delete-stopped-environments into master

Why is this change being made?

Each deployment for every environment has a Git reference (refs/environments/*) which are included when negotiating pushes. There are currently nearly 200k refs from stopped environments that can be removed, reducing push times by up to 5 seconds.

This cleanup script can be used until these are cleaned up automatically by the GitLab application.

Command to run script

PRIVATE_TOKEN=XXX CLEANUP_DRY_RUN=false CLEANUP_MAX_ITEMS_TO_PROCESS=100000 scripts/cleanup-delete-stopped-environments.rb

Related

Author Checklist

  • Provided a concise title for the MR
  • Added a description to this MR explaining the reasons for the proposed change, per say-why-not-just-what
  • Assign this change to the correct DRI
    • If the DRI for the page/s being updated isn’t immediately clear, then assign it to your manager.
    • If your manager does not have merge rights, please ask someone to merge it AFTER it has been approved by your manager in #mr-buddies.
    • If the changes relate to any part of the project other than updates to content and/or data files please make sure to ping @gl-static-site-editor in a comment for a review and merge. For example changes to .gitlab-ci.yml, JavaScript/CSS/Ruby code or the layout files.

For help with failing pipelines reach out in #mr-buddies in Slack

Edited by Chad Woolley

Merge request reports

Loading