diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/administration/repository_storage_types.md | 2 | ||||
-rw-r--r-- | doc/administration/uploads.md | 12 | ||||
-rw-r--r-- | doc/api/settings.md | 7 | ||||
-rw-r--r-- | doc/api/users.md | 79 | ||||
-rw-r--r-- | doc/ci/yaml/README.md | 4 | ||||
-rw-r--r-- | doc/development/i18n/proofreader.md | 1 | ||||
-rw-r--r-- | doc/development/performance.md | 54 | ||||
-rw-r--r-- | doc/update/patch_versions.md | 16 | ||||
-rw-r--r-- | doc/user/profile/account/two_factor_authentication.md | 2 | ||||
-rw-r--r-- | doc/user/project/integrations/jira.md | 2 |
10 files changed, 134 insertions, 45 deletions
diff --git a/doc/administration/repository_storage_types.md b/doc/administration/repository_storage_types.md index 087fe729b28..88221db78f1 100644 --- a/doc/administration/repository_storage_types.md +++ b/doc/administration/repository_storage_types.md @@ -73,7 +73,7 @@ by another folder with the next 2 characters. They are both stored in a special ### How to migrate to Hashed Storage In GitLab, go to **Admin > Settings**, find the **Repository Storage** section -and select "_Create new projects using hashed storage paths_". +and select "_Use hashed storage paths for newly created and renamed projects_". To migrate your existing projects to the new storage type, check the specific [rake tasks]. diff --git a/doc/administration/uploads.md b/doc/administration/uploads.md index 85eca403253..77e73b23021 100644 --- a/doc/administration/uploads.md +++ b/doc/administration/uploads.md @@ -142,12 +142,6 @@ These task complies with the `BATCH` environment variable to process uploads in gitlab-rake "gitlab:uploads:migrate[FileUploader, MergeRequest]" ``` - Currently this has to be executed manually and it will allow you to - migrate the existing uploads to the object storage, but all new - uploads will still be stored on the local disk. In the future - you will be given an option to define a default storage for all - new files. - --- **In installations from source:** @@ -200,12 +194,6 @@ _The uploads are stored by default in ``` - Currently this has to be executed manually and it will allow you to - migrate the existing uploads to the object storage, but all new - uploads will still be stored on the local disk. In the future - you will be given an option to define a default storage for all - new files. - [reconfigure gitlab]: restart_gitlab.md#omnibus-gitlab-reconfigure "How to reconfigure Omnibus GitLab" [restart gitlab]: restart_gitlab.md#installations-from-source "How to restart GitLab" [eep]: https://about.gitlab.com/gitlab-ee/ "GitLab Enterprise Edition Premium" diff --git a/doc/api/settings.md b/doc/api/settings.md index b6f2101fc7b..68fc56b1fa3 100644 --- a/doc/api/settings.md +++ b/doc/api/settings.md @@ -55,7 +55,8 @@ Example response: "ed25519_key_restriction": 0, "enforce_terms": true, "terms": "Hello world!", - "performance_bar_allowed_group_id": 42 + "performance_bar_allowed_group_id": 42, + "instance_statistics_visibility_private": false } ``` @@ -159,6 +160,7 @@ PUT /application/settings | `version_check_enabled` | boolean | no | Let GitLab inform you when an update is available. | | `enforce_terms` | boolean | no | Enforce application ToS to all users | | `terms` | text | yes (if `enforce_terms` is true) | Markdown content for the ToS | +| `instance_statistics_visibility_private` | boolean | no | When set to `true` Instance statistics will only be available to admins | ```bash curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/application/settings?signup_enabled=false&default_project_visibility=internal @@ -203,6 +205,7 @@ Example response: "ed25519_key_restriction": 0, "enforce_terms": true, "terms": "Hello world!", - "performance_bar_allowed_group_id": 42 + "performance_bar_allowed_group_id": 42, + "instance_statistics_visibility_private": false } ``` diff --git a/doc/api/users.md b/doc/api/users.md index 07f9baf06d2..a8858468cab 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -440,6 +440,83 @@ GET /user } ``` +## User status + +Get the status of the currently signed in user. + +``` +GET /user/status +``` + +```bash +curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/user/status" +``` + +Example response: + +```json +{ + "emoji":"coffee", + "message":"I crave coffee :coffee:", + "message_html": "I crave coffee <gl-emoji title=\"hot beverage\" data-name=\"coffee\" data-unicode-version=\"4.0\">☕</gl-emoji>" +} +``` + +## Get the status of a user + +Get the status of a user. + +``` +GET /users/:id_or_username/status +``` + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id_or_username` | string | yes | The id or username of the user to get a status of | + +```bash +curl "https://gitlab.example.com/users/janedoe/status" +``` + +Example response: + +```json +{ + "emoji":"coffee", + "message":"I crave coffee :coffee:", + "message_html": "I crave coffee <gl-emoji title=\"hot beverage\" data-name=\"coffee\" data-unicode-version=\"4.0\">☕</gl-emoji>" +} +``` + +## Set user status + +Set the status of the current user. + +``` +PUT /user/status +``` + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `emoji` | string | no | The name of the emoji to use as status, if omitted `speech_balloon` is used. Emoji name can be one of the specified names in the [Gemojione index][gemojione-index]. | +| `message` | string | no | The message to set as a status. It can also contain emoji codes. | + +When both parameters `emoji` and `message` are empty, the status will be cleared. + +```bash +curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data "emoji=coffee" --data "emoji=I crave coffee" https://gitlab.example.com/api/v4/user/status +``` + +Example responses + +```json +{ + "emoji":"coffee", + "message":"I crave coffee", + "message_html": "I crave coffee" +} +``` + ## List user projects Please refer to the [List of user projects ](projects.md#list-user-projects). @@ -1167,3 +1244,5 @@ Example response: ``` Please note that `last_activity_at` is deprecated, please use `last_activity_on`. + +[gemojione-index]: https://github.com/jonathanwiesel/gemojione/blob/master/config/index.json diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index d95f8c7c8cc..95d705d3a3d 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -962,8 +962,8 @@ the binaries directory: ```yaml job: - artifacts: - name: "$CI_COMMIT_REF_NAME" + artifacts: + name: "$CI_COMMIT_REF_NAME" paths: - binaries/ ``` diff --git a/doc/development/i18n/proofreader.md b/doc/development/i18n/proofreader.md index ca8ebcdc984..ad5f6b2ecf6 100644 --- a/doc/development/i18n/proofreader.md +++ b/doc/development/i18n/proofreader.md @@ -15,6 +15,7 @@ are very appreciative of the work done by translators and proofreaders! - Chinese Traditional, Hong Kong - Huang Tao - [GitLab](https://gitlab.com/htve), [Crowdin](https://crowdin.com/profile/htve) - Dutch + - Emily Hendle - [GitLab](https://gitlab.com/pundachan), [Crowdin](https://crowdin.com/profile/pandachan) - Esperanto - French - Davy Defaud - [GitLab](https://gitlab.com/DevDef), [Crowdin](https://crowdin.com/profile/DevDef) diff --git a/doc/development/performance.md b/doc/development/performance.md index c4162a05b77..6b4cb6d72d1 100644 --- a/doc/development/performance.md +++ b/doc/development/performance.md @@ -347,13 +347,7 @@ def expire_first_branch_cache end ``` -## Anti-Patterns - -This is a collection of [anti-patterns][anti-pattern] that should be avoided -unless these changes have a measurable, significant and positive impact on -production environments. - -### String Freezing +## String Freezing In recent Ruby versions calling `freeze` on a String leads to it being allocated only once and re-used. For example, on Ruby 2.3 this will only allocate the @@ -365,17 +359,38 @@ only once and re-used. For example, on Ruby 2.3 this will only allocate the end ``` -Blindly adding a `.freeze` call to every String is an anti-pattern that should -be avoided unless one can prove (using production data) the call actually has a -positive impact on performance. +Depending on the size of the String and how frequently it would be allocated +(before the `.freeze` call was added), this _may_ make things faster, but +there's no guarantee it will. + +Strings will be frozen by default in Ruby 3.0. To prepare our code base for +this eventuality, it's a good practice to add the following header to all +Ruby files: + +```ruby +# frozen_string_literal: true +``` + +This may cause test failures in the code that expects to be able to manipulate +strings. Instead of using `dup`, use the unary plus to get an unfrozen string: + +```ruby +test = +"hello" +test += " world" +``` + +## Anti-Patterns -This feature of Ruby wasn't really meant to make things faster directly, instead -it was meant to reduce the number of allocations. Depending on the size of the -String and how frequently it would be allocated (before the `.freeze` call was -added), this _may_ make things faster, but there's no guarantee it will. +This is a collection of [anti-patterns][anti-pattern] that should be avoided +unless these changes have a measurable, significant and positive impact on +production environments. -Another common flavour of this is to not only freeze a String, but also assign -it to a constant, for example: +### Moving Allocations to Constants + +Storing an object as a constant so you only allocate it once _may_ improve +performance, but there's no guarantee this will. Looking up constants has an +impact on runtime performance, and as such, using a constant instead of +referencing an object directly may even slow code down. For example: ```ruby SOME_CONSTANT = 'foo'.freeze @@ -393,13 +408,6 @@ there's nothing stopping somebody from doing this elsewhere in the code: SOME_CONSTANT = 'bar' ``` -### Moving Allocations to Constants - -Storing an object as a constant so you only allocate it once _may_ improve -performance, but there's no guarantee this will. Looking up constants has an -impact on runtime performance, and as such, using a constant instead of -referencing an object directly may even slow code down. - [#15607]: https://gitlab.com/gitlab-org/gitlab-ce/issues/15607 [yorickpeterse]: https://gitlab.com/yorickpeterse [anti-pattern]: https://en.wikipedia.org/wiki/Anti-pattern diff --git a/doc/update/patch_versions.md b/doc/update/patch_versions.md index e1857ce99c6..a4f17746b69 100644 --- a/doc/update/patch_versions.md +++ b/doc/update/patch_versions.md @@ -92,18 +92,28 @@ sudo -u git -H bundle exec rake "gitlab:gitaly:install[/home/git/gitaly]" RAILS_ cd /home/git/gitlab-shell sudo -u git -H git fetch --all --tags -sudo -u git -H git checkout v`cat /home/git/gitlab/GITLAB_SHELL_VERSION` -b v`cat /home/git/gitlab/GITLAB_SHELL_VERSION` +sudo -u git -H git checkout v$(</home/git/gitlab/GITLAB_SHELL_VERSION) -b v$(</home/git/gitlab/GITLAB_SHELL_VERSION) sudo -u git -H sh -c 'if [ -x bin/compile ]; then bin/compile; fi' ``` -### 7. Start application +### 7. Update gitlab-pages to the corresponding version (skip if not using pages) + +```bash +cd /home/git/gitlab-pages + +sudo -u git -H git fetch --all --tags +sudo -u git -H git checkout v$(</home/git/gitlab/GITLAB_PAGES_VERSION) +sudo -u git -H make +``` + +### 8. Start application ```bash sudo service gitlab start sudo service nginx restart ``` -### 8. Check application status +### 9. Check application status Check if GitLab and its environment are configured correctly: diff --git a/doc/user/profile/account/two_factor_authentication.md b/doc/user/profile/account/two_factor_authentication.md index d3a2a7dcd14..e25e1e19b13 100644 --- a/doc/user/profile/account/two_factor_authentication.md +++ b/doc/user/profile/account/two_factor_authentication.md @@ -88,7 +88,7 @@ storage in a safe place. **Each code can be used only once** to log in to your account. If you lose the recovery codes or just want to generate new ones, you can do so -from the **Profile settings ➔ Account** page where you first enabled 2FA. +[using SSH](#generate-new-recovery-codes-using-ssh). ## Logging in with 2FA Enabled diff --git a/doc/user/project/integrations/jira.md b/doc/user/project/integrations/jira.md index 4d5b2c97291..67c543e00fb 100644 --- a/doc/user/project/integrations/jira.md +++ b/doc/user/project/integrations/jira.md @@ -113,7 +113,7 @@ in the table below. | `JIRA API URL` | The base URL to the JIRA instance API. Web URL value will be used if not set. E.g., `https://jira-api.example.com`. | | `Username` | The user name created in [configuring JIRA step](#configuring-jira). Using the email address will cause `401 unauthorized`. | | `Password` |The password of the user created in [configuring JIRA step](#configuring-jira). | -| `Transition ID` | This is the ID of a transition that moves issues to the desired state. **Closing JIRA issues via commits or Merge Requests won't work if you don't set the ID correctly.** | +| `Transition ID` | This is the ID of a transition that moves issues to the desired state. It is possible to insert transition ids separated by `,` or `;` which means the issue will be moved to each state after another using the given order. **Closing JIRA issues via commits or Merge Requests won't work if you don't set the ID correctly.** | ### Getting a transition ID |