Skip to content

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

May-04-2017_16-10-49

Build transition (This patch)

May-04-2017_16-12-26

Pipeline finished

May-04-2017_16-13-42

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?

What are the relevant issue numbers?

Related #31127 (closed) Related #31678 (moved)

Merge request reports