[go: up one dir, main page]

Prevent StuckProjectImportJobsWorker from marking active migrations as stuck - Bitbucket Cloud Import

As mentioned in https://gitlab.com/gitlab-org/manage/import-and-integrate/discussions/-/issues/61#note_1650517323, StuckProjectImportJobsWorker can incorrectly mark imports as stuck if project.import_state.refresh_jid_expiration isn't called within 24 hours.

This problem can occur in two situations:

  1. The stage worker is executed for more than 24 hours
  2. AdvanceStageWorker takes more than 24 hours to move to the next stage

Proposed solution

Call the refresh_jid_expiration in two places:

  1. Using RefreshImportJidWorker when stage workers start
  2. Every time AdvanceWorkers executes and the number of pending jobs decreases.

Related MR !142980 (merged)

Edited by Sam Word