Fix pending status check workers
What does this MR do and why?
What
Fix pending status check workers
Why
- Fixes incorrect urgency and data_consistency worker attributes causing delays that could be interpreted as bugs if delayed too long
- Fixes parent scopes that was using time set in a constant to allow a proper fetch of the timeout_eligible scope
- Fixes incorrect sha used in worker (
target_branch_sha
->diff_head_sha
) - Updates to use
.update_all(status: 'failed'
) instead of.each(&:failed!)
for clarity
Screenshots or screen recordings
Demo: https://youtu.be/PqrXdVe20jQ
How to set up and validate locally
- Setup status checks
- Create an MR
- Wait 2 minutes (or manually update the
created_at
attribute from the most recent response when running::MergeRequests::StatusCheckResponse.pending
in console)
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 #388725 (closed)
Edited by Jay Montal