Implement runner backoff for migrations
What does this MR do and why?
It allows migrations to specify that they need heavy locks on the CI tables and that the runner requests should not be accepted while the migration is in progress.
Example:
class RunnerBackoffExample < Gitlab::Database::Migration[2.1]
enable_runner_backoff!
enable_lock_retries!
def change; end
end
This will be used in !115690 (merged) to return 429
s to the runners.
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 #395787 (closed)
Edited by Marius Bobin