diff options
Diffstat (limited to 'app/workers/gitlab')
18 files changed, 41 insertions, 1 deletions
diff --git a/app/workers/gitlab/github_import/advance_stage_worker.rb b/app/workers/gitlab/github_import/advance_stage_worker.rb index af406b32415..f25296f0461 100644 --- a/app/workers/gitlab/github_import/advance_stage_worker.rb +++ b/app/workers/gitlab/github_import/advance_stage_worker.rb @@ -8,6 +8,8 @@ module Gitlab # stage. class AdvanceStageWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker + + sidekiq_options retry: 3 include ::Gitlab::Import::AdvanceStage sidekiq_options dead: false diff --git a/app/workers/gitlab/github_import/import_pull_request_merged_by_worker.rb b/app/workers/gitlab/github_import/import_pull_request_merged_by_worker.rb index 79ef917bbc5..a8b79cf9b3a 100644 --- a/app/workers/gitlab/github_import/import_pull_request_merged_by_worker.rb +++ b/app/workers/gitlab/github_import/import_pull_request_merged_by_worker.rb @@ -5,6 +5,8 @@ module Gitlab class ImportPullRequestMergedByWorker # rubocop:disable Scalability/IdempotentWorker include ObjectImporter + tags :exclude_from_kubernetes + def representation_class Gitlab::GithubImport::Representation::PullRequest end diff --git a/app/workers/gitlab/github_import/import_pull_request_review_worker.rb b/app/workers/gitlab/github_import/import_pull_request_review_worker.rb index b8516fb8670..5ee88d5d32b 100644 --- a/app/workers/gitlab/github_import/import_pull_request_review_worker.rb +++ b/app/workers/gitlab/github_import/import_pull_request_review_worker.rb @@ -5,6 +5,8 @@ module Gitlab class ImportPullRequestReviewWorker # rubocop:disable Scalability/IdempotentWorker include ObjectImporter + tags :exclude_from_kubernetes + def representation_class Gitlab::GithubImport::Representation::PullRequestReview end diff --git a/app/workers/gitlab/github_import/refresh_import_jid_worker.rb b/app/workers/gitlab/github_import/refresh_import_jid_worker.rb index 0ddd893d0d1..1c769921ab3 100644 --- a/app/workers/gitlab/github_import/refresh_import_jid_worker.rb +++ b/app/workers/gitlab/github_import/refresh_import_jid_worker.rb @@ -4,6 +4,8 @@ module Gitlab module GithubImport class RefreshImportJidWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker + + sidekiq_options retry: 3 include GithubImport::Queue # The interval to schedule new instances of this job at. diff --git a/app/workers/gitlab/github_import/stage/finish_import_worker.rb b/app/workers/gitlab/github_import/stage/finish_import_worker.rb index 058e1a0853d..f5980cc248e 100644 --- a/app/workers/gitlab/github_import/stage/finish_import_worker.rb +++ b/app/workers/gitlab/github_import/stage/finish_import_worker.rb @@ -5,6 +5,8 @@ module Gitlab module Stage class FinishImportWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker + + sidekiq_options retry: 3 include GithubImport::Queue include StageMethods diff --git a/app/workers/gitlab/github_import/stage/import_base_data_worker.rb b/app/workers/gitlab/github_import/stage/import_base_data_worker.rb index 202bb335ca1..7ca23ecad20 100644 --- a/app/workers/gitlab/github_import/stage/import_base_data_worker.rb +++ b/app/workers/gitlab/github_import/stage/import_base_data_worker.rb @@ -5,6 +5,8 @@ module Gitlab module Stage class ImportBaseDataWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker + + sidekiq_options retry: 3 include GithubImport::Queue include StageMethods diff --git a/app/workers/gitlab/github_import/stage/import_issues_and_diff_notes_worker.rb b/app/workers/gitlab/github_import/stage/import_issues_and_diff_notes_worker.rb index 486057804b4..d66698277b0 100644 --- a/app/workers/gitlab/github_import/stage/import_issues_and_diff_notes_worker.rb +++ b/app/workers/gitlab/github_import/stage/import_issues_and_diff_notes_worker.rb @@ -5,6 +5,8 @@ module Gitlab module Stage class ImportIssuesAndDiffNotesWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker + + sidekiq_options retry: 3 include GithubImport::Queue include StageMethods diff --git a/app/workers/gitlab/github_import/stage/import_lfs_objects_worker.rb b/app/workers/gitlab/github_import/stage/import_lfs_objects_worker.rb index de2a7f9fc29..2a66a08d534 100644 --- a/app/workers/gitlab/github_import/stage/import_lfs_objects_worker.rb +++ b/app/workers/gitlab/github_import/stage/import_lfs_objects_worker.rb @@ -5,6 +5,8 @@ module Gitlab module Stage class ImportLfsObjectsWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker + + sidekiq_options retry: 3 include GithubImport::Queue include StageMethods diff --git a/app/workers/gitlab/github_import/stage/import_notes_worker.rb b/app/workers/gitlab/github_import/stage/import_notes_worker.rb index e1da26a9d48..873e389fca6 100644 --- a/app/workers/gitlab/github_import/stage/import_notes_worker.rb +++ b/app/workers/gitlab/github_import/stage/import_notes_worker.rb @@ -5,6 +5,8 @@ module Gitlab module Stage class ImportNotesWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker + + sidekiq_options retry: 3 include GithubImport::Queue include StageMethods diff --git a/app/workers/gitlab/github_import/stage/import_pull_requests_merged_by_worker.rb b/app/workers/gitlab/github_import/stage/import_pull_requests_merged_by_worker.rb index 3e15c346659..5743648680d 100644 --- a/app/workers/gitlab/github_import/stage/import_pull_requests_merged_by_worker.rb +++ b/app/workers/gitlab/github_import/stage/import_pull_requests_merged_by_worker.rb @@ -5,9 +5,13 @@ module Gitlab module Stage class ImportPullRequestsMergedByWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker + + sidekiq_options retry: 3 include GithubImport::Queue include StageMethods + tags :exclude_from_kubernetes + # client - An instance of Gitlab::GithubImport::Client. # project - An instance of Project. def import(client, project) diff --git a/app/workers/gitlab/github_import/stage/import_pull_requests_reviews_worker.rb b/app/workers/gitlab/github_import/stage/import_pull_requests_reviews_worker.rb index 790e8b0eccf..532d550f190 100644 --- a/app/workers/gitlab/github_import/stage/import_pull_requests_reviews_worker.rb +++ b/app/workers/gitlab/github_import/stage/import_pull_requests_reviews_worker.rb @@ -5,9 +5,13 @@ module Gitlab module Stage class ImportPullRequestsReviewsWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker + + sidekiq_options retry: 3 include GithubImport::Queue include StageMethods + tags :exclude_from_kubernetes + # client - An instance of Gitlab::GithubImport::Client. # project - An instance of Project. def import(client, project) diff --git a/app/workers/gitlab/github_import/stage/import_pull_requests_worker.rb b/app/workers/gitlab/github_import/stage/import_pull_requests_worker.rb index bf2defa6326..5755aea21ce 100644 --- a/app/workers/gitlab/github_import/stage/import_pull_requests_worker.rb +++ b/app/workers/gitlab/github_import/stage/import_pull_requests_worker.rb @@ -5,6 +5,8 @@ module Gitlab module Stage class ImportPullRequestsWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker + + sidekiq_options retry: 3 include GithubImport::Queue include StageMethods diff --git a/app/workers/gitlab/github_import/stage/import_repository_worker.rb b/app/workers/gitlab/github_import/stage/import_repository_worker.rb index 3338f7e58c0..e113563ce8b 100644 --- a/app/workers/gitlab/github_import/stage/import_repository_worker.rb +++ b/app/workers/gitlab/github_import/stage/import_repository_worker.rb @@ -5,6 +5,8 @@ module Gitlab module Stage class ImportRepositoryWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker + + sidekiq_options retry: 3 include GithubImport::Queue include StageMethods diff --git a/app/workers/gitlab/import/stuck_import_job.rb b/app/workers/gitlab/import/stuck_import_job.rb index 16be7a77ab1..ac789ce1188 100644 --- a/app/workers/gitlab/import/stuck_import_job.rb +++ b/app/workers/gitlab/import/stuck_import_job.rb @@ -9,6 +9,8 @@ module Gitlab included do include ApplicationWorker + + sidekiq_options retry: 3 # rubocop:disable Scalability/CronWorkerContext # This worker updates several import states inline and does not schedule # other jobs. So no context needed diff --git a/app/workers/gitlab/jira_import/advance_stage_worker.rb b/app/workers/gitlab/jira_import/advance_stage_worker.rb index c3a64669c60..6387054d448 100644 --- a/app/workers/gitlab/jira_import/advance_stage_worker.rb +++ b/app/workers/gitlab/jira_import/advance_stage_worker.rb @@ -4,6 +4,8 @@ module Gitlab module JiraImport class AdvanceStageWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker + + sidekiq_options retry: 3 include QueueOptions include ::Gitlab::Import::AdvanceStage diff --git a/app/workers/gitlab/jira_import/import_issue_worker.rb b/app/workers/gitlab/jira_import/import_issue_worker.rb index d1ceda4fd6a..98bde2218c2 100644 --- a/app/workers/gitlab/jira_import/import_issue_worker.rb +++ b/app/workers/gitlab/jira_import/import_issue_worker.rb @@ -4,6 +4,8 @@ module Gitlab module JiraImport class ImportIssueWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker + + sidekiq_options retry: 3 include NotifyUponDeath include Gitlab::JiraImport::QueueOptions include Gitlab::Import::DatabaseHelpers @@ -13,7 +15,7 @@ module Gitlab def perform(project_id, jira_issue_id, issue_attributes, waiter_key) issue_id = create_issue(issue_attributes, project_id) JiraImport.cache_issue_mapping(issue_id, jira_issue_id, project_id) - rescue => ex + rescue StandardError => ex # Todo: Record jira issue id(or better jira issue key), # so that we can report the list of failed to import issues to the user # see https://gitlab.com/gitlab-org/gitlab/-/issues/211653 diff --git a/app/workers/gitlab/jira_import/stage/start_import_worker.rb b/app/workers/gitlab/jira_import/stage/start_import_worker.rb index bfc02224ee4..e327ced8c65 100644 --- a/app/workers/gitlab/jira_import/stage/start_import_worker.rb +++ b/app/workers/gitlab/jira_import/stage/start_import_worker.rb @@ -5,6 +5,8 @@ module Gitlab module Stage class StartImportWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker + + sidekiq_options retry: 3 include ProjectStartImport include ProjectImportOptions include Gitlab::JiraImport::QueueOptions diff --git a/app/workers/gitlab/phabricator_import/import_tasks_worker.rb b/app/workers/gitlab/phabricator_import/import_tasks_worker.rb index 1b1d7b35dd5..867a12fbac2 100644 --- a/app/workers/gitlab/phabricator_import/import_tasks_worker.rb +++ b/app/workers/gitlab/phabricator_import/import_tasks_worker.rb @@ -3,6 +3,8 @@ module Gitlab module PhabricatorImport class ImportTasksWorker < BaseWorker # rubocop:disable Scalability/IdempotentWorker include ApplicationWorker + + sidekiq_options retry: 3 include ProjectImportOptions # This marks the project as failed after too many tries def importer_class |