Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2024-01-19 15:08:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2024-01-19 15:08:34 +0300
commit7344cec8c24f1599086498ba19096cf9918ee168 (patch)
tree9ea5ff98be0cfbe489d328c4aa00ebc4db34c743
parentebcd8f42811c2cf265f442fcdbe4a4e3eb85f551 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/models/vulnerability.rb6
-rw-r--r--app/views/groups/group_members/index.html.haml1
-rw-r--r--app/views/projects/_files.html.haml2
-rw-r--r--app/views/projects/blob/_new_dir.html.haml21
-rw-r--r--config/sidekiq_queues.yml2
-rw-r--r--config/webpack.config.js1
-rw-r--r--db/docs/cluster_agents.yml10
-rw-r--r--db/docs/cluster_enabled_grants.yml5
-rw-r--r--db/docs/cluster_groups.yml10
-rw-r--r--db/docs/cluster_projects.yml10
-rw-r--r--doc/administration/license_file.md4
-rw-r--r--doc/api/import.md5
-rw-r--r--doc/api/project_import_export.md6
-rw-r--r--doc/subscriptions/gitlab_dedicated/index.md5
-rw-r--r--doc/subscriptions/self_managed/index.md4
-rw-r--r--doc/update/package/index.md22
-rw-r--r--doc/user/gitlab_com/index.md12
-rw-r--r--doc/user/group/import/index.md7
-rw-r--r--doc/user/group/value_stream_analytics/index.md1
-rw-r--r--doc/user/permissions.md2
-rw-r--r--doc/user/project/import/bitbucket_server.md4
-rw-r--r--doc/user/project/import/github.md5
-rw-r--r--doc/user/project/import/gitlab_com.md1
-rw-r--r--doc/user/project/import/index.md106
-rw-r--r--doc/user/project/import/repo_by_url.md5
-rw-r--r--doc/user/project/members/share_project_with_groups.md13
-rw-r--r--doc/user/project/working_with_projects.md16
-rw-r--r--lefthook.yml2
-rw-r--r--locale/gitlab.pot3
-rw-r--r--spec/scripts/internal_events/cli_spec.rb169
-rw-r--r--workhorse/internal/config/config.go14
-rw-r--r--workhorse/internal/config/config_test.go28
-rw-r--r--workhorse/main.go11
33 files changed, 245 insertions, 268 deletions
diff --git a/app/models/vulnerability.rb b/app/models/vulnerability.rb
index c8f9e75a389..3e307ae77a0 100644
--- a/app/models/vulnerability.rb
+++ b/app/models/vulnerability.rb
@@ -3,12 +3,6 @@
# Placeholder class for model that is implemented in EE
class Vulnerability < ApplicationRecord
include EachBatch
- include IgnorableColumns
-
- ignore_column %i[due_date due_date_sourcing_milestone_id epic_id milestone_id
- last_edited_at last_edited_by_id start_date start_date_sourcing_milestone_id updated_by_id],
- remove_with: '16.9',
- remove_after: '2024-01-19'
alias_attribute :vulnerability_id, :id
diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml
index 0df30a6d445..fbfaaa49b39 100644
--- a/app/views/groups/group_members/index.html.haml
+++ b/app/views/groups/group_members/index.html.haml
@@ -9,7 +9,6 @@
= _('Group members')
%p.gl-w-full.order-md-1
= group_member_header_subtext(@group)
- = render_if_exists 'groups/group_members/link_to_pending_members'
.gl-display-flex.gl-flex-wrap.gl-align-items-center.gl-gap-3.gl-md-w-auto.gl-w-full
.js-invite-group-trigger{ data: { classes: 'gl-md-w-auto gl-w-full', display_text: _('Invite a group') } }
- if can_admin_service_accounts?(@group)
diff --git a/app/views/projects/_files.html.haml b/app/views/projects/_files.html.haml
index 5c9448a30a4..9a7e7f65893 100644
--- a/app/views/projects/_files.html.haml
+++ b/app/views/projects/_files.html.haml
@@ -30,5 +30,3 @@
= render 'stat_anchor_list', anchors: @project.statistics_buttons(show_auto_devops_callout: show_auto_devops_callout), project_buttons: true
#js-tree-list{ data: vue_file_list_data(project, ref) }
- - if can_edit_tree?
- = render 'projects/blob/new_dir'
diff --git a/app/views/projects/blob/_new_dir.html.haml b/app/views/projects/blob/_new_dir.html.haml
deleted file mode 100644
index f1da9154df9..00000000000
--- a/app/views/projects/blob/_new_dir.html.haml
+++ /dev/null
@@ -1,21 +0,0 @@
-#modal-create-new-dir.modal
- .modal-dialog.modal-lg
- .modal-content
- .modal-header
- %h1.page-title.gl-font-size-h-display= _('Create New Directory')
- %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
- %span{ "aria-hidden": "true" } &times;
- .modal-body
- = form_tag project_create_dir_path(@project, @id), method: :post, remote: false, class: 'js-create-dir-form js-quick-submit js-requires-input' do
- .form-group.row
- = label_tag :dir_name, _('Directory name'), class: 'col-form-label col-sm-2'
- .col-sm-10
- = text_field_tag :dir_name, params[:dir_name], required: true, class: 'form-control'
-
- = render 'shared/new_commit_form', placeholder: _("Add new directory")
-
- .form-actions
- = submit_tag _("Create directory"), class: 'btn gl-button btn-confirm'
- = link_button_to _('Cancel'), '#', "data-dismiss" => "modal"
-
- = render 'shared/projects/edit_information'
diff --git a/config/sidekiq_queues.yml b/config/sidekiq_queues.yml
index 27ad09e60f2..1383ed290f2 100644
--- a/config/sidekiq_queues.yml
+++ b/config/sidekiq_queues.yml
@@ -655,6 +655,8 @@
- 1
- - search_elastic_group_association_deletion
- 1
+- - search_elastic_trigger_indexing
+ - 1
- - search_namespace_index_integrity
- 1
- - search_project_index_integrity
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 5e3425a20eb..ea26d9baf92 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -369,6 +369,7 @@ module.exports = {
{
loader: 'worker-loader',
options: {
+ publicPath: './',
filename: '[name].[contenthash:8].worker.js',
},
},
diff --git a/db/docs/cluster_agents.yml b/db/docs/cluster_agents.yml
index 237d8d23bfd..1c8417613cf 100644
--- a/db/docs/cluster_agents.yml
+++ b/db/docs/cluster_agents.yml
@@ -7,4 +7,12 @@ feature_categories:
description: Represents a GitLab Agent for Kubernetes installed in a Kubernetes cluster
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33228
milestone: '13.3'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+allow_cross_joins:
+- gitlab_main_clusterwide
+allow_cross_transactions:
+- gitlab_main_clusterwide
+allow_cross_foreign_keys:
+- gitlab_main_clusterwide
+sharding_key:
+ project_id: projects
diff --git a/db/docs/cluster_enabled_grants.yml b/db/docs/cluster_enabled_grants.yml
index 59f896f198d..7c89d562608 100644
--- a/db/docs/cluster_enabled_grants.yml
+++ b/db/docs/cluster_enabled_grants.yml
@@ -4,7 +4,10 @@ classes:
- Clusters::ClusterEnabledGrant
feature_categories:
- deployment_management
-description: Persists information about namespaces which got an extended life for certificate based clusters
+description: Persists information about namespaces which got an extended life for
+ certificate based clusters
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/87149
milestone: '15.1'
gitlab_schema: gitlab_main_cell
+sharding_key:
+ namespace_id: namespaces
diff --git a/db/docs/cluster_groups.yml b/db/docs/cluster_groups.yml
index 70c11431acf..ddc15764419 100644
--- a/db/docs/cluster_groups.yml
+++ b/db/docs/cluster_groups.yml
@@ -7,4 +7,12 @@ feature_categories:
description: "(Deprecated) Join table between 'clusters' and 'namespaces'"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/0e15eec86d83cbdfefe17966bf5c02e4d419a34d
milestone: '11.5'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+allow_cross_joins:
+- gitlab_main_clusterwide
+allow_cross_transactions:
+- gitlab_main_clusterwide
+allow_cross_foreign_keys:
+- gitlab_main_clusterwide
+sharding_key:
+ group_id: namespaces
diff --git a/db/docs/cluster_projects.yml b/db/docs/cluster_projects.yml
index 152b60ea87b..1313e5938d4 100644
--- a/db/docs/cluster_projects.yml
+++ b/db/docs/cluster_projects.yml
@@ -7,4 +7,12 @@ feature_categories:
description: "(Deprecated) Join table between 'clusters' and 'projects'"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/d0cff7f5855f91b5479f9fdaa39d8d95ec691a9e
milestone: '10.2'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+allow_cross_joins:
+- gitlab_main_clusterwide
+allow_cross_transactions:
+- gitlab_main_clusterwide
+allow_cross_foreign_keys:
+- gitlab_main_clusterwide
+sharding_key:
+ project_id: projects
diff --git a/doc/administration/license_file.md b/doc/administration/license_file.md
index fc1de38bb11..26656271217 100644
--- a/doc/administration/license_file.md
+++ b/doc/administration/license_file.md
@@ -68,7 +68,9 @@ a license, add the license in the **Admin Area** in the web user interface.
If you use a license file or key to activate your instance in an offline environment, you must submit your license
usage data monthly.
To submit the data, [export your license usage](../subscriptions/self_managed/index.md#export-your-license-usage)
-and send it by email to the renewals service, `renewals-service@customers.gitlab.com`.
+and send it by email to the renewals service, `renewals-service@customers.gitlab.com`. You must not open the license
+usage file before you send it. Otherwise, the file's content could be manipulated by the used program (for example,
+timestamps could be converted to another format) and cause failures when the file is being processed.
If you don't submit your data each month after your subscription start date, an email is sent to the address
associated with your subscription and a banner displays to remind you to submit your data. The banner displays
diff --git a/doc/api/import.md b/doc/api/import.md
index 3bb3417e212..e378958077a 100644
--- a/doc/api/import.md
+++ b/doc/api/import.md
@@ -210,11 +210,6 @@ curl --request POST \
}'
```
-## Automate group and project import **(PREMIUM ALL)**
-
-For information on automating user, group, and project import API calls, see
-[Automate group and project import](../user/project/import/index.md#automate-group-and-project-import).
-
## Related topics
- [Group migration by direct transfer API](bulk_imports.md).
diff --git a/doc/api/project_import_export.md b/doc/api/project_import_export.md
index 974694e0808..1cf276b4f60 100644
--- a/doc/api/project_import_export.md
+++ b/doc/api/project_import_export.md
@@ -11,6 +11,12 @@ Use the project import and export API to import and export projects using file t
Before using the project import and export API, you might want to use the
[group import and export API](group_import_export.md).
+After using the project import and export API, you might want to use the
+[Project-level CI/CD variables API](project_level_variables.md).
+
+You must still migrate your [Container Registry](../user/packages/container_registry/index.md)
+over a series of Docker pulls and pushes. Re-run any CI/CD pipelines to retrieve any build artifacts.
+
## Prerequisites
For prerequisites for project import and export API, see:
diff --git a/doc/subscriptions/gitlab_dedicated/index.md b/doc/subscriptions/gitlab_dedicated/index.md
index 0cf604f620f..e6a6aace3b4 100644
--- a/doc/subscriptions/gitlab_dedicated/index.md
+++ b/doc/subscriptions/gitlab_dedicated/index.md
@@ -111,11 +111,10 @@ With GitLab Dedicated, you must [install the GitLab Runner application](https://
To help you migrate your data to GitLab Dedicated, you can choose from the following options:
1. When migrating from another GitLab instance, you can either:
- - Use the UI, including [group import](../../user/group/import/index.md) and [project import](../../user/project/settings/import_export.md).
+ - Use the UI, by using [direct transfer](../../user/group/import/index.md) to import groups and projects.
- Use APIs, including the [group import API](../../api/group_import_export.md) and [project import API](../../api/project_import_export.md).
- - Note: Import functionality behind a feature flag (such as `bulk_import_project`) is not supported in GitLab Dedicated.
1. When migrating from third-party services, you can use [the GitLab importers](../../user/project/import/index.md#supported-import-sources).
-1. You can perform a fully-automated migration through the [Congregate Automation Tool](../../user/project/import/index.md#automate-group-and-project-import), which supports migrating from existing GitLab instances as well as third-party services.
+1. You can also engage [Professional Services](../../user/project/import/index.md#migrate-by-engaging-professional-services).
## Features that are not available
diff --git a/doc/subscriptions/self_managed/index.md b/doc/subscriptions/self_managed/index.md
index 9a232256de2..797a59dded6 100644
--- a/doc/subscriptions/self_managed/index.md
+++ b/doc/subscriptions/self_managed/index.md
@@ -274,6 +274,10 @@ NOTES:
- All date timestamps are displayed in UTC.
- A custom format is used for [dates](https://gitlab.com/gitlab-org/gitlab/blob/3be39f19ac3412c089be28553e6f91b681e5d739/config/initializers/date_time_formats.rb#L7) and [times](https://gitlab.com/gitlab-org/gitlab/blob/3be39f19ac3412c089be28553e6f91b681e5d739/config/initializers/date_time_formats.rb#L13) in CSV files.
+WARNING:
+
+Do not open the license usage file. If you open the file, failures might occur when [you submit your license usage data](../../administration/license_file.md#submit-license-usage-data).
+
## Renew your subscription
You can renew your subscription starting from 15 days before your subscription expires. To renew your subscription:
diff --git a/doc/update/package/index.md b/doc/update/package/index.md
index 662590e7f78..45cce799cb0 100644
--- a/doc/update/package/index.md
+++ b/doc/update/package/index.md
@@ -141,21 +141,27 @@ or upgrade command:
```shell
# Ubuntu/Debian
- sudo apt install gitlab-ee=<version>
+ sudo apt install gitlab-ee=<version>-ee.0
# RHEL/CentOS 7 and Amazon Linux 2
- yum install gitlab-ee-<version>
+ sudo yum install gitlab-ee-<version>-ee.0.el7
- # RHEL/Almalinux 8/9 and Amazon Linux 2023
- dnf install gitlab-ee-<version>
+ # RHEL/Almalinux 8/9
+ sudo dnf install gitlab-ee-<version>-ee.0.el8
- # SUSE
- zypper install gitlab-ee=<version>
+ # Amazon Linux 2023
+ sudo dnf install gitlab-ee-<version>-ee.0.amazon2023
+
+ # OpenSUSE Leap 15.5
+ sudo zypper install gitlab-ee=<version>-ee.sles15
+
+ # SUSE Enterprise Server 12.2/12.5
+ sudo zypper install gitlab-ee=<version>-ee.0.sles12
```
NOTE:
-For the GitLab Community Edition, replace `gitlab-ee` with
-`gitlab-ce`.
+For the GitLab Community Edition, replace `ee` with
+`ce`.
## Upgrade using a manually-downloaded package
diff --git a/doc/user/gitlab_com/index.md b/doc/user/gitlab_com/index.md
index 14c80212422..ffa04c6b916 100644
--- a/doc/user/gitlab_com/index.md
+++ b/doc/user/gitlab_com/index.md
@@ -243,18 +243,6 @@ which GitLab you use:
- GitLab self-managed: no import sources are enabled by default and must be
[enabled](../../administration/settings/import_and_export_settings.md#configure-allowed-import-sources).
-| Import source | GitLab.com default | GitLab self-managed default |
-|:----------------------------------------------------------------------------------------------------|:-----------------------|:----------------------------|
-| [Bitbucket Cloud](../project/import/bitbucket.md) | **{check-circle}** Yes | **{dotted-circle}** No |
-| [Bitbucket Server](../project/import/bitbucket_server.md) | **{check-circle}** Yes | **{dotted-circle}** No |
-| [FogBugz](../project/import/fogbugz.md) | **{check-circle}** Yes | **{dotted-circle}** No |
-| [Gitea](../project/import/gitea.md) | **{check-circle}** Yes | **{dotted-circle}** No |
-| [GitLab by direct transfer](../group/import/index.md) | **{check-circle}** Yes | **{dotted-circle}** No |
-| [GitLab using file exports](../project/settings/import_export.md) | **{check-circle}** Yes | **{dotted-circle}** No |
-| [GitHub](../project/import/github.md) | **{check-circle}** Yes | **{dotted-circle}** No |
-| [Manifest file](../project/import/manifest.md) | **{check-circle}** Yes | **{dotted-circle}** No |
-| [Repository by URL](../project/import/repo_by_url.md) | **{check-circle}** Yes | **{dotted-circle}** No |
-
## IP range
GitLab.com uses the IP ranges `34.74.90.64/28` and `34.74.226.0/24` for traffic from its Web/API
diff --git a/doc/user/group/import/index.md b/doc/user/group/import/index.md
index 42a3ce32e89..be9b8f40f97 100644
--- a/doc/user/group/import/index.md
+++ b/doc/user/group/import/index.md
@@ -60,6 +60,8 @@ groups are in the same GitLab instance. Transferring groups is a faster and more
## Known issues
- Because of [issue 406685](https://gitlab.com/gitlab-org/gitlab/-/issues/406685), files with a file name longer than 255 characters are not migrated.
+- In GitLab 16.1 and earlier, you should **not** use direct transfer with
+ [scheduled scan execution policies](../../../user/application_security/policies/scan-execution-policies.md).
- For a list of other known issues, see [epic 6629](https://gitlab.com/groups/gitlab-org/-/epics/6629).
## Estimating migration duration
@@ -535,8 +537,3 @@ Distributing projects in different groups helps to avoid timeouts. If several la
1. Start separate migrations each group and subgroup.
The GitLab UI can only migrate top-level groups. Using the API, you can also migrate subgroups.
-
-## Automate group and project import **(PREMIUM ALL)**
-
-For information on automating user, group, and project import API calls, see
-[Automate group and project import](../../project/import/index.md#automate-group-and-project-import).
diff --git a/doc/user/group/value_stream_analytics/index.md b/doc/user/group/value_stream_analytics/index.md
index 7e077c7065c..8bc8efc890b 100644
--- a/doc/user/group/value_stream_analytics/index.md
+++ b/doc/user/group/value_stream_analytics/index.md
@@ -80,6 +80,7 @@ The following stage events are available:
- Issue closed
- Issue created
- Issue first added to board
+- Issue first added to iteration
- Issue first assigned
- Issue first associated with milestone
- Issue first mentioned
diff --git a/doc/user/permissions.md b/doc/user/permissions.md
index 36e1ae1e0c8..5ac6041d09e 100644
--- a/doc/user/permissions.md
+++ b/doc/user/permissions.md
@@ -476,7 +476,7 @@ To work around the issue, give these users the Guest role or higher to any proje
- Customize permissions on [protected branches](project/protected_branches.md)
- [LDAP user permissions](group/access_and_permissions.md#manage-group-memberships-via-ldap)
- [Value stream analytics permissions](group/value_stream_analytics/index.md#access-permissions-for-value-stream-analytics)
-- [Project aliases](../user/project/import/index.md#project-aliases)
+- [Project aliases](../user/project/working_with_projects.md#project-aliases)
- [Auditor users](../administration/auditor_users.md)
- [Confidential issues](project/issues/confidential_issues.md)
- [Container registry permissions](packages/container_registry/index.md#container-registry-visibility-permissions)
diff --git a/doc/user/project/import/bitbucket_server.md b/doc/user/project/import/bitbucket_server.md
index 572e0edcb90..94b0285c548 100644
--- a/doc/user/project/import/bitbucket_server.md
+++ b/doc/user/project/import/bitbucket_server.md
@@ -145,7 +145,3 @@ for Bitbucket Cloud.
If the project import completes but LFS objects can't be downloaded or cloned, you may be using a
password or personal access token containing special characters. For more information, see
[this issue](https://gitlab.com/gitlab-org/gitlab/-/issues/337769).
-
-## Related topics
-
-- [Automate group and project import](index.md#automate-group-and-project-import)
diff --git a/doc/user/project/import/github.md b/doc/user/project/import/github.md
index 0a539d40605..1aeece2de4d 100644
--- a/doc/user/project/import/github.md
+++ b/doc/user/project/import/github.md
@@ -448,11 +448,6 @@ LoadModule ssl_module lib/httpd/modules/mod_ssl.so
</VirtualHost>
```
-## Automate group and project import **(PREMIUM ALL)**
-
-For information on automating user, group, and project import API calls, see
-[Automate group and project import](index.md#automate-group-and-project-import).
-
## Troubleshooting
### Manually continue a previously failed import process
diff --git a/doc/user/project/import/gitlab_com.md b/doc/user/project/import/gitlab_com.md
index 135b51bf81a..32d5eef0d60 100644
--- a/doc/user/project/import/gitlab_com.md
+++ b/doc/user/project/import/gitlab_com.md
@@ -13,5 +13,4 @@ and removed in GitLab 16.0. To import GitLab projects from GitLab.com to a self-
## Related topics
-- [Automate group and project import](index.md#automate-group-and-project-import)
- [Export a project](../settings/import_export.md#export-a-project-and-its-data)
diff --git a/doc/user/project/import/index.md b/doc/user/project/import/index.md
index 8c9ba408799..cebf5a93f81 100644
--- a/doc/user/project/import/index.md
+++ b/doc/user/project/import/index.md
@@ -14,10 +14,12 @@ To bring existing projects to GitLab, or copy GitLab groups and projects to a di
## Migrate from GitLab to GitLab by using direct transfer
-The best way to migrate GitLab groups and projects between GitLab instances, or in the same GitLab instance, is
+The best way to copy GitLab groups and projects between GitLab instances, or in the same GitLab instance, is
[by using direct transfer](../../group/import/index.md).
-You can also migrate GitLab projects by using a GitLab file export, which is a supported import source.
+Another option is to move GitLab groups using [group transfer](../../group/manage.md#transfer-a-group).
+
+You can also copy GitLab projects by using a GitLab file export, which is a supported import source.
## Supported import sources
@@ -39,28 +41,10 @@ GitLab can import projects from these supported import sources.
| [Gitea](gitea.md) | Import Gitea projects. |
| [GitHub](github.md) | Import from either GitHub.com or GitHub Enterprise. |
| [GitLab export](../settings/import_export.md) | Migrate projects one by one by using a GitLab export file. |
-| [Manifest file](manifest.md) | Upload a manifest file. |
+| [Manifest file](manifest.md) | Upload a manifest file. |
| [Repository by URL](repo_by_url.md) | Provide a Git repository URL to create a new project from. |
-## Other import sources
-
-You can also read information on importing from these other import sources:
-
-- [ClearCase](clearcase.md)
-- [Concurrent Versions System (CVS)](cvs.md)
-- [Jira (issues only)](jira.md)
-- [Perforce Helix](perforce.md)
-- [Team Foundation Version Control (TFVC)](tfvc.md)
-
-### Import repositories from Subversion
-
-GitLab can not automatically migrate Subversion repositories to Git. Converting Subversion repositories to Git can be
-difficult, but several tools exist including:
-
-- [`git svn`](https://git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git), for very small and basic repositories.
-- [`reposurgeon`](http://www.catb.org/~esr/reposurgeon/repository-editing.html), for larger and more complex repositories.
-
-## Security
+### Disable unused import sources
Only import projects from sources you trust. If you import a project from an untrusted source,
an attacker could steal your sensitive data. For example, an imported project
@@ -74,31 +58,23 @@ GitLab self-managed administrators can reduce their attack surface by disabling
1. Scroll to **Import sources**.
1. Clear checkboxes for importers that are not required.
-In GitLab 16.1 and earlier, you should **not** use direct transfer with [scheduled scan execution policies](../../../user/application_security/policies/scan-execution-policies.md).
-
-## Migrate using the API
-
-To migrate all data from self-managed to GitLab.com, you can leverage the [API](../../../api/rest/index.md).
-Migrate the assets in this order:
-
-1. [Groups](../../../api/groups.md)
-1. [Projects](../../../api/projects.md)
-1. [Project variables](../../../api/project_level_variables.md)
+## Other import sources
-You must still migrate your [Container Registry](../../packages/container_registry/index.md)
-over a series of Docker pulls and pushes. Re-run any CI pipelines to retrieve any build artifacts.
+You can also read information on importing from these other import sources:
-## Migrate between two self-managed GitLab instances
+- [ClearCase](clearcase.md)
+- [Concurrent Versions System (CVS)](cvs.md)
+- [Jira (issues only)](jira.md)
+- [Perforce Helix](perforce.md)
+- [Team Foundation Version Control (TFVC)](tfvc.md)
-To migrate from an existing self-managed GitLab instance to a new self-managed GitLab instance,
-you should [back up](../../../administration/backup_restore/index.md)
-the existing instance and restore it on the new instance. For example, you could use this method to migrate a self-managed instance from an old server to a new server.
+### Import repositories from Subversion
-The backups produced don't depend on the operating system running GitLab. You can therefore use
-the restore method to switch between different operating system distributions or versions, as long
-as the same GitLab version [is available for installation](../../../administration/package_information/supported_os.md).
+GitLab can not automatically migrate Subversion repositories to Git. Converting Subversion repositories to Git can be
+difficult, but several tools exist including:
-Administrators can use the [Users API](../../../api/users.md) to migrate users.
+- [`git svn`](https://git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git), for very small and basic repositories.
+- [`reposurgeon`](http://www.catb.org/~esr/reposurgeon/repository-editing.html), for larger and more complex repositories.
## View project import history
@@ -115,57 +91,23 @@ To view project import history:
1. Sign in to GitLab.
1. On the left sidebar, at the top, select **Create new** (**{plus}**) and **New project/repository**.
1. Select **Import project**.
-1. In the upper-right corner, select **History**.
-1. If there are any errors for a particular import, you can see them by selecting **Details**.
+1. In the upper-right corner, select the **History** link.
+1. If there are any errors for a particular import, select **Details** to see them.
The history also includes projects created from [built-in](../index.md#create-a-project-from-a-built-in-template)
or [custom](../index.md#create-a-project-from-a-built-in-template)
templates. GitLab uses [import repository by URL](repo_by_url.md)
to create a new project from a template.
-## LFS authentication
+## Importing projects with LFS objects
When importing a project that contains LFS objects, if the project has an [`.lfsconfig`](https://github.com/git-lfs/git-lfs/blob/main/docs/man/git-lfs-config.adoc)
file with a URL host (`lfs.url`) different from the repository URL host, LFS files are not downloaded.
-## Project aliases **(PREMIUM SELF)**
-
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/3264) in GitLab 12.1.
-
-GitLab repositories are usually accessed with a namespace and a project name. When migrating
-frequently accessed repositories to GitLab, however, you can use project aliases to access those
-repositories with the original name. Accessing repositories through a project alias reduces the risk
-associated with migrating such repositories.
-
-This feature is only available on Git over SSH. Also, only GitLab administrators can create project
-aliases, and they can only do so through the API. For more information, see the
-[Project Aliases API documentation](../../../api/project_aliases.md).
-
-After an administrator creates an alias for a project, you can use the alias to clone the
-repository. For example, if an administrator creates the alias `gitlab` for the project
-`https://gitlab.com/gitlab-org/gitlab`, you can clone the project with
-`git clone git@gitlab.com:gitlab.git` instead of `git clone git@gitlab.com:gitlab-org/gitlab.git`.
-
-## Automate group and project import **(PREMIUM ALL)**
-
-The GitLab Professional Services team uses [Congregate](https://gitlab.com/gitlab-org/professional-services-automation/tools/migration/congregate)
-to orchestrate user, group, and project import API calls. With Congregate, you can migrate data to
-GitLab from:
-
-- Other GitLab instances
-- GitHub Enterprise
-- GitHub.com
-- Bitbucket Server
-- Bitbucket Data Center
-
-For more information, see:
-
-- Information on paid GitLab [migration services](https://about.gitlab.com/services/migration/).
-- [Quick Start](https://gitlab.com/gitlab-org/professional-services-automation/tools/migration/congregate/-/blob/master/docs/using-congregate.md#quick-start).
-- [Frequently Asked Migration Questions](https://gitlab.com/gitlab-org/professional-services-automation/tools/migration/congregate/-/blob/master/customer/famq.md),
- including settings that need checking afterwards and other limitations.
+## Migrate by engaging Professional Services
-For support, customers must enter into a paid engagement with GitLab Professional Services.
+If you prefer, you can engage GitLab Professional Services to migrate groups and projects to GitLab instead of doing it
+yourself. For more information, see the [Professional Services Full Catalog](https://about.gitlab.com/services/catalog/).
## Troubleshooting
diff --git a/doc/user/project/import/repo_by_url.md b/doc/user/project/import/repo_by_url.md
index 3c5a40b8d27..92f1a5cbbe7 100644
--- a/doc/user/project/import/repo_by_url.md
+++ b/doc/user/project/import/repo_by_url.md
@@ -30,8 +30,3 @@ If the repository is too large, the import can timeout.
1. Select **Create project**.
Your newly created project is displayed.
-
-## Automate group and project import **(PREMIUM ALL)**
-
-For information on automating user, group, and project import API calls, see
-[Automate group and project import](index.md#automate-group-and-project-import).
diff --git a/doc/user/project/members/share_project_with_groups.md b/doc/user/project/members/share_project_with_groups.md
index 71b960b15f8..420e51f580b 100644
--- a/doc/user/project/members/share_project_with_groups.md
+++ b/doc/user/project/members/share_project_with_groups.md
@@ -10,6 +10,19 @@ When you want a group to have access to your project,
you can invite [a group](../../group/index.md) to the project.
The group's direct and inherited members get access to the project, which becomes a *shared project*.
+In this case, inherited members are members that are inherited from parent groups into the groups that are shared.
+Only members of the group that is shared get access to the project.
+If you want to give members of a subgroup of the group you are sharing access to the project, you have to share the subgroup.
+
+The following table provides an overview of the group members that get access to a shared project.
+
+| Group member source | Access to shared project |
+|------------------------------------------------------------------|------------------------|
+| Direct member of the group that is shared | **{check-circle}** Yes |
+| Inherited member of the group that is shared | **{check-circle}** Yes |
+| Direct member of a subgroup, but not of the group that is shared | **{dotted-circle}** No |
+| Inherited member of a subgroup, but not of the group that is shared | **{dotted-circle}** No |
+
## Example
For a project that was created by `Group 1`:
diff --git a/doc/user/project/working_with_projects.md b/doc/user/project/working_with_projects.md
index 7d8305519e4..4a6684a72a3 100644
--- a/doc/user/project/working_with_projects.md
+++ b/doc/user/project/working_with_projects.md
@@ -311,6 +311,22 @@ Prerequisites:
1. To use LDAP groups to manage access to a project,
[add the LDAP-synchronized group as a member](../group/manage.md) to the project.
+## Project aliases **(PREMIUM SELF)**
+
+GitLab repositories are usually accessed with a namespace and a project name. When migrating
+frequently accessed repositories to GitLab, however, you can use project aliases to access those
+repositories with the original name. Accessing repositories through a project alias reduces the risk
+associated with migrating such repositories.
+
+This feature is only available on Git over SSH. Also, only GitLab administrators can create project
+aliases, and they can only do so through the API. For more information, see the
+[Project Aliases API documentation](../../api/project_aliases.md).
+
+After an administrator creates an alias for a project, you can use the alias to clone the
+repository. For example, if an administrator creates the alias `gitlab` for the project
+`https://gitlab.com/gitlab-org/gitlab`, you can clone the project with
+`git clone git@gitlab.com:gitlab.git` instead of `git clone git@gitlab.com:gitlab-org/gitlab.git`.
+
## Troubleshooting
When working with projects, you might encounter the following issues, or require alternate methods to complete specific tasks.
diff --git a/lefthook.yml b/lefthook.yml
index c5b9ccf3392..b248768f82f 100644
--- a/lefthook.yml
+++ b/lefthook.yml
@@ -167,6 +167,6 @@ auto-fix:
run: REVEAL_RUBOCOP_TODO=0 bundle exec rubocop --parallel --autocorrect --force-exclusion --no-server {files}
gettext:
tags: backend frontend view haml
- files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD --cached | while read file;do git diff --unified=1 $(git merge-base origin/master HEAD)..HEAD $file | grep -Fqe '_(' && echo $file;done; true
+ files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD) --cached | while read file;do git diff --unified=1 $(git merge-base origin/master HEAD) $file | grep -Fqe '_(' && echo $file;done; true
glob: '*.{haml,rb,js,vue}'
run: tooling/bin/gettext_extractor locale/gitlab.pot
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index aefeeea191d..92bb70a880b 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -53285,9 +53285,6 @@ msgstr ""
msgid "User cap cannot be enabled. The group or one of its subgroups or projects is shared externally."
msgstr ""
-msgid "User caps is enabled for this group, visit the %{pending_members_link_start}pending members%{pending_members_link_end} page to manage them."
-msgstr ""
-
msgid "User created at"
msgstr ""
diff --git a/spec/scripts/internal_events/cli_spec.rb b/spec/scripts/internal_events/cli_spec.rb
index 571517f005b..54169e0dc2d 100644
--- a/spec/scripts/internal_events/cli_spec.rb
+++ b/spec/scripts/internal_events/cli_spec.rb
@@ -3,15 +3,14 @@
require 'fast_spec_helper'
require 'tty/prompt/test'
require_relative '../../../scripts/internal_events/cli'
+require_relative '../../support/helpers/wait_helpers'
RSpec.describe Cli, feature_category: :service_ping do
+ include WaitHelpers
+
let(:prompt) { TTY::Prompt::Test.new }
let(:files_to_cleanup) { [] }
-
- let(:example_timeout) { 3 }
- let(:example_error) { Class.new(Timeout::Error) }
- let(:interaction_timeout) { 1 }
- let(:interaction_error) { Class.new(Timeout::Error) }
+ let(:max_wait_time) { 20 }
let(:event1_filepath) { 'config/events/internal_events_cli_used.yml' }
let(:event1_content) { internal_event_fixture('events/event_with_identifiers.yml') }
@@ -31,19 +30,6 @@ RSpec.describe Cli, feature_category: :service_ping do
delete_files(files_to_cleanup)
end
- around do |example|
- Timeout.timeout(example_timeout, example_error) { example.run }
- rescue example_error => e
- # Override error to include CLI output in error detail
- raise e.class, timeout_error_message, e.backtrace
- end
-
- subject(:execute) do
- Timeout.timeout(interaction_timeout, interaction_error) { described_class.new(prompt).run }
- rescue interaction_error
- # Rescue from timeout so we can make assertions on the CLI output
- end
-
# Shared examples used for examples defined in new_events.yml & new_metrics.yml fixtures.
# Note: Expects CLI to be exited using the 'Exit' option or completing definition flow
shared_examples 'creates the right defintion files' do |description, test_case = {}|
@@ -51,6 +37,7 @@ RSpec.describe Cli, feature_category: :service_ping do
let(:keystrokes) { test_case.dig('inputs', 'keystrokes') || [] }
let(:input_files) { test_case.dig('inputs', 'files') || [] }
let(:output_files) { test_case.dig('outputs', 'files') || [] }
+ let(:timeout_error) { 'Internal Events CLI timed out while awaiting completion.' }
# Script execution should stop without a reduced timeout
let(:interaction_timeout) { example_timeout }
@@ -61,7 +48,7 @@ RSpec.describe Cli, feature_category: :service_ping do
queue_cli_inputs(keystrokes)
expect_file_creation
- execute
+ wait_for_cli_completion
end
private
@@ -90,6 +77,12 @@ RSpec.describe Cli, feature_category: :service_ping do
expect(File).not_to receive(:write)
end
end
+
+ def wait_for_cli_completion
+ with_cli_thread do |thread|
+ wait_for(timeout_error, max_wait_time: max_wait_time) { !thread.alive? }
+ end
+ end
end
context 'when creating new events' do
@@ -138,10 +131,8 @@ RSpec.describe Cli, feature_category: :service_ping do
"\n" # Copy & continue
])
- execute
-
# Filter down to "dev" options
- expect(plain_last_lines(9)).to eq <<~TEXT.chomp
+ expected_output = <<~TEXT.chomp
‣ dev:plan:project_management
dev:plan:product_planning
dev:plan:knowledge
@@ -152,6 +143,8 @@ RSpec.describe Cli, feature_category: :service_ping do
dev:create:editor_extensions
dev:create:code_creation
TEXT
+
+ expect_cli_output { plain_last_lines(9) == expected_output }
end
it 'filters the product group options based on common section & stage' do
@@ -170,16 +163,16 @@ RSpec.describe Cli, feature_category: :service_ping do
"\n" # Copy & continue
])
- execute
-
# Filter down to "dev:create" options
- expect(plain_last_lines(5)).to eq <<~TEXT.chomp
+ expected_output = <<~TEXT.chomp
‣ dev:create:source_code
dev:create:code_review
dev:create:ide
dev:create:editor_extensions
dev:create:code_creation
TEXT
+
+ expect_cli_output { plain_last_lines(5) == expected_output }
end
end
@@ -206,10 +199,10 @@ RSpec.describe Cli, feature_category: :service_ping do
"2\n" # Modify attributes
])
- execute
-
# Filter down to "dev" options
- expect(plain_last_lines(50)).to include 'Select one: Which group owns the metric?'
+ expect_cli_output do
+ plain_last_lines(50).include?('Select one: Which group owns the metric?')
+ end
end
end
@@ -221,13 +214,15 @@ RSpec.describe Cli, feature_category: :service_ping do
it 'shows all metrics options' do
select_event_from_list
- expect(plain_last_lines(5)).to eq <<~TEXT.chomp
+ expected_output = <<~TEXT.chomp
‣ Monthly/Weekly count of unique users [who triggered internal_events_cli_used]
Monthly/Weekly count of unique projects [where internal_events_cli_used occurred]
Monthly/Weekly count of unique namespaces [where internal_events_cli_used occurred]
Monthly/Weekly count of [internal_events_cli_used occurrences]
Total count of [internal_events_cli_used occurrences]
TEXT
+
+ expect_cli_output { plain_last_lines(5) == expected_output }
end
context 'with an existing weekly metric' do
@@ -241,7 +236,7 @@ RSpec.describe Cli, feature_category: :service_ping do
it 'partially filters metric options' do
select_event_from_list
- expect(plain_last_lines(6)).to eq <<~TEXT.chomp
+ expected_output = <<~TEXT.chomp
‣ Monthly/Weekly count of unique users [who triggered internal_events_cli_used]
Monthly/Weekly count of unique projects [where internal_events_cli_used occurred]
Monthly/Weekly count of unique namespaces [where internal_events_cli_used occurred]
@@ -249,6 +244,8 @@ RSpec.describe Cli, feature_category: :service_ping do
✘ Weekly count of [internal_events_cli_used occurrences] (already defined)
Total count of [internal_events_cli_used occurrences]
TEXT
+
+ expect_cli_output { plain_last_lines(6) == expected_output }
end
end
@@ -263,13 +260,15 @@ RSpec.describe Cli, feature_category: :service_ping do
it 'filters whole metric options' do
select_event_from_list
- expect(plain_last_lines(5)).to eq <<~TEXT.chomp
+ expected_output = <<~TEXT.chomp
‣ Monthly/Weekly count of unique users [who triggered internal_events_cli_used]
Monthly/Weekly count of unique projects [where internal_events_cli_used occurred]
Monthly/Weekly count of unique namespaces [where internal_events_cli_used occurred]
Monthly/Weekly count of [internal_events_cli_used occurrences]
✘ Total count of [internal_events_cli_used occurrences] (already defined)
TEXT
+
+ expect_cli_output { plain_last_lines(5) == expected_output }
end
end
@@ -282,8 +281,6 @@ RSpec.describe Cli, feature_category: :service_ping do
'internal_events_cli_used', # Filters to this event
"\n" # Select: config/events/internal_events_cli_used.yml
])
-
- execute
end
end
@@ -300,15 +297,15 @@ RSpec.describe Cli, feature_category: :service_ping do
"\n" # Select: config/events/internal_events_cli_opened.yml
])
- execute
-
- expect(plain_last_lines(5)).to eq <<~TEXT.chomp
+ expected_output = <<~TEXT.chomp
✘ Monthly/Weekly count of unique users [who triggered internal_events_cli_opened] (user unavailable)
✘ Monthly/Weekly count of unique projects [where internal_events_cli_opened occurred] (project unavailable)
✘ Monthly/Weekly count of unique namespaces [where internal_events_cli_opened occurred] (namespace unavailable)
‣ Monthly/Weekly count of [internal_events_cli_opened occurrences]
Total count of [internal_events_cli_opened occurrences]
TEXT
+
+ expect_cli_output { plain_last_lines(5) == expected_output }
end
end
@@ -339,10 +336,9 @@ RSpec.describe Cli, feature_category: :service_ping do
"\n" # Select: config/events/00_event1.yml
])
- execute
+ expected_output = 'Looks like the potential metrics for this event either already exist or are unsupported.'
- expect(plain_last_lines(15)).to include 'Looks like the potential metrics for this event ' \
- 'either already exist or are unsupported.'
+ expect_cli_output { plain_last_lines(15).include?(expected_output) }
end
end
end
@@ -410,13 +406,13 @@ RSpec.describe Cli, feature_category: :service_ping do
"8\n" # Exit
])
- execute
+ expect_cli_output do
+ output = plain_last_lines(100)
- output = plain_last_lines(100)
-
- expect(output).to include expected_example_prompt
- expect(output).to include expected_rails_example
- expect(output).to include expected_rspec_example
+ output.include?(expected_example_prompt) &&
+ output.include?(expected_rails_example) &&
+ output.include?(expected_rspec_example)
+ end
end
end
@@ -577,17 +573,17 @@ RSpec.describe Cli, feature_category: :service_ping do
"8\n" # Exit
])
- execute
+ expect_cli_output do
+ output = plain_last_lines(1000)
- output = plain_last_lines(1000)
-
- expect(output).to include expected_example_prompt
- expect(output).to include expected_rails_example
- expect(output).to include expected_rspec_example
- expect(output).to include expected_vue_example
- expect(output).to include expected_js_example
- expect(output).to include expected_vue_template_example
- expect(output).to include expected_haml_example
+ output.include?(expected_example_prompt) &&
+ output.include?(expected_rails_example) &&
+ output.include?(expected_rspec_example) &&
+ output.include?(expected_vue_example) &&
+ output.include?(expected_js_example) &&
+ output.include?(expected_vue_template_example) &&
+ output.include?(expected_haml_example)
+ end
end
end
@@ -637,13 +633,13 @@ RSpec.describe Cli, feature_category: :service_ping do
"8\n" # Exit
])
- execute
-
- output = plain_last_lines(300)
+ expect_cli_output do
+ output = plain_last_lines(300)
- expect(output).to include expected_example_prompt
- expect(output).to include expected_event1_example
- expect(output).to include expected_event2_example
+ output.include?(expected_example_prompt) &&
+ output.include?(expected_event1_example) &&
+ output.include?(expected_event2_example)
+ end
end
end
end
@@ -756,9 +752,9 @@ RSpec.describe Cli, feature_category: :service_ping do
"n\n" # No --> Are you trying to track customer usage of a GitLab feature?
])
- execute
-
- expect(plain_last_lines(50)).to include("Oh no! This probably isn't the tool you need!")
+ expect_cli_output do
+ plain_last_lines(50).include?("Oh no! This probably isn't the tool you need!")
+ end
end
it "handles when product usage can't be tracked with events" do
@@ -768,9 +764,9 @@ RSpec.describe Cli, feature_category: :service_ping do
"n\n" # No --> Can usage for the feature be measured by tracking a specific user action?
])
- execute
-
- expect(plain_last_lines(50)).to include("Oh no! This probably isn't the tool you need!")
+ expect_cli_output do
+ plain_last_lines(50).include?("Oh no! This probably isn't the tool you need!")
+ end
end
it 'handles when user needs to add a new event' do
@@ -782,9 +778,9 @@ RSpec.describe Cli, feature_category: :service_ping do
"n\n" # No --> Ready to start?
])
- execute
-
- expect(plain_last_lines(30)).to include("Okay! The next step is adding a new event! (~5 min)")
+ expect_cli_output do
+ plain_last_lines(30).include?("Okay! The next step is adding a new event! (~5 min)")
+ end
end
it 'handles when user needs to add a new metric' do
@@ -796,9 +792,9 @@ RSpec.describe Cli, feature_category: :service_ping do
"n\n" # No --> Ready to start?
])
- execute
-
- expect(plain_last_lines(30)).to include("Amazing! The next step is adding a new metric! (~8 min)")
+ expect_cli_output do
+ plain_last_lines(30).include?("Amazing! The next step is adding a new metric! (~8 min)")
+ end
end
end
@@ -809,21 +805,6 @@ RSpec.describe Cli, feature_category: :service_ping do
prompt.input.rewind
end
- def timeout_error_message
- <<~TEXT
- Awaiting input too long. Entire CLI output:
-
- #{
- prompt.output.string.lines
- .map { |line| "\e[0;37m#{line}\e[0m" } # wrap in white
- .join('')
- .gsub("\e[1G", "\e[1G ") # align to error indent
- }
-
-
- TEXT
- end
-
def plain_last_lines(size)
prompt.output.string
.lines
@@ -873,4 +854,16 @@ RSpec.describe Cli, feature_category: :service_ping do
def internal_event_fixture(filepath)
Rails.root.join('spec', 'fixtures', 'scripts', 'internal_events', filepath)
end
+
+ def with_cli_thread
+ thread = Thread.new { described_class.new(prompt).run }
+
+ yield thread
+ ensure
+ thread.exit
+ end
+
+ def expect_cli_output(&blk)
+ with_cli_thread { wait_for(blk.source, max_wait_time: max_wait_time, &blk) }
+ end
end
diff --git a/workhorse/internal/config/config.go b/workhorse/internal/config/config.go
index 562ea05bfd0..c3b55c2a6e5 100644
--- a/workhorse/internal/config/config.go
+++ b/workhorse/internal/config/config.go
@@ -162,6 +162,20 @@ func NewDefaultConfig() *Config {
}
}
+func LoadConfigFromFile(file *string) (*Config, error) {
+ tomlData := ""
+
+ if *file != "" {
+ buf, err := os.ReadFile(*file)
+ if err != nil {
+ return nil, fmt.Errorf("file: %v", err)
+ }
+ tomlData = string(buf)
+ }
+
+ return LoadConfig(tomlData)
+}
+
func LoadConfig(data string) (*Config, error) {
cfg := NewDefaultConfig()
diff --git a/workhorse/internal/config/config_test.go b/workhorse/internal/config/config_test.go
index d3f00021725..6127a5aae55 100644
--- a/workhorse/internal/config/config_test.go
+++ b/workhorse/internal/config/config_test.go
@@ -1,6 +1,7 @@
package config
import (
+ "os"
"path/filepath"
"testing"
@@ -196,3 +197,30 @@ func TestDefaultConfig(t *testing.T) {
require.Equal(t, uint64(250000), cfg.ImageResizerConfig.MaxFilesize)
}
+
+func TestLoadConfigFromFile(t *testing.T) {
+ config := `
+[image_resizer]
+max_filesize = 350000
+`
+
+ fileName := createTempFile(t, []byte(config))
+
+ cfg, err := LoadConfigFromFile(&fileName)
+ require.NoError(t, err)
+
+ require.Equal(t, uint64(350000), cfg.ImageResizerConfig.MaxFilesize)
+}
+
+func createTempFile(t *testing.T, contents []byte) string {
+ t.Helper()
+
+ tmpFile, err := os.CreateTemp(t.TempDir(), "config.toml")
+ require.NoError(t, err)
+ defer tmpFile.Close()
+
+ _, err = tmpFile.Write(contents)
+ require.NoError(t, err)
+
+ return tmpFile.Name()
+}
diff --git a/workhorse/main.go b/workhorse/main.go
index 0c470d36e3e..4d14d60df92 100644
--- a/workhorse/main.go
+++ b/workhorse/main.go
@@ -138,16 +138,7 @@ func buildConfig(arg0 string, args []string) (*bootConfig, *config.Config, error
cfg.CableBackend = cfg.Backend
}
- tomlData := ""
- if *configFile != "" {
- buf, err := os.ReadFile(*configFile)
- if err != nil {
- return nil, nil, fmt.Errorf("configFile: %v", err)
- }
- tomlData = string(buf)
- }
-
- cfgFromFile, err := config.LoadConfig(tomlData)
+ cfgFromFile, err := config.LoadConfigFromFile(configFile)
if err != nil {
return nil, nil, fmt.Errorf("configFile: %v", err)
}