Skip to content

Implement runner backoff for migrations

Marius Bobin requested to merge 395787-implement-runner-migration-backoff into master

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 429s 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.

Related to #395787 (closed)

Edited by Marius Bobin

Merge request reports