Use drop! to process stuck builds
What does this MR do and why?
Use drop! to process stuck builds
Using build.drop!
will allow build.doom!
to be called which sets the job to failed while bypassing validations, so that we don't continue to re-process the same build in the case of in-valid records.
We saw builds being re-processed when they were left orphaned form the pipelines which made them invalid:
We are still seeing the worker try to process this build(from the above graph) to get it to a completed state.
The root cause of invalid data was a broken ON DELETE CASCADE and a broken foreign key constraint. This left builds without a pipeline.
See:
- gitlab-com/gl-infra/production#18489 (comment 2096692699)
- gitlab-com/gl-infra/production#18489 (comment 2095573446)
Issue: #485597 (closed)
Edited by Allison Browne