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
path: root/doc
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-07 15:09:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-07 15:09:46 +0300
commit896b68514b43b9646d763e67f63fbe8f9ef2f723 (patch)
treeb0b21f37cbbc809782532e6d6180677c7c4c9e30 /doc
parentd8803c7e40bd35d883ef007ddc56907bd837a748 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r--doc/administration/geo/replication/troubleshooting.md21
-rw-r--r--doc/administration/high_availability/gitlab.md3
-rw-r--r--doc/administration/high_availability/sidekiq.md3
-rw-r--r--doc/administration/lfs/index.md53
-rw-r--r--doc/user/img/gitlab_snippet.pngbin34355 -> 0 bytes
-rw-r--r--doc/user/img/gitlab_snippet_v13_0.pngbin0 -> 28925 bytes
-rw-r--r--doc/user/img/snippet_clone_button_v13_0.pngbin0 -> 33081 bytes
-rw-r--r--doc/user/snippets.md63
8 files changed, 123 insertions, 20 deletions
diff --git a/doc/administration/geo/replication/troubleshooting.md b/doc/administration/geo/replication/troubleshooting.md
index c19b0f775ce..cdc4c3cdc14 100644
--- a/doc/administration/geo/replication/troubleshooting.md
+++ b/doc/administration/geo/replication/troubleshooting.md
@@ -544,6 +544,27 @@ or `gitlab-ctl promote-to-primary-node`, either:
bug](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/22021) was
fixed.
+### Message: ``NoMethodError: undefined method `secondary?' for nil:NilClass``
+
+When [promoting a **secondary** node](../disaster_recovery/index.md#step-3-promoting-a-secondary-node),
+you might encounter the following error:
+
+```plaintext
+sudo gitlab-rake geo:set_secondary_as_primary
+
+rake aborted!
+NoMethodError: undefined method `secondary?' for nil:NilClass
+/opt/gitlab/embedded/service/gitlab-rails/ee/lib/tasks/geo.rake:232:in `block (3 levels) in <top (required)>'
+/opt/gitlab/embedded/service/gitlab-rails/ee/lib/tasks/geo.rake:221:in `block (2 levels) in <top (required)>'
+/opt/gitlab/embedded/bin/bundle:23:in `load'
+/opt/gitlab/embedded/bin/bundle:23:in `<main>'
+Tasks: TOP => geo:set_secondary_as_primary
+(See full trace by running task with --trace)
+```
+
+This command is intended to be executed on a secondary node only, and this error
+is displayed if you attempt to run this command on a primary node.
+
### Message: `sudo: gitlab-pg-ctl: command not found`
When
diff --git a/doc/administration/high_availability/gitlab.md b/doc/administration/high_availability/gitlab.md
index c2860f5452b..6c90c66973d 100644
--- a/doc/administration/high_availability/gitlab.md
+++ b/doc/administration/high_availability/gitlab.md
@@ -133,6 +133,9 @@ need some extra configuration.
1. Run `sudo gitlab-ctl reconfigure` to compile the configuration.
+NOTE: **Note:** You will need to restart the GitLab applications nodes after an update has occurred and database
+migrations performed.
+
## Enable Monitoring
> [Introduced](https://gitlab.com/gitlab-org/omnibus-gitlab/issues/3786) in GitLab 12.0.
diff --git a/doc/administration/high_availability/sidekiq.md b/doc/administration/high_availability/sidekiq.md
index ed273c3b113..2c1dea890af 100644
--- a/doc/administration/high_availability/sidekiq.md
+++ b/doc/administration/high_availability/sidekiq.md
@@ -94,6 +94,9 @@ you want using steps 1 and 2 from the GitLab downloads page.
1. Run `gitlab-ctl reconfigure`.
+NOTE: **Note:** You will need to restart the Sidekiq nodes after an update has occurred and database
+migrations performed.
+
## Example configuration
Here's what the ending `/etc/gitlab/gitlab.rb` would look like:
diff --git a/doc/administration/lfs/index.md b/doc/administration/lfs/index.md
index d333d3ff3b8..e2b982448ef 100644
--- a/doc/administration/lfs/index.md
+++ b/doc/administration/lfs/index.md
@@ -141,18 +141,23 @@ There are two ways to manually do the same thing as automatic uploading (describ
**Option 1: Rake task**
```shell
-rake gitlab:lfs:migrate
+gitlab-rake gitlab:lfs:migrate
```
-**Option 2: rails console**
+**Option 2: Rails console**
+
+Log into the Rails console:
```shell
-$ sudo gitlab-rails console # Login to rails console
+sudo gitlab-rails console
+```
-> # Upload LFS files manually
-> LfsObject.where(file_store: [nil, 1]).find_each do |lfs_object|
-> lfs_object.file.migrate!(ObjectStorage::Store::REMOTE) if lfs_object.file.file.exists?
-> end
+Upload LFS files manually
+
+```ruby
+LfsObject.where(file_store: [nil, 1]).find_each do |lfs_object|
+ lfs_object.file.migrate!(ObjectStorage::Store::REMOTE) if lfs_object.file.file.exists?
+end
```
### S3 for Omnibus installations
@@ -244,19 +249,29 @@ If LFS integration is configured with Google Cloud Storage and background upload
Sidekiq workers may encounter this error. This is because the uploading timed out with very large files.
LFS files up to 6Gb can be uploaded without any extra steps, otherwise you need to use the following workaround.
+Log into Rails console:
+
```shell
-$ sudo gitlab-rails console # Login to rails console
-
-> # Set up timeouts. 20 minutes is enough to upload 30GB LFS files.
-> # These settings are only in effect for the same session, i.e. they are not effective for sidekiq workers.
-> ::Google::Apis::ClientOptions.default.open_timeout_sec = 1200
-> ::Google::Apis::ClientOptions.default.read_timeout_sec = 1200
-> ::Google::Apis::ClientOptions.default.send_timeout_sec = 1200
-
-> # Upload LFS files manually. This process does not use sidekiq at all.
-> LfsObject.where(file_store: [nil, 1]).find_each do |lfs_object|
-> lfs_object.file.migrate!(ObjectStorage::Store::REMOTE) if lfs_object.file.file.exists?
-> end
+sudo gitlab-rails console
+```
+
+Set up timeouts:
+
+- These settings are only in effect for the same session. For example, they are not effective for Sidekiq workers.
+- 20 minutes (1200 sec) is enough to upload 30GB LFS files:
+
+```ruby
+::Google::Apis::ClientOptions.default.open_timeout_sec = 1200
+::Google::Apis::ClientOptions.default.read_timeout_sec = 1200
+::Google::Apis::ClientOptions.default.send_timeout_sec = 1200
+```
+
+Upload LFS files manually (this process does not use Sidekiq at all):
+
+```ruby
+LfsObject.where(file_store: [nil, 1]).find_each do |lfs_object|
+ lfs_object.file.migrate!(ObjectStorage::Store::REMOTE) if lfs_object.file.file.exists?
+end
```
See more information in [!19581](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/19581)
diff --git a/doc/user/img/gitlab_snippet.png b/doc/user/img/gitlab_snippet.png
deleted file mode 100644
index 718347fc2d4..00000000000
--- a/doc/user/img/gitlab_snippet.png
+++ /dev/null
Binary files differ
diff --git a/doc/user/img/gitlab_snippet_v13_0.png b/doc/user/img/gitlab_snippet_v13_0.png
new file mode 100644
index 00000000000..33194c512df
--- /dev/null
+++ b/doc/user/img/gitlab_snippet_v13_0.png
Binary files differ
diff --git a/doc/user/img/snippet_clone_button_v13_0.png b/doc/user/img/snippet_clone_button_v13_0.png
new file mode 100644
index 00000000000..bf681e7349b
--- /dev/null
+++ b/doc/user/img/snippet_clone_button_v13_0.png
Binary files differ
diff --git a/doc/user/snippets.md b/doc/user/snippets.md
index 0372bb42038..79d1751d13f 100644
--- a/doc/user/snippets.md
+++ b/doc/user/snippets.md
@@ -2,7 +2,7 @@
With GitLab Snippets you can store and share bits of code and text with other users.
-![GitLab Snippet](img/gitlab_snippet.png)
+![GitLab Snippet](img/gitlab_snippet_v13_0.png)
Snippets can be maintained using [snippets API](../api/snippets.md).
@@ -11,6 +11,67 @@ There are two types of snippets:
- Personal snippets.
- Project snippets.
+## Versioned Snippets
+
+> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/239) in GitLab 13.0.
+
+Starting in 13.0, snippets (both personal and project snippets)
+have version control enabled by default.
+
+This means that all snippets get their own underlying repository initialized with
+a `master` branch at the moment the snippet is created. Whenever a change to the snippet is saved, a
+new commit to the master branch is recorded. Commit messages are automatically
+generated. The snippet's repository has only one branch (master) by default, deleting
+it or creating other branches is not supported.
+
+Existing snippets will be automatically migrated in 13.0. Their current
+content will be saved as the initial commit to the snippets' repository.
+
+### File names
+
+Snippets support syntax highlighting based on the filename and
+extension provided for them. While it is possible to submit a snippet
+without specifying a filename and extension, it needs a valid name so the
+content can be created as a file in the snippet's repository.
+
+In case the user does not attribute a filename and extension to a snippet,
+GitLab automatically adds a filename in the format `snippetfile<x>.txt`
+where `<x>` represents a number added to the file, starting with 1. This
+number increases incrementally when more snippets without an attributed
+filename are added.
+
+When upgrading from an earlier version of GitLab to 13.0, existing snippets
+without a supported filename will be renamed to a compatible format. For
+example, if the snippet's filename is `http://a-weird-filename.me` it will
+be changed to `http-a-weird-filename-me` to be included in the snippet's
+repository. As snippets are stored by ID, changing their filenames will not break
+direct or embedded links to the snippet.
+
+### Cloning snippets
+
+Snippets can be cloned as a regular Git repository using SSH or HTTPS. Click the **Clone**
+button above the snippet content to copy the URL of your choice.
+
+![Clone Snippet](img/snippet_clone_button_v13_0.png)
+
+This allows you to have a local copy of the snippet's repository and make
+changes as needed. You can commit those changes and push them to the remote
+master branch.
+
+### Limitations
+
+- Binary files are not supported.
+- Creating or deleting branches is not supported. Only a default *master*
+branch is used.
+- Git tags are not supported in snippet repositories.
+- Snippets' repositories are limited to one file. Attempting to push more
+than one file will result in an error.
+- Revisions are not *yet* visible to the user on the GitLab UI, but
+it's planned to be added in future iterations. See the [revisions tab issue](https://gitlab.com/gitlab-org/gitlab/-/issues/39271)
+for updates.
+- The [maximum size for a snippet](../administration/snippets/index.md#snippets-content-size-limit)
+is 50MB, by default.
+
## Personal snippets
Personal snippets are not related to any project and can be created completely