Skip to content

Resolve "Reenqeue NewMergeRequestWorker if not prepared"

What does this MR do and why?

Now that we have backfilled the prepared_at column, we need to handle the case where merge_requests are failed to prepared.

To test:

  • Change the schedule to every minute (*/1 * * * *) (config/initializers/1_settings.rb) (:686)
  • Turn on feature flag (ensure_merge_requests_prepared)
  • Find a merge request, and set it's prepared_at to nil (MergeRequest.last.update!(prepared_at: nil, created_at: Time.current))
  • Ensure the merge request prepared_at is nil (MergeRequest.last.prepared_at)
  • Wait 1-2 until the next cron jobs are run
  • Ensure the merge request prepared_at is set (MergeRequest.last.prepared_at)

Related to #396751 (closed)

Edited by Marc Shaw

Merge request reports

Loading