Call ExpirePipelineCacheWorker per build status transition
What does this MR do?
This MR resolves https://gitlab.com/gitlab-org/gitlab-ce/issues/31127 and https://gitlab.com/gitlab-org/gitlab-ce/issues/31678.
The problem is because ExpirePipelineCacheWorker
performs when Pipeline status transits. This should perform per Stage status transits (See more https://gitlab.com/gitlab-org/gitlab-ce/issues/31127#note_27711892). However, we still don't persist stages yet, so we can't take this solution for now. Therefore, this MR would be a quick solution and not efficient.
Are there points in the code the reviewer needs to double check?
Need to be checked by performance perspective.
Why was this MR needed?
Quick patch for https://gitlab.com/gitlab-org/gitlab-ce/issues/31127 and https://gitlab.com/gitlab-org/gitlab-ce/issues/31678
Screenshots (if relevant)
After patched.
Push -> New pipeline
Build transition (This patch)
Pipeline finished
P.S.
I want to write feature tests somehow at https://gitlab.com/gitlab-org/gitlab-ce/issues/31198...
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Related #31127 (closed) Related #31678 (moved)