Add ability to clean up stale environments
What does this MR do and why?
Allows users to clean up stale environments that haven't been modified or deployed to since a specified date
Screenshots or screen recordings
How to set up and validate locally
- Enable the
stop_stale_environments
feature flag (i.e.Feature.enable(:stop_stale_environments)
) - Navigate to the environments page for a project that has stale environments as a user with maintainer access
- Click "Clean up environments" to show the new modal
- Input a date after the stale environments you want to stop have been updated
- Click "clean up"
- Wait for stale environments to become "stopped" (should be fairly quick)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #19724 (closed)
Merge request reports
Activity
changed milestone to %15.8
added Category:Environment Management Next Up UX auto updated backend backend-weight1 customer devopsrelease [DEPRECATED] direction documentation frontend frontend-weight1 grouprelease [DEPRECATED] internal customer maturitylovable potential proposal sectionops severity1 typefeature workflowin dev + 1 deleted label
assigned to @acook.gitlab
Please wait for Reviewer Roulette to suggest a designer for UX review, and then assign them as Reviewer. This helps evenly distribute reviews across UX.
This message was generated automatically. You're welcome to improve it.
@afontaine here's the cleanup environments modal draft, still working on getting it working and adding specs, but if you could give me some early feedback I'd appreciate it
4 Warnings If you are in a revert MR, consider using the revert MR template to add labels to skip changelog checks (docs). If this is reverting something in the current milestone, we don't need to add a changelog. In this case, we can skip changelog checks by adding
~"regression:*"
label, and re-run the danger job (there is a link at the bottom of this comment).2e7798e2: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. d7656ed9: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. Please add a merge request subtype to this merge request. 1 Message CHANGELOG missing: If you want to create a changelog entry for GitLab FOSS, add the
Changelog
trailer to the commit message you want to add to the changelog.If you want to create a changelog entry for GitLab EE, also add the
EE: true
trailer to your commit message.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend Tianwen Chen (
@tianwenchen
) (UTC+11, 16 hours ahead of@acook.gitlab
)Aleksei Lipniagov (
@alipniagov
) (UTC+1, 6 hours ahead of@acook.gitlab
)frontend Angelo Gulina (
@agulina
) (UTC+1, 6 hours ahead of@acook.gitlab
)Alexander Turinske (
@aturinske
) (UTC+11, 16 hours ahead of@acook.gitlab
)UX Andy Volpe (
@andyvolpe
) (UTC-5, same timezone as@acook.gitlab
)Maintainer review is optional for UX To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerBundle size analysis [beta]
This compares changes in bundle size for entry points between the commits c492d9e1 and 2e7798e2
Special assetsEntrypoint / Name Size before Size after Diff Diff in percent average 3.55 MB 3.56 MB - 0.0 % mainChunk 1.95 MB 1.95 MB - 0.0 % Significant Growth: 1Expand
Entrypoint / Name Size before Size after Diff Diff in percent pages.projects.environments.index 1.29 MB 1.38 MB +92.45 KB 7.0 %
Your MR has at least one entrypoint growing significantly (more > 1 KB or 2%). If you write new or extend existing features, this is expected and there is nothing to worry about.
Please consider pinging someone from the FE Foundations (
@leipert
,@markrian
,@mikegreiling
,@ohoral
or@pgascouvaillancourt
) for review, if you are unsure about the size increase.Note: We do not have exact data for c492d9e1. So we have used data from: 7379f716.
The intended commit has no webpack pipeline, so we chose the last commit with one before it.Please look at the full report for more details
Read more about how this report works.
Generated by
Danger- Resolved by Allen Cook
- Resolved by Andrew Fontaine
- Resolved by Allen Cook
- Resolved by Allen Cook
- Resolved by Allen Cook
Looking good @acook.gitlab
general direction is solid, just some things to think about
Allure report
allure-report-publisher
generated test report!e2e-review-qa:
test report for 2e7798e2expand test summary
+-----------------------------------------------------------------------+ | suites summary | +------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +------------------+--------+--------+---------+-------+-------+--------+ | Govern | 28 | 0 | 5 | 0 | 33 | ✅ | | Create | 28 | 0 | 1 | 0 | 29 | ✅ | | Plan | 49 | 0 | 1 | 0 | 50 | ✅ | | Verify | 12 | 0 | 0 | 0 | 12 | ✅ | | Manage | 33 | 0 | 3 | 0 | 36 | ✅ | | Monitor | 4 | 0 | 0 | 0 | 4 | ✅ | | Framework sanity | 9 | 0 | 1 | 0 | 10 | ✅ | | Package | 0 | 0 | 1 | 0 | 1 | ➖ | +------------------+--------+--------+---------+-------+-------+--------+ | Total | 163 | 0 | 12 | 0 | 175 | ✅ | +------------------+--------+--------+---------+-------+-------+--------+
e2e-package-and-test:
test report for 2e7798e2expand test summary
+-----------------------------------------------------------------------+ | suites summary | +------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +------------------+--------+--------+---------+-------+-------+--------+ | Plan | 120 | 0 | 0 | 0 | 120 | ✅ | | Create | 292 | 0 | 40 | 20 | 332 | ❗ | | Analytics | 4 | 0 | 0 | 0 | 4 | ✅ | | Fulfillment | 4 | 0 | 50 | 0 | 54 | ✅ | | Manage | 132 | 0 | 6 | 4 | 138 | ❗ | | ModelOps | 0 | 0 | 2 | 0 | 2 | ➖ | | Configure | 0 | 0 | 6 | 0 | 6 | ➖ | | Release | 12 | 0 | 0 | 0 | 12 | ✅ | | Verify | 98 | 0 | 4 | 0 | 102 | ✅ | | Govern | 84 | 0 | 2 | 0 | 86 | ✅ | | Framework sanity | 0 | 0 | 2 | 0 | 2 | ➖ | | Monitor | 10 | 0 | 0 | 0 | 10 | ✅ | | Secure | 14 | 0 | 2 | 0 | 16 | ✅ | | Package | 0 | 0 | 6 | 0 | 6 | ➖ | +------------------+--------+--------+---------+-------+-------+--------+ | Total | 770 | 0 | 120 | 24 | 890 | ❗ | +------------------+--------+--------+---------+-------+-------+--------+
added 1 commit
- 208a4864 - Add ability for users to stop stale environments
added 223 commits
-
208a4864...7afcfba2 - 222 commits from branch
master
- 960d1b9a - Add ability for users to stop stale environments
-
208a4864...7afcfba2 - 222 commits from branch
added 1 commit
- e4946ddc - Add ability for users to stop stale environments
added 1 commit
- d1f49664 - Add ability for users to stop stale environments
- A deleted user
added feature flag label
added 1 commit
- 8ea35360 - Add ability for users to stop stale environments
added 1 commit
- 2ad62815 - Add ability for users to stop stale environments
added 1 commit
- a7d4ccc7 - Add ability for users to stop stale environments
added 1 commit
- 9d632680 - Add ability for users to stop stale environments
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@0c6c5082
requested review from @cwiesner
requested review from @andrei.zubov
requested review from @andyvolpe
- Resolved by Andrew Fontaine
@cwiesner could you do a backend review here?
@andrei.zubov could you do the frontend review here?
@andyvolpe could you do a UX review here?
added 1 commit
- 7cec33dc - Add ability for users to stop stale environments
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@0135d398
@andyvolpe
, thanks for approving this merge request.This is the first time the merge request is approved. To ensure full test coverage, a new pipeline will be started shortly.
For more info, please refer to the following links:
added pipeline:mr-approved label
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@e6cedb3a
removed review request for @cwiesner
requested review from @minac
- Resolved by Allen Cook
removed review request for @minac
- Resolved by Allen Cook
- Resolved by Allen Cook
- Resolved by Allen Cook
added 1 commit
- 2a96e402 - Add ability for users to stop stale environments
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@46904118
added 1 commit
- 1af65c7e - Add ability for users to stop stale environments
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@b445eba4
removed review request for @andrei.zubov
added 1 commit
- d7656ed9 - Add ability for users to stop stale environments
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@07c0c06e
requested review from @zcuddy
removed review request for @andyvolpe
requested review from @afontaine
removed review request for @zcuddy
- Resolved by Allen Cook
- Resolved by Allen Cook
- Resolved by Andrew Fontaine
- Resolved by Allen Cook
- Resolved by Allen Cook
- Resolved by Andrew Fontaine
just a few things around clean up and a couple more tests @acook.gitlab
Looking good though!
added 1 commit
- 1c0ecfd0 - Add specs for testing submit of cleanup request
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@a93d43e8
This looks great @acook.gitlab thanks for those extra tests
enabled an automatic merge when the pipeline for e85cffff succeeds
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@e85cffff
added 1 commit
- 2e7798e2 - Add specs for testing submit of cleanup request
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@ede1f60b
enabled an automatic merge when the pipeline for ede1f60b succeeds
mentioned in commit d039c657
added workflowstaging-canary label and removed workflowin dev label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added releasedcandidate label
mentioned in merge request gitlab-com/www-gitlab-com!119658 (merged)
added releasedpublished label and removed releasedcandidate label
@acook.gitlab @afontaine I just noticed this in the UI, but can't find any mention of this in the docs (when searching for the name of the button, at least). Do you know if this was documented anywhere? cc @phillipwells
I opened up !162742 (merged) to add this dialog to the docs. I'll send it over to you (@marcel.amirault) for merge once I confirm I got the facts right!