Consider project as refreshing when the refresh is running
What does this MR do and why?
Change the condition of Project#refreshing_build_artifacts_size?
from build_artifacts_size_refresh&.started?
to build_artifacts_size_refresh&.running?
.
Project#refreshing_build_artifacts_size?
is used to guard against job artifact deletion when the project build artifacts size is being refreshed.
The refresh states are created
, running
, and pending
. It is in running
when a worker is actively working on the refresh. If the worker cannot complete the refresh within the given batch, it will put it into pending
, which is a dormant state until the refresh is picked up again by the next worker.
In the previous implementation of Project#refreshing_build_artifacts_size?
, it lead to significant blockage on DestroyBatchService
which deletes artifacts on schedule.
This blockage happens even though the BuildArtifactSizeRefresh
of the project is in pending
.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
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 #332994 (closed)