diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb index 540f93611c77d993f2b95e46844b77df7aa53030..242bde1fb697478a04e997d2f1ea2fcf4200444c 100644 --- a/app/helpers/application_settings_helper.rb +++ b/app/helpers/application_settings_helper.rb @@ -232,6 +232,9 @@ def visible_attributes :authorized_keys_enabled, :auto_devops_enabled, :auto_devops_domain, + :concurrent_github_import_jobs_limit, + :concurrent_bitbucket_import_jobs_limit, + :concurrent_bitbucket_server_import_jobs_limit, :container_expiration_policies_enable_historic_entries, :container_registry_expiration_policies_caching, :container_registry_token_expire_delay, diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 702d081fda93d52558cd6899f0eff557c8f63916..c4a5c167d54501b9cc0e8bb6faf7d970af018624 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -522,6 +522,9 @@ def self.kroki_formats_attributes with_options(numericality: { only_integer: true, greater_than: 0 }) do validates :bulk_import_concurrent_pipeline_batch_limit, + :concurrent_github_import_jobs_limit, + :concurrent_bitbucket_import_jobs_limit, + :concurrent_bitbucket_server_import_jobs_limit, :container_registry_token_expire_delay, :housekeeping_optimize_repository_period, :inactive_projects_delete_after_months, @@ -603,7 +606,10 @@ def self.kroki_formats_attributes jsonb_accessor :rate_limits, members_delete_limit: [:integer, { default: 60 }], - downstream_pipeline_trigger_limit_per_project_user_sha: [:integer, { default: 0 }] + downstream_pipeline_trigger_limit_per_project_user_sha: [:integer, { default: 0 }], + concurrent_github_import_jobs_limit: [:integer, { default: 1000 }], + concurrent_bitbucket_import_jobs_limit: [:integer, { default: 100 }], + concurrent_bitbucket_server_import_jobs_limit: [:integer, { default: 100 }] validates :rate_limits, json_schema: { filename: "application_setting_rate_limits" } diff --git a/app/validators/json_schemas/application_setting_rate_limits.json b/app/validators/json_schemas/application_setting_rate_limits.json index 369dbe0591142990cde80c2a7c3a4e036080cfb6..09017429033fd6f1d03d1d50d9c22835f8bef28f 100644 --- a/app/validators/json_schemas/application_setting_rate_limits.json +++ b/app/validators/json_schemas/application_setting_rate_limits.json @@ -4,6 +4,21 @@ "type": "object", "additionalProperties": false, "properties": { + "concurrent_bitbucket_import_jobs_limit": { + "type": "integer", + "minimum": 1, + "description": "Maximum number of simultaneous import jobs for Bitbucket Cloud importer" + }, + "concurrent_bitbucket_server_import_jobs_limit": { + "type": "integer", + "minimum": 1, + "description": "Maximum number of simultaneous import jobs for Bitbucket Server importer" + }, + "concurrent_github_import_jobs_limit": { + "type": "integer", + "minimum": 1, + "description": "Maximum number of simultaneous import jobs for GitHub importer" + }, "members_delete_limit": { "type": "integer", "minimum": 0, diff --git a/app/views/admin/application_settings/_import_and_export.html.haml b/app/views/admin/application_settings/_import_and_export.html.haml index 8e321406bf8e1d095ee8773f6264305e75cde258..e1c2d727342151268c329c1e44af8f993556369a 100644 --- a/app/views/admin/application_settings/_import_and_export.html.haml +++ b/app/views/admin/application_settings/_import_and_export.html.haml @@ -40,4 +40,13 @@ = f.label :decompress_archive_file_timeout, s_('Import|Timeout for decompressing archived files (seconds)'), class: 'label-light' = f.number_field :decompress_archive_file_timeout, class: 'form-control gl-form-input', title: s_('Import|Timeout for decompressing archived files.'), data: { toggle: 'tooltip', container: 'body' } %span.form-text.text-muted= _('Set to 0 to disable timeout.') + .form-group + = f.label :concurrent_github_import_jobs_limit, s_('Import|Maximum number of simultaneous import jobs for GitHub importer'), class: 'label-light' + = f.number_field :concurrent_github_import_jobs_limit, class: 'form-control gl-form-input', title: s_('Import|Maximum number of simultaneous import jobs for GitHub importer'), data: { toggle: 'tooltip', container: 'body' } + .form-group + = f.label :concurrent_bitbucket_import_jobs_limit, s_('Import|Maximum number of simultaneous import jobs for Bitbucket Cloud importer'), class: 'label-light' + = f.number_field :concurrent_bitbucket_import_jobs_limit, class: 'form-control gl-form-input', title: s_('Import|Maximum number of simultaneous import jobs for Bitbucket Cloud importer'), data: { toggle: 'tooltip', container: 'body' } + .form-group + = f.label :concurrent_bitbucket_server_import_jobs_limit, s_('Import|Maximum number of simultaneous import jobs for Bitbucket Server importer'), class: 'label-light' + = f.number_field :concurrent_bitbucket_server_import_jobs_limit, class: 'form-control gl-form-input', title: s_('Import|Maximum number of simultaneous import jobs for Bitbucket Server importer'), data: { toggle: 'tooltip', container: 'body' } = f.submit _('Save changes'), pajamas_button: true diff --git a/config/feature_flags/development/github_import_increased_concurrent_workers.yml b/config/feature_flags/development/github_import_increased_concurrent_workers.yml deleted file mode 100644 index 7e5adaadf62fed6a8bc598b73bf2e0f93c5f7714..0000000000000000000000000000000000000000 --- a/config/feature_flags/development/github_import_increased_concurrent_workers.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: github_import_increased_concurrent_workers -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137832 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/432891 -milestone: '16.7' -type: development -group: group::import and integrate -default_enabled: false diff --git a/doc/administration/settings/import_and_export_settings.md b/doc/administration/settings/import_and_export_settings.md index a6030d35b572c9580732b6a85f9a54ae83e15c46..985e4ce8f8430d5a1f44f03a714d1a28f4886bd1 100644 --- a/doc/administration/settings/import_and_export_settings.md +++ b/doc/administration/settings/import_and_export_settings.md @@ -157,3 +157,27 @@ To modify the maximum decompressed file size for imports in GitLab: 1. Select **Settings > General**. 1. Expand **Import and export settings**. 1. Set another value for **Timeout for decompressing archived files (seconds)**. + +## Maximum number of simultaneous import jobs + +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/143875) in GitLab 16.10. + +When you import a project using [GitHub Importer](../../user/project/import/github.md), +[Bitbucket Cloud Importer](../../user/project/import/bitbucket.md) or +[Bitbucket Server Importer](../../user/project/import/bitbucket_server.md), you +can specify the maximum number of import jobs that are executed simultaneously. + +The job limit is not applied when importing merge requests because there is a hard-coded limit for merge requests to avoid overloading servers. + +The default job limit is: + +- For the GitHub importer, 1000. +- For the Bitbucket Cloud and Bitbucket Server importer, 100. The Bitbucket importers have a low default limit because we haven't yet determined + a good default limit. Administrators of self-managed GitLab instances should experiment with a higher limit. + +To modify this setting: + +1. On the left sidebar, at the bottom, select **Admin Area**. +1. Select **Settings > General**. +1. Expand **Import and export settings**. +1. Set another value for **Maximum number of simultaneous import jobs** for the desired importer. diff --git a/doc/api/settings.md b/doc/api/settings.md index 7fb30deb79abee1b46654f4c3c519b1487f78214..55acfb0129f593b848fcdceb7d403d0b74973431 100644 --- a/doc/api/settings.md +++ b/doc/api/settings.md @@ -132,7 +132,10 @@ Example response: "bulk_import_max_download_file_size": 5120, "project_jobs_api_rate_limit": 600, "security_txt_content": null, - "bulk_import_concurrent_pipeline_batch_limit": 25 + "bulk_import_concurrent_pipeline_batch_limit": 25, + "concurrent_github_import_jobs_limit": 1000, + "concurrent_bitbucket_import_jobs_limit": 100, + "concurrent_bitbucket_server_import_jobs_limit": 100 } ``` @@ -283,7 +286,10 @@ Example response: "project_jobs_api_rate_limit": 600, "security_txt_content": null, "bulk_import_concurrent_pipeline_batch_limit": 25, - "downstream_pipeline_trigger_limit_per_project_user_sha": 0 + "downstream_pipeline_trigger_limit_per_project_user_sha": 0, + "concurrent_github_import_jobs_limit": 1000, + "concurrent_bitbucket_import_jobs_limit": 100, + "concurrent_bitbucket_server_import_jobs_limit": 100 } ``` @@ -353,6 +359,9 @@ listed in the descriptions of the relevant settings. | `check_namespace_plan` | boolean | no | Enabling this makes only licensed EE features available to projects if the project namespace's plan includes the feature or if the project is public. Premium and Ultimate only. | | `ci_max_total_yaml_size_bytes` | integer | no | The maximum amount of memory, in bytes, that can be allocated for the pipeline configuration, with all included YAML configuration files. | | `ci_max_includes` | integer | no | The [maximum number of includes](../administration/settings/continuous_integration.md#maximum-includes) per pipeline. Default is `150`. | +| `concurrent_github_import_jobs_limit` | integer | no | Maximum number of simultaneous import jobs for the GitHub importer. Default is 1000. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/143875) in GitLab 16.11. | +| `concurrent_bitbucket_import_jobs_limit` | integer | no | Maximum number of simultaneous import jobs for the Bitbucket Cloud importer. Default is 100. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/143875) in GitLab 16.11. | +| `concurrent_bitbucket_server_import_jobs_limit` | integer | no | Maximum number of simultaneous import jobs for the Bitbucket Server importer. Default is 100. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/143875) in GitLab 16.11. | | `commit_email_hostname` | string | no | Custom hostname (for private commit emails). | | `container_expiration_policies_enable_historic_entries` | boolean | no | Enable [cleanup policies](../user/packages/container_registry/reduce_container_registry_storage.md#enable-the-cleanup-policy) for all projects. | | `container_registry_cleanup_tags_service_max_list_size` | integer | no | The maximum number of tags that can be deleted in a single execution of [cleanup policies](../user/packages/container_registry/reduce_container_registry_storage.md#set-cleanup-limits-to-conserve-resources). | diff --git a/lib/api/settings.rb b/lib/api/settings.rb index 765fa6df154ec09c9e3d16913f3a8d454e28bcdf..4d298b60800b2bf65aa39187518ca754c2870311 100644 --- a/lib/api/settings.rb +++ b/lib/api/settings.rb @@ -216,6 +216,9 @@ def filter_attributes_using_license(attrs) optional :bulk_import_concurrent_pipeline_batch_limit, type: Integer, desc: 'Maximum simultaneous Direct Transfer pipeline batches to process' optional :bulk_import_enabled, type: Boolean, desc: 'Enable migrating GitLab groups and projects by direct transfer' optional :bulk_import_max_download_file, type: Integer, desc: 'Maximum download file size in MB when importing from source GitLab instances by direct transfer' + optional :concurrent_github_import_jobs_limit, type: Integer, desc: 'Github Importer maximum number of simultaneous import jobs' + optional :concurrent_bitbucket_import_jobs_limit, type: Integer, desc: 'Bitbucket Cloud Importer maximum number of simultaneous import jobs' + optional :concurrent_bitbucket_server_import_jobs_limit, type: Integer, desc: 'Bitbucket Server Importer maximum number of simultaneous import jobs' optional :allow_runner_registration_token, type: Boolean, desc: 'Allow registering runners using a registration token' optional :ci_max_includes, type: Integer, desc: 'Maximum number of includes per pipeline' optional :security_policy_global_group_approvers_enabled, type: Boolean, desc: 'Query scan result policy approval groups globally' diff --git a/lib/gitlab/bitbucket_import/importers/pull_requests_importer.rb b/lib/gitlab/bitbucket_import/importers/pull_requests_importer.rb index eedb89c2d49d0cb37ad68a5b020c21a7a94722af..99bf434a396ac53bd780eed84a665386bc0fb0d0 100644 --- a/lib/gitlab/bitbucket_import/importers/pull_requests_importer.rb +++ b/lib/gitlab/bitbucket_import/importers/pull_requests_importer.rb @@ -42,6 +42,12 @@ def collection_method def id_for_already_enqueued_cache(object) object.iid end + + # To avoid overloading Gitaly, we use a smaller limit for pull requests than the one defined in the + # application settings. + def concurrent_import_jobs_limit + 100 + end end end end diff --git a/lib/gitlab/bitbucket_import/parallel_scheduling.rb b/lib/gitlab/bitbucket_import/parallel_scheduling.rb index 09d1eb683195b92f49d5a6fc5ba0c6dadc9e0072..1cc5855be76a3f9828f1fd467cbf53484e98539a 100644 --- a/lib/gitlab/bitbucket_import/parallel_scheduling.rb +++ b/lib/gitlab/bitbucket_import/parallel_scheduling.rb @@ -16,8 +16,6 @@ module ParallelScheduling JOB_WAITER_CACHE_KEY = 'bitbucket-importer/job-waiter/%{project}/%{collection}' - BATCH_SIZE = 100 - # project - An instance of `Project`. def initialize(project) @project = project @@ -77,7 +75,7 @@ def mark_as_enqueued(object) def calculate_job_delay(job_index) runtime = Time.current - job_started_at - multiplier = (job_index / BATCH_SIZE.to_f) + multiplier = (job_index / concurrent_import_jobs_limit.to_f) (multiplier * 1.minute) + 1.second - runtime end @@ -85,6 +83,10 @@ def calculate_job_delay(job_index) def job_started_at @job_started_at ||= Time.current end + + def concurrent_import_jobs_limit + Gitlab::CurrentSettings.concurrent_bitbucket_import_jobs_limit + end end end end diff --git a/lib/gitlab/bitbucket_server_import/importers/pull_requests_importer.rb b/lib/gitlab/bitbucket_server_import/importers/pull_requests_importer.rb index 5d92a2565a70f27ce896ceaad73a835b003f8fad..32939aeb03ed77d20e280b800fd2d78abb5f6f0a 100644 --- a/lib/gitlab/bitbucket_server_import/importers/pull_requests_importer.rb +++ b/lib/gitlab/bitbucket_server_import/importers/pull_requests_importer.rb @@ -6,20 +6,17 @@ module Importers class PullRequestsImporter include ParallelScheduling - # Reduce fetch limit (from 100) to avoid Gitlab::Git::ResourceExhaustedError - PULL_REQUESTS_BATCH_SIZE = 50 - def execute page = 1 loop do log_info( import_stage: 'import_pull_requests', - message: "importing page #{page} using batch-size #{PULL_REQUESTS_BATCH_SIZE}" + message: "importing page #{page} using batch-size #{concurrent_import_jobs_limit}" ) pull_requests = client.pull_requests( - project_key, repository_slug, page_offset: page, limit: PULL_REQUESTS_BATCH_SIZE + project_key, repository_slug, page_offset: page, limit: concurrent_import_jobs_limit ).to_a break if pull_requests.empty? @@ -110,6 +107,13 @@ def source_branch_commit(source_branch_sha, pull_request) def target_branch_commit(target_branch_sha) [target_branch_sha, ':refs/keep-around/', target_branch_sha].join end + + # To avoid overloading Gitaly, we use a smaller limit for pull requests than the one defined in the + # application settings. + def concurrent_import_jobs_limit + # Reduce fetch limit (from 100) to avoid Gitlab::Git::ResourceExhaustedError + 50 + end end end end diff --git a/lib/gitlab/bitbucket_server_import/parallel_scheduling.rb b/lib/gitlab/bitbucket_server_import/parallel_scheduling.rb index 503dfc37ac22199b689987d563cbf69ba9c39867..fbaa0916dc6ab8f93857638893212673f675c76c 100644 --- a/lib/gitlab/bitbucket_server_import/parallel_scheduling.rb +++ b/lib/gitlab/bitbucket_server_import/parallel_scheduling.rb @@ -15,8 +15,6 @@ module ParallelScheduling JOB_WAITER_CACHE_KEY = 'bitbucket-server-importer/job-waiter/%{project}/%{collection}' - BATCH_SIZE = 100 - # project - An instance of `Project`. def initialize(project) @project = project @@ -84,7 +82,7 @@ def mark_as_processed(object) def calculate_job_delay(job_index) runtime = Time.current - job_started_at - multiplier = (job_index / BATCH_SIZE.to_f) + multiplier = (job_index / concurrent_import_jobs_limit.to_f) (multiplier * 1.minute) + 1.second - runtime end @@ -93,6 +91,10 @@ def job_started_at @job_started_at ||= Time.current end + def concurrent_import_jobs_limit + Gitlab::CurrentSettings.concurrent_bitbucket_server_import_jobs_limit + end + def track_import_failure!(project, exception:, **args) Gitlab::Import::ImportFailureService.track( project_id: project.id, diff --git a/lib/gitlab/github_import/importer/pull_requests_importer.rb b/lib/gitlab/github_import/importer/pull_requests_importer.rb index 671e023e90ba0123748d9abe3857e6303280fe1e..cffe984612cd07060a71d18bf20711dd22a9ff6e 100644 --- a/lib/gitlab/github_import/importer/pull_requests_importer.rb +++ b/lib/gitlab/github_import/importer/pull_requests_importer.rb @@ -74,6 +74,8 @@ def collection_options { state: 'all', sort: 'created', direction: 'asc' } end + # To avoid overloading Gitaly, we use a smaller limit for pull requests than the one defined in the + # application settings. def parallel_import_batch { size: 200, delay: 1.minute } end diff --git a/lib/gitlab/github_import/job_delay_calculator.rb b/lib/gitlab/github_import/job_delay_calculator.rb index a456e198afdee18b4d8614aa24027baace494a8c..a9aa3887f58882d42183e65c803a74820ac0d154 100644 --- a/lib/gitlab/github_import/job_delay_calculator.rb +++ b/lib/gitlab/github_import/job_delay_calculator.rb @@ -7,9 +7,7 @@ module GithubImport module JobDelayCalculator # Default batch settings for parallel import (can be redefined in Importer/Worker classes) def parallel_import_batch - batch_size = Feature.enabled?(:github_import_increased_concurrent_workers, project.creator) ? 5000 : 1000 - - { size: batch_size, delay: 1.minute } + { size: Gitlab::CurrentSettings.concurrent_github_import_jobs_limit, delay: 1.minute } end private diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 0ec9466fe93078d6785d151dc8ac93af3c19ddae..7fb53e4ada1dfe788c2f9651ffbd2c0e5935ab73 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -25807,6 +25807,15 @@ msgstr "" msgid "Import|Maximum import remote file size (MiB)" msgstr "" +msgid "Import|Maximum number of simultaneous import jobs for Bitbucket Cloud importer" +msgstr "" + +msgid "Import|Maximum number of simultaneous import jobs for Bitbucket Server importer" +msgstr "" + +msgid "Import|Maximum number of simultaneous import jobs for GitHub importer" +msgstr "" + msgid "Import|Maximum remote file size for imports from external object storages. For example, AWS S3." msgstr "" diff --git a/spec/lib/gitlab/bitbucket_import/parallel_scheduling_spec.rb b/spec/lib/gitlab/bitbucket_import/parallel_scheduling_spec.rb index 7aedc8e1466c5b34cb4ad96fd05251724b8db61d..269ff6631e636bef868744e653164ba335f848fb 100644 --- a/spec/lib/gitlab/bitbucket_import/parallel_scheduling_spec.rb +++ b/spec/lib/gitlab/bitbucket_import/parallel_scheduling_spec.rb @@ -19,7 +19,7 @@ def collection_method let(:importer) { importer_class.new(project) } before do - stub_const("#{described_class}::BATCH_SIZE", 2) + stub_application_setting(concurrent_bitbucket_import_jobs_limit: 2) end it 'returns an incremental delay', :freeze_time do diff --git a/spec/lib/gitlab/bitbucket_server_import/parallel_scheduling_spec.rb b/spec/lib/gitlab/bitbucket_server_import/parallel_scheduling_spec.rb index bfd701a6ea46eeeda8307a25e612ba681cb642bc..86ea83e830c3e354d0d9d1de639bb0e0a835f9cf 100644 --- a/spec/lib/gitlab/bitbucket_server_import/parallel_scheduling_spec.rb +++ b/spec/lib/gitlab/bitbucket_server_import/parallel_scheduling_spec.rb @@ -19,7 +19,7 @@ def collection_method let(:importer) { importer_class.new(project) } before do - stub_const("#{described_class}::BATCH_SIZE", 2) + stub_application_setting(concurrent_bitbucket_server_import_jobs_limit: 2) end it 'returns an incremental delay', :freeze_time do diff --git a/spec/lib/gitlab/github_import/job_delay_calculator_spec.rb b/spec/lib/gitlab/github_import/job_delay_calculator_spec.rb index 3ddf8136dcf88818c855348686c67d2403bfd985..55e5965fd5d7d5018c7ec032a0ebed1fe62dd21f 100644 --- a/spec/lib/gitlab/github_import/job_delay_calculator_spec.rb +++ b/spec/lib/gitlab/github_import/job_delay_calculator_spec.rb @@ -20,14 +20,10 @@ def initialize(project) describe "#parallel_import_batch" do subject { importer_class.new(project).parallel_import_batch } - it { is_expected.to eq({ size: 5000, delay: 1.minute }) } - - context 'when `github_import_increased_concurrent_workers` feature flag is disabled' do - before do - stub_feature_flags(github_import_increased_concurrent_workers: false) - end - - it { is_expected.to eq({ size: 1000, delay: 1.minute }) } + before do + stub_application_setting(concurrent_github_import_jobs_limit: 10) end + + it { is_expected.to eq({ size: 10, delay: 1.minute }) } end end diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb index db6b987ca267c1b4f54818c7faedecaf2e96f8e6..09d8743304b67677582b1e6a0d279d0ce118fff7 100644 --- a/spec/models/application_setting_spec.rb +++ b/spec/models/application_setting_spec.rb @@ -31,6 +31,9 @@ it { expect(setting.members_delete_limit).to eq(60) } it { expect(setting.downstream_pipeline_trigger_limit_per_project_user_sha).to eq(0) } it { expect(setting.asciidoc_max_includes).to eq(32) } + it { expect(setting.concurrent_github_import_jobs_limit).to eq(1000) } + it { expect(setting.concurrent_bitbucket_import_jobs_limit).to eq(100) } + it { expect(setting.concurrent_bitbucket_server_import_jobs_limit).to eq(100) } end describe 'validations' do diff --git a/spec/requests/api/settings_spec.rb b/spec/requests/api/settings_spec.rb index 018e6b9786418ba01d91b9c8c76a107322337ddc..ea8907766e06d0e8aa7b21a2cb7dc1e73aa112c4 100644 --- a/spec/requests/api/settings_spec.rb +++ b/spec/requests/api/settings_spec.rb @@ -96,6 +96,9 @@ expect(json_response['failed_login_attempts_unlock_period_in_minutes']).to be_nil expect(json_response['bulk_import_concurrent_pipeline_batch_limit']).to eq(25) expect(json_response['downstream_pipeline_trigger_limit_per_project_user_sha']).to eq(0) + expect(json_response['concurrent_github_import_jobs_limit']).to eq(1000) + expect(json_response['concurrent_bitbucket_import_jobs_limit']).to eq(100) + expect(json_response['concurrent_bitbucket_server_import_jobs_limit']).to eq(100) end end @@ -218,7 +221,10 @@ namespace_aggregation_schedule_lease_duration_in_seconds: 400, max_import_remote_file_size: 2, security_txt_content: nil, - downstream_pipeline_trigger_limit_per_project_user_sha: 300 + downstream_pipeline_trigger_limit_per_project_user_sha: 300, + concurrent_github_import_jobs_limit: 2, + concurrent_bitbucket_import_jobs_limit: 2, + concurrent_bitbucket_server_import_jobs_limit: 2 } expect(response).to have_gitlab_http_status(:ok) @@ -305,6 +311,9 @@ expect(json_response['security_txt_content']).to be(nil) expect(json_response['bulk_import_concurrent_pipeline_batch_limit']).to be(2) expect(json_response['downstream_pipeline_trigger_limit_per_project_user_sha']).to be(300) + expect(json_response['concurrent_github_import_jobs_limit']).to be(2) + expect(json_response['concurrent_bitbucket_import_jobs_limit']).to be(2) + expect(json_response['concurrent_bitbucket_server_import_jobs_limit']).to be(2) end end diff --git a/spec/workers/concerns/gitlab/github_import/rescheduling_methods_spec.rb b/spec/workers/concerns/gitlab/github_import/rescheduling_methods_spec.rb index 7b8c4fab0c67a16baa76f4733bda11fe6deb1380..9c641c7254f8fa3bf54574992347f655743c6734 100644 --- a/spec/workers/concerns/gitlab/github_import/rescheduling_methods_spec.rb +++ b/spec/workers/concerns/gitlab/github_import/rescheduling_methods_spec.rb @@ -76,7 +76,7 @@ def self.name expect(worker.class) .to receive(:perform_in) - .with(15.012, project.id, { 'number' => 2 }, '123') + .with(15.06, project.id, { 'number' => 2 }, '123') worker.perform(project.id, { 'number' => 2 }, '123') end