summaryrefslogtreecommitdiff
path: root/doc/user/project/import
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-09-20 13:18:24 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-20 13:18:24 +0000
commit0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch)
tree4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /doc/user/project/import
parent744144d28e3e7fddc117924fef88de5d9674fe4c (diff)
downloadgitlab-ce-0653e08efd039a5905f3fa4f6e9cef9f5d2f799c.tar.gz
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'doc/user/project/import')
-rw-r--r--doc/user/project/import/bitbucket.md18
-rw-r--r--doc/user/project/import/github.md88
-rw-r--r--doc/user/project/import/index.md2
-rw-r--r--doc/user/project/import/jira.md2
4 files changed, 83 insertions, 27 deletions
diff --git a/doc/user/project/import/bitbucket.md b/doc/user/project/import/bitbucket.md
index 802eb3efc51..cda018a0c37 100644
--- a/doc/user/project/import/bitbucket.md
+++ b/doc/user/project/import/bitbucket.md
@@ -16,18 +16,18 @@ Import your projects from Bitbucket Cloud to GitLab with minimal effort.
The Bitbucket importer can import:
-- Repository description (GitLab 7.7+)
-- Git repository data (GitLab 7.7+)
-- Issues (GitLab 7.7+)
-- Issue comments (GitLab 8.15+)
-- Pull requests (GitLab 8.4+)
-- Pull request comments (GitLab 8.15+)
-- Milestones (GitLab 8.15+)
-- Wiki (GitLab 8.15+)
+- Repository description
+- Git repository data
+- Issues
+- Issue comments
+- Pull requests
+- Pull request comments
+- Milestones
+- Wiki
When importing:
-- References to pull requests and issues are preserved (GitLab 8.7+).
+- References to pull requests and issues are preserved.
- Repository public access is retained. If a repository is private in Bitbucket, it's created as
private in GitLab as well.
diff --git a/doc/user/project/import/github.md b/doc/user/project/import/github.md
index 1ab343d75fb..4443ae902fb 100644
--- a/doc/user/project/import/github.md
+++ b/doc/user/project/import/github.md
@@ -31,13 +31,18 @@ each imported repository maintains visibility level unless that [visibility
level is restricted](../../../public_access/public_access.md#restrict-use-of-public-or-internal-projects),
in which case it defaults to the default project visibility.
-The namespace is a user or group in GitLab, such as `gitlab.com/janedoe` or `gitlab.com/customer-success`. You can do some bulk actions to move projects to different namespaces in the rails console.
+The namespace is a user or group in GitLab, such as `gitlab.com/janedoe` or
+`gitlab.com/customer-success`. You can do some bulk actions to move projects to
+different namespaces in the rails console.
-This process does not migrate or import any types of groups or organizations from GitHub to GitLab.
+This process does not migrate or import any types of groups or organizations
+from GitHub to GitLab.
## Use cases
-The steps you take depend on whether you are importing from GitHub.com or GitHub Enterprise, as well as whether you are importing to GitLab.com or self-managed GitLab instance.
+The steps you take depend on whether you are importing from GitHub.com or
+GitHub Enterprise. The steps also depend on whether you are importing to GitLab.com or
+self-managed GitLab instance.
- If you're importing to GitLab.com, you can alternatively import GitHub repositories
using a [personal access token](#use-a-github-token). We do not recommend
@@ -49,12 +54,14 @@ The steps you take depend on whether you are importing from GitHub.com or GitHub
- If you're importing from GitHub Enterprise to your self-managed GitLab instance, you must first enable
[GitHub integration](../../../integration/github.md).
- To import projects from GitHub Enterprise to GitLab.com, use the [Import API](../../../api/import.md).
-- If you're importing from GitHub.com to your self-managed GitLab instance, you do not need to set up GitHub integration. You can use the [Import API](../../../api/import.md).
+- If you're importing from GitHub.com to your self-managed GitLab instance,
+ setting up GitHub integration is not required. You can use the [Import API](../../../api/import.md).
## How it works
-When issues and pull requests are being imported, the importer attempts to find their GitHub authors and
-assignees in the database of the GitLab instance (note that pull requests are called "merge requests" in GitLab).
+When issues and pull requests are being imported, the importer attempts to find
+their GitHub authors and assignees in the database of the GitLab instance (note
+that pull requests are called "merge requests" in GitLab).
For this association to succeed, each GitHub author and assignee in the repository
must meet one of the following conditions prior to the import:
@@ -64,12 +71,13 @@ must meet one of the following conditions prior to the import:
that matches their GitLab account's email address.
NOTE:
- GitLab content imports that use GitHub accounts require that the GitHub public-facing
- email address is populated so that all comments and contributions are properly mapped
- to the same user in GitLab. GitHub Enterprise (on premise) does not require this field
- to be populated to use the product, so you may need to add it on existing GitHub Enterprise
- accounts for imported content to be properly mapped to the user in the new system.
- Refer to GitHub documentation for instructions on how to add that address.
+ GitLab content imports that use GitHub accounts require that the GitHub
+ public-facing email address is populated so that all comments and
+ contributions are properly mapped to the same user in GitLab. GitHub
+ Enterprise (on premise) does not require this field to be populated to use the
+ product, so you may have to add it on existing accounts for the imported
+ content to be properly mapped to the user in the new system. Refer to GitHub
+ documentation for instructions on how to add this email address.
If a user referenced in the project is not found in the GitLab database, the project creator (typically the user
that initiated the import process) is set as the author/assignee, but a note on the issue mentioning the original
@@ -132,7 +140,7 @@ If you are not using the GitHub integration, you can still perform an authorizat
1. Copy the token hash.
1. Go back to GitLab and provide the token to the GitHub importer.
1. Hit the **List Your GitHub Repositories** button and wait while GitLab reads your repositories' information.
- Once done, you'll be taken to the importer page to select the repositories to import.
+ Once done, you are taken to the importer page to select the repositories to import.
To use a newer personal access token in imports after previously performing these steps, sign out of
your GitLab account and sign in again, or revoke the older personal access token in GitHub.
@@ -152,7 +160,7 @@ your GitHub repositories are listed.
![GitHub importer page](img/import_projects_from_github_importer_v12_3.png)
-## Mirroring and pipeline status sharing
+## Mirror a repository and share pipeline status
Depending on your GitLab tier, [repository mirroring](../repository/repository_mirroring.md) can be set up to keep
your imported repository in sync with its GitHub copy.
@@ -169,7 +177,7 @@ Mirroring does not sync any new or updated pull requests from your GitHub projec
## Improve the speed of imports on self-managed instances
NOTE:
-Administrator access to the GitLab server is required.
+An administrator role on the GitLab server is required for this process.
For large projects it may take a while to import all data. To reduce the time necessary, you can increase the number of
Sidekiq workers that process the following queues:
@@ -183,4 +191,52 @@ servers. For 4 servers with 8 cores this means you can import up to 32 objects (
Reducing the time spent in cloning a repository can be done by increasing network throughput, CPU capacity, and disk
performance (by using high performance SSDs, for example) of the disks that store the Git repositories (for your GitLab instance).
-Increasing the number of Sidekiq workers will *not* reduce the time spent cloning repositories.
+Increasing the number of Sidekiq workers does *not* reduce the time spent cloning repositories.
+
+## Alternative way to import notes and diff notes
+
+When GitHub Importer runs on extremely large projects not all notes & diff notes can be imported due to GitHub API `issues_comments` & `pull_requests_comments` endpoints limitation.
+Not all pages can be fetched due to the following error coming from GitHub API: `In order to keep the API fast for everyone, pagination is limited for this resource. Check the rel=last link relation in the Link response header to see how far back you can traverse.`.
+
+An alternative approach for importing notes and diff notes is available behind a feature flag.
+
+Instead of using `issues_comments` and `pull_requests_comments`, use individual resources `issue_comments` and `pull_request_comments` instead to pull notes from one object at a time.
+This allows us to carry over any missing comments, however it increases the number of network requests required to perform the import, which means its execution takes a longer time.
+
+To use the alternative way of importing notes, the `github_importer_single_endpoint_notes_import` feature flag must be enabled on the group project is being imported into.
+
+Start a [Rails console](../../../administration/operations/rails_console.md#starting-a-rails-console-session).
+
+```ruby
+group = Group.find_by_full_path('my/group/fullpath')
+
+# Enable
+Feature.enable(:github_importer_single_endpoint_notes_import, group)
+
+# Disable
+Feature.disable(:github_importer_single_endpoint_notes_import, group)
+```
+
+## Reduce GitHub API request objects per page
+
+Some GitHub API endpoints may return a 500 or 502 error for project imports from large repositories.
+To reduce the chance of such errors, you can enable the feature flag
+`github_importer_lower_per_page_limit` in the group project importing the data. This reduces the
+page size from 100 to 50.
+
+To enable this feature flag, start a [Rails console](../../../administration/operations/rails_console.md#starting-a-rails-console-session)
+and run the following `enable` command:
+
+```ruby
+group = Group.find_by_full_path('my/group/fullpath')
+
+# Enable
+Feature.enable(:github_importer_lower_per_page_limit, group)
+```
+
+To disable the feature, run this command:
+
+```ruby
+# Disable
+Feature.disable(:github_importer_lower_per_page_limit, group)
+```
diff --git a/doc/user/project/import/index.md b/doc/user/project/import/index.md
index dcc41c6c85e..65e1eafa477 100644
--- a/doc/user/project/import/index.md
+++ b/doc/user/project/import/index.md
@@ -76,7 +76,7 @@ a self-managed instance from an old server to a new server.
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](https://docs.gitlab.com/omnibus/package-information/deprecated_os.md).
+as the same GitLab version [is available for installation](../../../administration/package_information/deprecated_os.md).
To instead merge two self-managed GitLab instances together, use the instructions in
[Migrate from self-managed GitLab to GitLab.com](#migrate-from-self-managed-gitlab-to-gitlabcom).
diff --git a/doc/user/project/import/jira.md b/doc/user/project/import/jira.md
index 3e0faec0a49..c6992422733 100644
--- a/doc/user/project/import/jira.md
+++ b/doc/user/project/import/jira.md
@@ -4,7 +4,7 @@ group: Project Management
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
-# Import your Jira project issues to GitLab **(PREMIUM)**
+# Import your Jira project issues to GitLab **(FREE)**
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/2766) in GitLab 12.10.