`Ci::PlayBuildService` could retry inappropriate jobs
Problem
Ci::PlayBuildService
currently has a fallback code to retry a job if build.enqueue
is failed.
# Try to enqueue the build, otherwise create a duplicate.
#
if build.enqueue
...
else
Ci::Build.retry(build, current_user)
end
This causes a bug that, for example, non retryable jobs, such as archived jobs, can be retried.
Proposal
Remove Ci::Build.retry
as the jobs to be retried must directly call Ci::RetryBuildService
today. This effectively simplifies #353479.
Related
Edited by Avielle Wolfe