Removing Branch only removes most recent Review App Environment
Summary
Gitlab does not appear to run the stop jobs for Review App Environments started that are not the most recent commit.
Appears to be the same as #31295 (closed) (Which looks like it was never resolved, just a workaround was used).
Steps to reproduce
Within a project using review apps:
- Create a new branch
- Make a commit and push to branch
- Make a second commit and push to branch
- Create new Merge Request
- Verify review apps are created for both commits
- Merge and delete the branch
- Verify the first commit's environment is still running (stop job never activated)
Example Project
rudedog9d/review-app-test!1 (merged)
What is the current bug behavior?
Gitlab runs the stop job for the environment linked to the most recent commit on a branch.
Gitlab does not run the stop job for any other commit on a branch
What is the expected correct behavior?
Gitlab runs the stop job for every environment within the branch.