Delete stopped environments automatically
Description
This is continuation from #19724 (closed). Today, we have a performance issue that stopped environments still retain deployment refs. This cause performance degradation. In fact, customers also face this issue. Another example => #223155 (closed)
We should delete unnecessary environments in order to speed up git operation. This brings a lot of benefits to entire GtiLab features, especially GitLab-Runners that the total amount of refs they need to fetch will be significantly reduced.
Proposal
Delete stopped environments automatically.
Which environments will be deleted?
- The environment has already been stopped for more than a month.
- The environment is not protected.
This should also cover #225794 (closed).
Example
Given you have the following .gitlab-ci.yml:
review:
environment:
name: review/$CI_COMMIT_REF_NAME
auto_stop_in: 1 week
production:
environment: production
The outcome is:
- If the
review/something
environment is running for a week, it'll be stopped by environment auto-stop feature feature. - If the
review/something
environment has been stopped for a month, it'll be deleted by the new feature. - The
production
environment will never be stopped automatically. - If the
production
environment has been stopped by manual operation, it won't be deleted because the environment was not stopped by environment auto-stop feature feature.
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.