Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,763
    • Issues 44,763
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,329
    • Merge requests 1,329
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #352985
Closed
Open
Issue created Feb 16, 2022 by George Koltsov@georgekoltsovMaintainer

GitLab Migration: Add cron job to mark imports as failed after a certain amount of time

Add a safeguard mechanism to GitLab Migration to clean up any of the 'in progress' / stuck imports in order to mark them as failed after a certain amount of time.

We have something similar for file-based Import/Export Gitlab::Import::StuckImportJob https://gitlab.com/gitlab-org/gitlab/blob/62deba86fd7822d070300d6bea27a48162aecaab/app/workers/gitlab/import/stuck_import_job.rb#L5-L5

Related to the discussion in https://gitlab.com/gitlab-org/manage/import/support/-/issues/8

Implementation Proposal

  • Create new scope stale on BulkImport and BulkImports::Entity models.
    • This should return records that are over 1 day(?) old and are either created or started.
  • Create new worker that scans for all stale records and marks them are failed .fail_op.
  • Assign worker to cron and run once per day.
Edited Mar 21, 2022 by Max Woolf
Assignee
Assign to
Time tracking