From cb275a33e394d4f2327f443552b04f6d1c8287d8 Mon Sep 17 00:00:00 2001 From: Artur Martsinkovskyi Date: Fri, 19 Oct 2018 15:38:30 +0000 Subject: Update best_practices.md let section to also reference let! variables. --- doc/development/testing_guide/best_practices.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/development/testing_guide/best_practices.md b/doc/development/testing_guide/best_practices.md index acbfa1850b4..e124a768c2e 100644 --- a/doc/development/testing_guide/best_practices.md +++ b/doc/development/testing_guide/best_practices.md @@ -158,12 +158,13 @@ instead of 30+ seconds in case of a regular `spec_helper`. ### `let` variables -GitLab's RSpec suite has made extensive use of `let` variables to reduce -duplication. However, this sometimes [comes at the cost of clarity][lets-not], +GitLab's RSpec suite has made extensive use of `let`(along with it strict, non-lazy +version `let!`) variables to reduce duplication. However, this sometimes [comes at the cost of clarity][lets-not], so we need to set some guidelines for their use going forward: -- `let` variables are preferable to instance variables. Local variables are - preferable to `let` variables. +- `let!` variables are preferable to instance variables. `let` variables + are preferable to `let!` variables. Local variables are preferable to + `let` variables. - Use `let` to reduce duplication throughout an entire spec file. - Don't use `let` to define variables used by a single test; define them as local variables inside the test's `it` block. @@ -173,6 +174,9 @@ so we need to set some guidelines for their use going forward: - Try to avoid overriding the definition of one `let` variable with another. - Don't define a `let` variable that's only used by the definition of another. Use a helper method instead. +- `let!` variables should be used only in case if strict evaluation with defined + order is required, otherwise `let` will suffice. Remember that `let` is lazy and won't + be evaluated until it is referenced. [lets-not]: https://robots.thoughtbot.com/lets-not -- cgit v1.2.1 From 1911283d5c6d55f1fbef30309fb458e9785a3e83 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Wed, 14 Nov 2018 09:44:16 +0100 Subject: Clarify wiki permissions --- doc/user/permissions.md | 3 ++- doc/user/project/wiki/index.md | 13 +++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/user/permissions.md b/doc/user/permissions.md index 1fd230a41aa..0ccc934183f 100644 --- a/doc/user/permissions.md +++ b/doc/user/permissions.md @@ -42,6 +42,8 @@ The following table depicts the various user permission levels in a project. | See a job log | ✓ [^3] | ✓ | ✓ | ✓ | ✓ | | Download and browse job artifacts | ✓ [^3] | ✓ | ✓ | ✓ | ✓ | | View wiki pages | ✓ [^1] | ✓ | ✓ | ✓ | ✓ | +| Create and edit wiki pages | | | ✓ | ✓ | ✓ | +| Delete wiki pages | | | | ✓ | ✓ | | View license management reports **[ULTIMATE]** | ✓ [^1] | ✓ | ✓ | ✓ | ✓ | | View Security reports **[ULTIMATE]** | ✓ [^1] | ✓ | ✓ | ✓ | ✓ | | Pull project code | [^1] | ✓ | ✓ | ✓ | ✓ | @@ -70,7 +72,6 @@ The following table depicts the various user permission levels in a project. | Force push to non-protected branches | | | ✓ | ✓ | ✓ | | Remove non-protected branches | | | ✓ | ✓ | ✓ | | Add tags | | | ✓ | ✓ | ✓ | -| Write a wiki | | | ✓ | ✓ | ✓ | | Cancel and retry jobs | | | ✓ | ✓ | ✓ | | Create or update commit status | | | ✓ | ✓ | ✓ | | Update a container registry | | | ✓ | ✓ | ✓ | diff --git a/doc/user/project/wiki/index.md b/doc/user/project/wiki/index.md index 127a30d6669..532247a98cd 100644 --- a/doc/user/project/wiki/index.md +++ b/doc/user/project/wiki/index.md @@ -12,10 +12,6 @@ You can create Wiki pages in the web interface or [locally using Git](#adding-and-editing-wiki-pages-locally) since every Wiki is a separate Git repository. ->**Note:** -A [permission level][permissions] of **Guest** is needed to view a Wiki and -**Developer** is needed to create and edit Wiki pages. - ## First time creating the Home page The first time you visit a Wiki, you will be directed to create the Home page. @@ -28,6 +24,9 @@ message. ## Creating a new wiki page +NOTE: **Note:** +A [permission level][permissions] of **Developer** is needed to create Wiki pages. + Create a new page by clicking the **New page** button that can be found in all wiki pages. You will be asked to fill in the page name from which GitLab will create the path to the page. You can specify a full path for the new file @@ -58,12 +57,18 @@ repository, you will have to upload them again. ## Editing a wiki page +NOTE: **Note:** +A [permission level][permissions] of **Developer** is needed to edit Wiki pages. + To edit a page, simply click on the **Edit** button. From there on, you can change its content. When done, click **Save changes** for the changes to take effect. ## Deleting a wiki page +NOTE: **Note:** +A [permission level][permissions] of **Maintainer** is needed to delete Wiki pages. + You can find the **Delete** button only when editing a page. Click on it and confirm you want the page to be deleted. -- cgit v1.2.1 From 7a58eb2e1612cef1178c9b35df9aaea71cbe04aa Mon Sep 17 00:00:00 2001 From: Frederic Van Espen Date: Wed, 26 Dec 2018 15:33:11 +0100 Subject: Allow to override part of the backup filename --- doc/raketasks/backup_restore.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md index 57bc71d2903..4238685b54f 100644 --- a/doc/raketasks/backup_restore.md +++ b/doc/raketasks/backup_restore.md @@ -195,6 +195,17 @@ To use the `copy` strategy instead of the default streaming strategy, specify sudo gitlab-rake gitlab:backup:create STRATEGY=copy ``` +### Backup filename + +By default a backup file is created according to the specification in [the Backup timestamp](#backup-timestamp) section above. You can however override the `[TIMESTAMP]` part of the filename by setting the `BACKUP` environment variable. For example: + +```sh +sudo gitlab-rake gitlab:backup:create BACKUP=dump +``` + +The resulting file will then be `dump_gitlab_backup.tar`. This is useful for systems that make use of rsync and incremental backups, and will result in considerably faster transfer speeds. + + ### Excluding specific directories from the backup You can choose what should be exempt from the backup up by adding the environment variable `SKIP`. -- cgit v1.2.1 From ee832780876add739e16fe173d8157e48501cb49 Mon Sep 17 00:00:00 2001 From: Katrin Leinweber Date: Fri, 11 Jan 2019 20:04:07 +0000 Subject: Add @katrinleinweber as German proofreader --- doc/development/i18n/proofreader.md | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/development/i18n/proofreader.md b/doc/development/i18n/proofreader.md index ac910e80a89..4ef8bdf7466 100644 --- a/doc/development/i18n/proofreader.md +++ b/doc/development/i18n/proofreader.md @@ -40,6 +40,7 @@ are very appreciative of the work done by translators and proofreaders! - Pedro Garcia - [GitLab](https://gitlab.com/pedgarrod), [Crowdin](https://crowdin.com/profile/breaking_pitt) - German - Michael Hahnle - [GitLab](https://gitlab.com/mhah), [Crowdin](https://crowdin.com/profile/mhah) + - Katrin Leinweber - [GitLab](https://gitlab.com/katrinleinweber/), [Crowdin](https://crowdin.com/profile/katrinleinweber) - Greek - Proofreaders needed. - Hebrew -- cgit v1.2.1 From 0bba55438ceacde9836780e1a1e6e06e12122f6d Mon Sep 17 00:00:00 2001 From: Adi Ferdian Date: Tue, 12 Feb 2019 10:20:22 +0000 Subject: Add adiferd as Indonesia proofreader --- doc/development/i18n/proofreader.md | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/development/i18n/proofreader.md b/doc/development/i18n/proofreader.md index ac910e80a89..679913c1e2e 100644 --- a/doc/development/i18n/proofreader.md +++ b/doc/development/i18n/proofreader.md @@ -47,6 +47,7 @@ are very appreciative of the work done by translators and proofreaders! - Hungarian - Proofreaders needed. - Indonesian + - Adi Ferdian - [GitLab](https://gitlab.com/adiferd), [Crowdin](https://crowdin.com/profile/adiferd) - Ahmad Naufal Mukhtar - [GitLab](https://gitlab.com/anaufalm), [Crowdin](https://crowdin.com/profile/anaufalm) - Italian - Paolo Falomo - [GitLab](https://gitlab.com/paolofalomo), [Crowdin](https://crowdin.com/profile/paolo.falomo) -- cgit v1.2.1 From 75851599d1b7e8f0df7339ab3fcf5cd414deee97 Mon Sep 17 00:00:00 2001 From: Bertrand Jamin Date: Sun, 17 Feb 2019 10:14:25 +0000 Subject: Replace misinterpreted `|` caracter in a table --- doc/api/milestones.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/api/milestones.md b/doc/api/milestones.md index 07e66f89443..fef27c146cc 100644 --- a/doc/api/milestones.md +++ b/doc/api/milestones.md @@ -91,7 +91,7 @@ Parameters: - `description` (optional) - The description of a milestone - `due_date` (optional) - The due date of the milestone - `start_date` (optional) - The start date of the milestone -- `state_event` (optional) - The state event of the milestone (close|activate) +- `state_event` (optional) - The state event of the milestone (close or activate) ## Delete project milestone -- cgit v1.2.1 From 04daa0b9701cd5b53c3c1fd6529aba05e4189114 Mon Sep 17 00:00:00 2001 From: Yauhen Kotau Date: Mon, 18 Feb 2019 20:08:36 +0300 Subject: Added YouTrack integration Fixes gitlab-org/gitlab-ce#42595 --- doc/integration/external-issue-tracker.md | 5 ++-- doc/user/project/integrations/project_services.md | 1 + doc/user/project/integrations/youtrack.md | 28 +++++++++++++++++++++++ doc/user/project/issues/index.md | 2 +- 4 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 doc/user/project/integrations/youtrack.md (limited to 'doc') diff --git a/doc/integration/external-issue-tracker.md b/doc/integration/external-issue-tracker.md index 075feaeead9..edd1af423ca 100644 --- a/doc/integration/external-issue-tracker.md +++ b/doc/integration/external-issue-tracker.md @@ -1,8 +1,8 @@ # External issue tracker GitLab has a great issue tracker but you can also use an external one such as -Jira, Redmine, or Bugzilla. Issue trackers are configurable per GitLab project and allow -you to do the following: +Jira, Redmine, YouTrack, or Bugzilla. Issue trackers are configurable per GitLab project +and allow you to do the following: - you can reference these external issues inside GitLab interface (merge requests, commits, comments) and they will be automatically converted @@ -20,6 +20,7 @@ To enable an external issue tracker you must configure the appropriate **Service Visit the links below for details: - [Redmine](../user/project/integrations/redmine.md) +- [YouTrack](../user/project/integrations/youtrack.md) - [Jira](../user/project/integrations/jira.md) - [Bugzilla](../user/project/integrations/bugzilla.md) - [Custom Issue Tracker](../user/project/integrations/custom_issue_tracker.md) diff --git a/doc/user/project/integrations/project_services.md b/doc/user/project/integrations/project_services.md index cec9018b67f..e2f23827360 100644 --- a/doc/user/project/integrations/project_services.md +++ b/doc/user/project/integrations/project_services.md @@ -50,6 +50,7 @@ Click on the service links to see further configuration instructions and details | [Prometheus](prometheus.md) | Monitor the performance of your deployed apps | | Pushover | Pushover makes it easy to get real-time notifications on your Android device, iPhone, iPad, and Desktop | | [Redmine](redmine.md) | Redmine issue tracker | +| [YouTrack](youtrack.md) | YouTrack issue tracker | ## Services templates diff --git a/doc/user/project/integrations/youtrack.md b/doc/user/project/integrations/youtrack.md new file mode 100644 index 00000000000..85c339d5fa9 --- /dev/null +++ b/doc/user/project/integrations/youtrack.md @@ -0,0 +1,28 @@ +# YouTrack Service + +1. To enable the YouTrack integration in a project, navigate to the +[Integrations page](project_services.md#accessing-the-project-services), click +the **YouTrack** service, and fill in the required details on the page as described +in the table below. + + | Field | Description | + | ----- | ----------- | + | `description` | A name for the issue tracker (to differentiate between instances, for example) | + | `project_url` | The URL to the project in YouTrack which is being linked to this GitLab project | + | `issues_url` | The URL to the issue in YouTrack project that is linked to this GitLab project. Note that the `issues_url` requires `:id` in the URL. This ID is used by GitLab as a placeholder to replace the issue number. | + | `new_issue_url` | This is the URL to create a new issue in YouTrack for the project linked to this GitLab project. **This is currently not being used and will be removed in a future release.** | + + Once you have configured and enabled YouTrack you'll see the YouTrack link on the GitLab project pages that takes you to the appropriate YouTrack project. + +1. To disable the internal issue tracking system in a project, navigate to the General page, expand [Permissions](../settings/index.md#sharing-and-permissions), and slide the Issues switch invalid. + + ![Issue configuration](img/issue_configuration.png) + +## Referencing issues in YouTrack + +Issues in YouTrack can be referenced as `-` where `` +starts with a capital letter which is then followed by capital letters, numbers +or underscores, and `` is a number (example `API_32-143`). + +`` part is included into issue_id and links can point any YouTrack +project (`issues_url` + issue_id) diff --git a/doc/user/project/issues/index.md b/doc/user/project/issues/index.md index 5a3ac9c175b..907a305fe23 100644 --- a/doc/user/project/issues/index.md +++ b/doc/user/project/issues/index.md @@ -155,7 +155,7 @@ For further details, see [Importing issues from CSV](csv_import.md) Alternatively to GitLab's built-in Issue Tracker, you can also use an [external tracker](../../../integration/external-issue-tracker.md) such as Jira, Redmine, -or Bugzilla. +YouTrack, or Bugzilla. ### Issue API -- cgit v1.2.1 From 0b5255f7dd176dc093f25dd106932c588099ce4e Mon Sep 17 00:00:00 2001 From: Marcel Amirault Date: Wed, 20 Feb 2019 05:28:34 +0000 Subject: Fix anchors in CE HA docs --- doc/administration/high_availability/redis.md | 2 +- doc/administration/high_availability/redis_source.md | 4 ++-- doc/university/high-availability/aws/README.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/administration/high_availability/redis.md b/doc/administration/high_availability/redis.md index bf5d064d79d..57429bf7e6c 100644 --- a/doc/administration/high_availability/redis.md +++ b/doc/administration/high_availability/redis.md @@ -363,7 +363,7 @@ Now that the Redis servers are all set up, let's configure the Sentinel servers. If you are not sure if your Redis servers are working and replicating -correctly, please read the [Troubleshooting Replication](#troubleshooting-replication) +correctly, please read the [Troubleshooting Replication](#troubleshooting-redis-replication) and fix it before proceeding with Sentinel setup. You must have at least `3` Redis Sentinel servers, and they need to diff --git a/doc/administration/high_availability/redis_source.md b/doc/administration/high_availability/redis_source.md index 14e2784c419..8ecf100d483 100644 --- a/doc/administration/high_availability/redis_source.md +++ b/doc/administration/high_availability/redis_source.md @@ -46,7 +46,7 @@ valuable information for the general setup. Assuming that the Redis master instance IP is `10.0.0.1`: -1. [Install Redis](../../install/installation.md#6-redis) +1. [Install Redis](../../install/installation.md#7-redis) 1. Edit `/etc/redis/redis.conf`: ```conf @@ -72,7 +72,7 @@ Assuming that the Redis master instance IP is `10.0.0.1`: Assuming that the Redis slave instance IP is `10.0.0.2`: -1. [Install Redis](../../install/installation.md#6-redis) +1. [Install Redis](../../install/installation.md#7-redis) 1. Edit `/etc/redis/redis.conf`: ```conf diff --git a/doc/university/high-availability/aws/README.md b/doc/university/high-availability/aws/README.md index b4ba5b7a24e..83c83c9db65 100644 --- a/doc/university/high-availability/aws/README.md +++ b/doc/university/high-availability/aws/README.md @@ -3,7 +3,7 @@ comments: false --- > **Note**: We **do not** recommend using the AWS Elastic File System (EFS), as it can result -in [significantly degraded performance](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/doc/administration/high_availability/nfs.md#aws-elastic-file-system). +in [significantly degraded performance](../../../administration/high_availability/nfs.md#avoid-using-awss-elastic-file-system-efs). # High Availability on AWS @@ -182,7 +182,7 @@ Another option is to build a simple NFS server using a vanilla Linux server back by AWS Elastic Block Storage (EBS). > **Note:** GitLab does not recommend using AWS Elastic File System (EFS). See - details in [High Availability NFS documentation](../../../administration/high_availability/nfs.md#aws-elastic-file-system) + details in [High Availability NFS documentation](../../../administration/high_availability/nfs.md#avoid-using-awss-elastic-file-system-efs) *** -- cgit v1.2.1 From dd6fbbc44d2807b93d609d304db2c4da229297dc Mon Sep 17 00:00:00 2001 From: Yauhen Kotau Date: Wed, 20 Feb 2019 20:54:47 +0300 Subject: API documentation, changelog and additional tests for YouTrack integration service --- doc/api/services.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'doc') diff --git a/doc/api/services.md b/doc/api/services.md index 5d5aa3e5b3e..7efd86dafd6 100644 --- a/doc/api/services.md +++ b/doc/api/services.md @@ -1101,3 +1101,39 @@ GET /projects/:id/services/mock-ci ``` [11435]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11435 + +## YouTrack + +YouTrack issue tracker + +### Create/Edit YouTrack service + +Set YouTrack service for a project. + +``` +PUT /projects/:id/services/youtrack +``` + +Parameters: + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `issues_url` | string | true | Issue url | +| `project_url` | string | true | Project url | +| `description` | string | false | Description | + +### Delete YouTrack Service + +Delete YouTrack service for a project. + +``` +DELETE /projects/:id/services/youtrack +``` + +### Get YouTrack Service Settings + +Get YouTrack service settings for a project. + +``` +GET /projects/:id/services/youtrack +``` -- cgit v1.2.1 From 85f3a26dc163610fa69b66532934f067aa645934 Mon Sep 17 00:00:00 2001 From: Marcel Amirault Date: Thu, 21 Feb 2019 06:18:28 +0000 Subject: Add punctuation. --- doc/administration/high_availability/redis_source.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/administration/high_availability/redis_source.md b/doc/administration/high_availability/redis_source.md index 8ecf100d483..be6b547372a 100644 --- a/doc/administration/high_availability/redis_source.md +++ b/doc/administration/high_availability/redis_source.md @@ -46,7 +46,7 @@ valuable information for the general setup. Assuming that the Redis master instance IP is `10.0.0.1`: -1. [Install Redis](../../install/installation.md#7-redis) +1. [Install Redis](../../install/installation.md#7-redis). 1. Edit `/etc/redis/redis.conf`: ```conf @@ -72,7 +72,7 @@ Assuming that the Redis master instance IP is `10.0.0.1`: Assuming that the Redis slave instance IP is `10.0.0.2`: -1. [Install Redis](../../install/installation.md#7-redis) +1. [Install Redis](../../install/installation.md#7-redis). 1. Edit `/etc/redis/redis.conf`: ```conf -- cgit v1.2.1 From d5e38b00cffacf2f0599c99a1bb1515b6f56aa9b Mon Sep 17 00:00:00 2001 From: Kotau Yauhen Date: Thu, 21 Feb 2019 10:39:44 +0000 Subject: Remove new_issue_url field from YouTrack integration service --- doc/user/project/integrations/youtrack.md | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/user/project/integrations/youtrack.md b/doc/user/project/integrations/youtrack.md index 85c339d5fa9..3e9295dfcbd 100644 --- a/doc/user/project/integrations/youtrack.md +++ b/doc/user/project/integrations/youtrack.md @@ -10,7 +10,6 @@ in the table below. | `description` | A name for the issue tracker (to differentiate between instances, for example) | | `project_url` | The URL to the project in YouTrack which is being linked to this GitLab project | | `issues_url` | The URL to the issue in YouTrack project that is linked to this GitLab project. Note that the `issues_url` requires `:id` in the URL. This ID is used by GitLab as a placeholder to replace the issue number. | - | `new_issue_url` | This is the URL to create a new issue in YouTrack for the project linked to this GitLab project. **This is currently not being used and will be removed in a future release.** | Once you have configured and enabled YouTrack you'll see the YouTrack link on the GitLab project pages that takes you to the appropriate YouTrack project. -- cgit v1.2.1 From c0009b088fd7fe463679b530e56ed162824df071 Mon Sep 17 00:00:00 2001 From: Yauhen Kotau Date: Mon, 25 Feb 2019 14:37:22 +0300 Subject: Update YouTrack integration service documentation --- doc/user/project/integrations/youtrack.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/user/project/integrations/youtrack.md b/doc/user/project/integrations/youtrack.md index 3e9295dfcbd..1186a75f8bb 100644 --- a/doc/user/project/integrations/youtrack.md +++ b/doc/user/project/integrations/youtrack.md @@ -1,5 +1,9 @@ # YouTrack Service +JetBrains YouTrack is a web-based issue tracking and project management platform. +Please refer official [documentation]([YouTrack](https://www.jetbrains.com/help/youtrack/standalone/YouTrack-Documentation.html)) for details about YouTrack itself. + + 1. To enable the YouTrack integration in a project, navigate to the [Integrations page](project_services.md#accessing-the-project-services), click the **YouTrack** service, and fill in the required details on the page as described @@ -20,8 +24,8 @@ in the table below. ## Referencing issues in YouTrack Issues in YouTrack can be referenced as `-` where `` -starts with a capital letter which is then followed by capital letters, numbers -or underscores, and `` is a number (example `API_32-143`). +starts with a capital letter which is then followed by capital or lower case +letters, numbers or underscores, and `` is a number (example `Api_32-143`). `` part is included into issue_id and links can point any YouTrack project (`issues_url` + issue_id) -- cgit v1.2.1 From 1d388205d52f129bda6890edf3f3fa95d4d63b7c Mon Sep 17 00:00:00 2001 From: Yauhen Kotau Date: Mon, 25 Feb 2019 14:56:10 +0300 Subject: Fix docs-link test --- doc/user/project/integrations/youtrack.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/user/project/integrations/youtrack.md b/doc/user/project/integrations/youtrack.md index 1186a75f8bb..2ab14a8db2c 100644 --- a/doc/user/project/integrations/youtrack.md +++ b/doc/user/project/integrations/youtrack.md @@ -1,7 +1,7 @@ # YouTrack Service JetBrains YouTrack is a web-based issue tracking and project management platform. -Please refer official [documentation]([YouTrack](https://www.jetbrains.com/help/youtrack/standalone/YouTrack-Documentation.html)) for details about YouTrack itself. +Please refer official [documentation](https://www.jetbrains.com/help/youtrack/standalone/YouTrack-Documentation.html) for details about YouTrack itself. 1. To enable the YouTrack integration in a project, navigate to the -- cgit v1.2.1 From e95b88a06d673ff95792d5c7d3934c88051691d9 Mon Sep 17 00:00:00 2001 From: Michael Kozono Date: Mon, 25 Feb 2019 12:42:34 -0800 Subject: Revert "Merge branch 'filter-confidential-issues' into 'master'" This reverts commit d133bf84c668df3dfc9938bb04150754cb873c8b, reversing changes made to 7981c0292b07a0138b096fa082341fcb13e9ce2b. --- doc/api/issues.md | 7 ------- 1 file changed, 7 deletions(-) (limited to 'doc') diff --git a/doc/api/issues.md b/doc/api/issues.md index d8b2ff07e30..27ae54da316 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -32,7 +32,6 @@ GET /issues?author_id=5 GET /issues?assignee_id=5 GET /issues?my_reaction_emoji=star GET /issues?search=foo&in=title -GET /issues?confidential=true ``` | Attribute | Type | Required | Description | @@ -53,7 +52,6 @@ GET /issues?confidential=true | `created_before` | datetime | no | Return issues created on or before the given time | | `updated_after` | datetime | no | Return issues updated on or after the given time | | `updated_before` | datetime | no | Return issues updated on or before the given time | -| `confidential ` | Boolean | no | Filter confidential or public issues. | ```bash curl --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/issues @@ -150,7 +148,6 @@ GET /groups/:id/issues?search=issue+title+or+description GET /groups/:id/issues?author_id=5 GET /groups/:id/issues?assignee_id=5 GET /groups/:id/issues?my_reaction_emoji=star -GET /groups/:id/issues?confidential=true ``` | Attribute | Type | Required | Description | @@ -171,7 +168,6 @@ GET /groups/:id/issues?confidential=true | `created_before` | datetime | no | Return issues created on or before the given time | | `updated_after` | datetime | no | Return issues updated on or after the given time | | `updated_before` | datetime | no | Return issues updated on or before the given time | -| `confidential ` | Boolean | no | Filter confidential or public issues. | ```bash curl --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/groups/4/issues @@ -268,7 +264,6 @@ GET /projects/:id/issues?search=issue+title+or+description GET /projects/:id/issues?author_id=5 GET /projects/:id/issues?assignee_id=5 GET /projects/:id/issues?my_reaction_emoji=star -GET /projects/:id/issues?confidential=true ``` | Attribute | Type | Required | Description | @@ -289,8 +284,6 @@ GET /projects/:id/issues?confidential=true | `created_before` | datetime | no | Return issues created on or before the given time | | `updated_after` | datetime | no | Return issues updated on or after the given time | | `updated_before` | datetime | no | Return issues updated on or before the given time | -| `confidential ` | Boolean | no | Filter confidential or public issues. | - ```bash curl --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/projects/4/issues -- cgit v1.2.1 From 9ffdd736f86b053fd02752e7f86f63229aebf602 Mon Sep 17 00:00:00 2001 From: Michael Kozono Date: Mon, 25 Feb 2019 12:43:14 -0800 Subject: Revert "Merge branch '49449-add-an-api-endpoint-for-bulk-updating-issues-and-mrs' into 'master'" This reverts commit 7981c0292b07a0138b096fa082341fcb13e9ce2b, reversing changes made to 9202bbd129537a698b986e6295d0c783b5a84815. --- doc/api/issues.md | 31 ------------------------------- doc/api/merge_requests.md | 31 ------------------------------- 2 files changed, 62 deletions(-) (limited to 'doc') diff --git a/doc/api/issues.md b/doc/api/issues.md index 27ae54da316..0571f280d2a 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -639,37 +639,6 @@ Example response: **Note**: The `closed_by` attribute was [introduced in GitLab 10.6][ce-17042]. This value will only be present for issues which were closed after GitLab 10.6 and when the user account that closed the issue still exists. -## Bulk update issues - -> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21368) in GitLab 11.9. - -Update multiple issues using a single API call. Returns the number of successfully updated issues. - -``` -PUT /projects/:id/issues/bulk_update -``` - -| Attribute | Type | Required | Description **** | -|----------------|---------|----------|------------------------------------------------------------------------------------------------------------| -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | -| `issuable_ids` | Array[integer] | yes | The IDs of issues to be updated. | -| `assignee_ids` | Array[integer] | no | The ID of the user(s) to assign the issue to. Set to `0` or provide an empty value to unassign all assignees. | -| `milestone_id` | integer | no | The global ID of a milestone to assign the issue to. Set to `0` or provide an empty value to unassign a milestone.| -| `add_label_ids` | Array[integer] | no | Comma-separated label IDs to be added. | -| `remove_label_ids` | Array[integer] | no | Comma-separated label IDs to be added. | -| `state_event` | string | no | The state event of an issue. Set `close` to close the issue and `reopen` to reopen it. | -| `subscription_event` | string | no | The subscription_event event of an issue. Set `subscribe` to subscribe to the issue and `unsubscribe` to unsubscribe from it. | - -```bash -curl --request PUT --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/projects/4/issues/bulk_update?issuable_ids[]=1&issuable_ids[]=2&state_event=close -``` - -Example response: - -```json -{ "message": "2 issues updated" } -``` - ## Delete an issue Only for admins and project owners. Soft deletes the issue in question. diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index ba47e507b79..e176cdffc5f 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -956,37 +956,6 @@ Must include at least one non-required attribute from above. } ``` -## Bulk update merge requests - -> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21368) in GitLab 11.9. - -Update multiple merge requests using a single API call. Returns the number of successfully updated merge requests. - -``` -PUT /projects/:id/merge_requests/bulk_update -``` - -| Attribute | Type | Required | Description **** | -|----------------|---------|----------|------------------------------------------------------------------------------------------------------------| -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. | -| `issuable_ids` | Array[integer] | yes | The IDs of merge requests to be updated. | -| `assignee_ids` | Array[integer] | no | The ID of the user(s) to assign the issue to. Set to `0` or provide an empty value to unassign all assignees. | -| `milestone_id` | integer | no | The global ID of a milestone to assign the issue to. Set to `0` or provide an empty value to unassign a milestone.| -| `add_label_ids` | Array[integer] | no | Comma-separated label IDs to be added. | -| `remove_label_ids` | Array[integer] | no | Comma-separated label IDs to be added. | -| `state_event` | string | no | The state event of an issue. Set `close` to close the issue and `reopen` to reopen it. | -| `subscription_event` | string | no | The subscription_event event of an issue. Set `subscribe` to subscribe to the issue and `unsubscribe` to unsubscribe from it. | - -```bash -curl --request PUT --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/projects/4/merge_requests/bulk_update?issuable_ids[]=1&issuable_ids[]=2&state_event=close -``` - -Example response: - -```json -{ "message": "2 merge_requests updated" } -``` - ## Delete a merge request Only for admins and project owners. Soft deletes the merge request in question. -- cgit v1.2.1 From ccb4edbca1aa7e94a76a5a8d361af02fd093e1b9 Mon Sep 17 00:00:00 2001 From: Luke Duncalfe Date: Mon, 18 Feb 2019 14:19:49 +1300 Subject: Improve GraphQL Authorization DSL Previously GraphQL field authorization happened like this: class ProjectType field :my_field, MyFieldType do authorize :permission end end This change allowed us to authorize like this instead: class ProjectType field :my_field, MyFieldType, authorize: :permission end A new initializer registers the `authorize` metadata keyword on GraphQL Schema Objects and Fields, and we can collect this data within the context of Instrumentation like this: field.metadata[:authorize] The previous functionality of authorize is still being used for mutations, as the #authorize method here is called at during the code that executes during the mutation, rather than when a field resolves. https://gitlab.com/gitlab-org/gitlab-ce/issues/57828 --- doc/development/api_graphql_styleguide.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/development/api_graphql_styleguide.md b/doc/development/api_graphql_styleguide.md index 95722c027ba..501092ff2aa 100644 --- a/doc/development/api_graphql_styleguide.md +++ b/doc/development/api_graphql_styleguide.md @@ -12,24 +12,34 @@ add a `HTTP_PRIVATE_TOKEN` header. ### Authorization Fields can be authorized using the same abilities used in the Rails -app. This can be done using the `authorize` helper: +app. This can be done by supplying the `authorize` option: ```ruby module Types class QueryType < BaseObject graphql_name 'Query' - field :project, Types::ProjectType, null: true, resolver: Resolvers::ProjectResolver do - authorize :read_project - end + field :project, Types::ProjectType, null: true, resolver: Resolvers::ProjectResolver, authorize: :read_project end +end +``` + +Fields can be authorized against multiple abilities, in which case all +ability checks must pass. This requires explicitly passing a block to `field`: + +```ruby +field :project, Types::ProjectType, null: true, resolver: Resolvers::ProjectResolver do + authorize [:read_project, :another_ability] +end ``` The object found by the resolve call is used for authorization. -This works for authorizing a single record, for authorizing -collections, we should only load what the currently authenticated user -is allowed to view. Preferably we use our existing finders for that. +TIP: **Tip:** +When authorizing collections, try to load only what the currently +authenticated user is allowed to view with our existing finders first. +This minimizes database queries and unnecessary authorization checks of +the loaded records. ## Types -- cgit v1.2.1 From a555a227dd7a846e5b8e8c84839120d40f9d1090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Mon, 25 Feb 2019 11:00:24 +0000 Subject: Merge branch 'filter-confidential-issues' into 'master' Ability to filter confidential issues Closes #50747 See merge request gitlab-org/gitlab-ce!24960 --- doc/api/issues.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/api/issues.md b/doc/api/issues.md index 0571f280d2a..cb5789e76b7 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -32,6 +32,7 @@ GET /issues?author_id=5 GET /issues?assignee_id=5 GET /issues?my_reaction_emoji=star GET /issues?search=foo&in=title +GET /issues?confidential=true ``` | Attribute | Type | Required | Description | @@ -52,6 +53,7 @@ GET /issues?search=foo&in=title | `created_before` | datetime | no | Return issues created on or before the given time | | `updated_after` | datetime | no | Return issues updated on or after the given time | | `updated_before` | datetime | no | Return issues updated on or before the given time | +| `confidential ` | Boolean | no | Filter confidential or public issues. | ```bash curl --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/issues @@ -148,6 +150,7 @@ GET /groups/:id/issues?search=issue+title+or+description GET /groups/:id/issues?author_id=5 GET /groups/:id/issues?assignee_id=5 GET /groups/:id/issues?my_reaction_emoji=star +GET /groups/:id/issues?confidential=true ``` | Attribute | Type | Required | Description | @@ -168,6 +171,7 @@ GET /groups/:id/issues?my_reaction_emoji=star | `created_before` | datetime | no | Return issues created on or before the given time | | `updated_after` | datetime | no | Return issues updated on or after the given time | | `updated_before` | datetime | no | Return issues updated on or before the given time | +| `confidential ` | Boolean | no | Filter confidential or public issues. | ```bash curl --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/groups/4/issues @@ -264,6 +268,7 @@ GET /projects/:id/issues?search=issue+title+or+description GET /projects/:id/issues?author_id=5 GET /projects/:id/issues?assignee_id=5 GET /projects/:id/issues?my_reaction_emoji=star +GET /projects/:id/issues?confidential=true ``` | Attribute | Type | Required | Description | @@ -284,6 +289,8 @@ GET /projects/:id/issues?my_reaction_emoji=star | `created_before` | datetime | no | Return issues created on or before the given time | | `updated_after` | datetime | no | Return issues updated on or after the given time | | `updated_before` | datetime | no | Return issues updated on or before the given time | +| `confidential ` | Boolean | no | Filter confidential or public issues. | + ```bash curl --header "PRIVATE-TOKEN: " https://gitlab.example.com/api/v4/projects/4/issues -- cgit v1.2.1 From e8fbc070e01b0c527c66d803f9be813b4c2cdc0a Mon Sep 17 00:00:00 2001 From: Oswaldo Ferreira Date: Fri, 8 Feb 2019 19:25:26 -0200 Subject: Add API support for refreshing merge ref path Add a merge_requests/:iid/merge_to_ref API which make use of the groundwork to write merge results into refs/merge-requests/:iid/merge. --- doc/api/merge_requests.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'doc') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index e176cdffc5f..ed4b6281acc 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -1101,6 +1101,40 @@ Parameters: } ``` +## Merge to default merge ref path + +Merge the changes between the merge request source and target branches into `refs/merge-requests/:iid/merge` +ref, of the target project repository. This ref will have the state the target branch would have if +a regular merge action was taken. + +This is not a regular merge action given it doesn't change the merge request state in any manner. + +This ref (`refs/merge-requests/:iid/merge`) is **always** overwritten when submitting +requests to this API, so none of its state is kept or used in the process. + +If the merge request has conflicts, is empty or already merged, +you'll get a `400` and a descriptive error message. If you don't have permissions to do so, +you'll get a `403`. + +It returns the HEAD commit of `refs/merge-requests/:iid/merge` in the response body in +case of `200`. + +``` +PUT /projects/:id/merge_requests/:merge_request_iid/merge_to_ref +``` + +Parameters: + +- `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user +- `merge_request_iid` (required) - Internal ID of MR +- `merge_commit_message` (optional) - Custom merge commit message + +```json +{ + "commit_id": "854a3a7a17acbcc0bbbea170986df1eb60435f34" +} +``` + ## Cancel Merge When Pipeline Succeeds If you don't have permissions to accept this merge request - you'll get a `401` -- cgit v1.2.1 From 7e209d86f4b88fbcd8cb5b1a8db85736e4e5e6b9 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 26 Feb 2019 11:30:43 -0800 Subject: Add documentation on upgrading GitLab HA nodes As mentioned in https://gitlab.com/gitlab-org/gitlab-ce/issues/58121#note_145299901, it wasn't obvious that upgrading an GitLab HA cluster required special care. Link to the Omnibus documentation for upgrade instructions. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58121 --- doc/administration/high_availability/gitlab.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/administration/high_availability/gitlab.md b/doc/administration/high_availability/gitlab.md index e554c06532e..d95c3acec54 100644 --- a/doc/administration/high_availability/gitlab.md +++ b/doc/administration/high_availability/gitlab.md @@ -146,6 +146,14 @@ the share is exported and exists on the NFS server and try to remount. --- +## Upgrading GitLab HA + +GitLab HA installations can be upgraded with no downtime, but the +upgrade process must be carefully coordinated to avoid failures. See the +[Omnibus GitLab multi-node upgrade +document](https://docs.gitlab.com/omnibus/update/#multi-node--ha-deployment) +for more details. + Read more on high-availability configuration: 1. [Configure the database](database.md) -- cgit v1.2.1 From f9e38cd39f7bbe4fc9a9e437d745270f01edc68b Mon Sep 17 00:00:00 2001 From: Nermin Vehabovic Date: Tue, 26 Feb 2019 23:18:40 +0000 Subject: Added: Documentation for the API Added: Specs for the API action --- doc/api/milestones.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/api/milestones.md b/doc/api/milestones.md index fa8f8a0bcf0..897184d51af 100644 --- a/doc/api/milestones.md +++ b/doc/api/milestones.md @@ -130,3 +130,18 @@ Parameters: - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user - `milestone_id` (required) - The ID of a project milestone + +## Promote project milestone to a group milestone + +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/53861) in GitLab 11.9 + +Only for users with developer access to the group. + +``` +POST /projects/:id/milestones/:milestone_id/promote +``` + +Parameters: + +- `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user +- `milestone_id` (required) - The ID of a project milestone -- cgit v1.2.1 From db7ae616a857ad13a53a80b2af5bed06d6b8a2c5 Mon Sep 17 00:00:00 2001 From: Dylan Griffith Date: Tue, 26 Feb 2019 16:15:44 -0600 Subject: Elaborate on POSTGRES_VERSION Auto DevOps setting --- doc/topics/autodevops/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/topics/autodevops/index.md b/doc/topics/autodevops/index.md index 7a18354bf66..2e1df9d50d4 100644 --- a/doc/topics/autodevops/index.md +++ b/doc/topics/autodevops/index.md @@ -697,7 +697,7 @@ also be customized, and you can easily use a [custom buildpack](#custom-buildpac | `POSTGRES_USER` | The PostgreSQL user; defaults to `user`. Set it to use a custom username. | | `POSTGRES_PASSWORD` | The PostgreSQL password; defaults to `testing-password`. Set it to use a custom password. | | `POSTGRES_DB` | The PostgreSQL database name; defaults to the value of [`$CI_ENVIRONMENT_SLUG`](../../ci/variables/README.md#predefined-environment-variables). Set it to use a custom database name. | -| `POSTGRES_VERSION` | The PostgreSQL version; defaults to `9.6.2` | +| `POSTGRES_VERSION` | Tag for the [`postgres` Docker image](https://hub.docker.com/_/postgres) to use. Defaults to `9.6.2`. | | `BUILDPACK_URL` | The buildpack's full URL. It can point to either Git repositories or a tarball URL. For Git repositories, it is possible to point to a specific `ref`, for example `https://github.com/heroku/heroku-buildpack-ruby.git#v142` | | `SAST_CONFIDENCE_LEVEL` | The minimum confidence level of security issues you want to be reported; `1` for Low, `2` for Medium, `3` for High; defaults to `3`.| | `DEP_SCAN_DISABLE_REMOTE_CHECKS` | Whether remote Dependency Scanning checks are disabled; defaults to `"false"`. Set to `"true"` to disable checks that send data to GitLab central servers. [Read more about remote checks](https://gitlab.com/gitlab-org/security-products/dependency-scanning#remote-checks).| -- cgit v1.2.1 From 314062fec5a1d1f56a63202fa16fc7dacc876083 Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Wed, 20 Feb 2019 15:37:49 +0900 Subject: Persist source sha and target sha for merge pipelines source_sha and target_sha are used for merge request pipelines --- doc/ci/variables/README.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/ci/variables/README.md b/doc/ci/variables/README.md index ca668ac526f..6fe352df48a 100644 --- a/doc/ci/variables/README.md +++ b/doc/ci/variables/README.md @@ -86,10 +86,12 @@ future GitLab releases.** | **CI_MERGE_REQUEST_PROJECT_URL** | 11.6 | all | The URL of the project of the merge request if it's [pipelines for merge requests](../merge_request_pipelines/index.md) (e.g. `http://192.168.10.15:3000/namespace/awesome-project`) | | **CI_MERGE_REQUEST_REF_PATH** | 11.6 | all | The ref path of the merge request if it's [pipelines for merge requests](../merge_request_pipelines/index.md). (e.g. `refs/merge-requests/1/head`) | | **CI_MERGE_REQUEST_SOURCE_BRANCH_NAME** | 11.6 | all | The source branch name of the merge request if it's [pipelines for merge requests](../merge_request_pipelines/index.md) | +| **CI_MERGE_REQUEST_SOURCE_BRANCH_SHA** | 11.9 | all | The HEAD sha of the source branch of the merge request if it's [pipelines for merge requests](../merge_request_pipelines/index.md) | | **CI_MERGE_REQUEST_SOURCE_PROJECT_ID** | 11.6 | all | The ID of the source project of the merge request if it's [pipelines for merge requests](../merge_request_pipelines/index.md) | | **CI_MERGE_REQUEST_SOURCE_PROJECT_PATH** | 11.6 | all | The path of the source project of the merge request if it's [pipelines for merge requests](../merge_request_pipelines/index.md) | | **CI_MERGE_REQUEST_SOURCE_PROJECT_URL** | 11.6 | all | The URL of the source project of the merge request if it's [pipelines for merge requests](../merge_request_pipelines/index.md) | | **CI_MERGE_REQUEST_TARGET_BRANCH_NAME** | 11.6 | all | The target branch name of the merge request if it's [pipelines for merge requests](../merge_request_pipelines/index.md) | +| **CI_MERGE_REQUEST_TARGET_BRANCH_SHA** | 11.9 | all | The HEAD sha of the target branch of the merge request if it's [pipelines for merge requests](../merge_request_pipelines/index.md) | | **CI_NODE_INDEX** | 11.5 | all | Index of the job in the job set. If the job is not parallelized, this variable is not set. | | **CI_NODE_TOTAL** | 11.5 | all | Total number of instances of this job running in parallel. If the job is not parallelized, this variable is set to `1`. | | **CI_API_V4_URL** | 11.7 | all | The GitLab API v4 root URL | -- cgit v1.2.1 From 0aff8e27530d391e4c819838b46d77f6231ecf70 Mon Sep 17 00:00:00 2001 From: Denys Mishunov Date: Wed, 27 Feb 2019 09:12:13 +0000 Subject: Set up basic keyboard next/previous navigation in diff list Mousetrap is used as the help-tool to listen to keystrokes Added currentDiffIndex getter to store that holds the index of currently active diff file in the list Instead of computing it on the component, we will take advantage of it being available for all components in DiffsApp Testing keyboard navigation and jumpToFile() --- doc/workflow/shortcuts.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/workflow/shortcuts.md b/doc/workflow/shortcuts.md index 7359e1c6119..6ed6b0bda66 100644 --- a/doc/workflow/shortcuts.md +++ b/doc/workflow/shortcuts.md @@ -82,6 +82,8 @@ You can see GitLab's keyboard shortcuts by using 'shift + ?' | r | Reply (quoting selected text) | | e | Edit issue/merge request | | l | Change label | +| ] or j | Move to next file | +| [ or k | Move to previous file | ## Wiki pages -- cgit v1.2.1 From 038d530565bc64729706bbd9afad275699be459d Mon Sep 17 00:00:00 2001 From: Imre Farkas Date: Mon, 25 Feb 2019 14:52:40 +0100 Subject: Remove ability to revoke active session Session ID is used as a parameter for the revoke session endpoint but it should never be included in the HTML as an attacker could obtain it via XSS. --- doc/user/profile/active_sessions.md | 8 +------- doc/user/profile/img/active_sessions_list.png | Bin 22266 -> 19360 bytes 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/user/profile/active_sessions.md b/doc/user/profile/active_sessions.md index 5119c0e30d0..28e3f4904a9 100644 --- a/doc/user/profile/active_sessions.md +++ b/doc/user/profile/active_sessions.md @@ -4,7 +4,7 @@ > in GitLab 10.8. GitLab lists all devices that have logged into your account. This allows you to -review the sessions and revoke any of it that you don't recognize. +review the sessions. ## Listing all active sessions @@ -12,9 +12,3 @@ review the sessions and revoke any of it that you don't recognize. 1. Navigate to the **Active Sessions** tab. ![Active sessions list](img/active_sessions_list.png) - -## Revoking a session - -1. Navigate to your [profile's](#profile-settings) **Settings > Active Sessions**. -1. Click on **Revoke** besides a session. The current session cannot be - revoked, as this would sign you out of GitLab. diff --git a/doc/user/profile/img/active_sessions_list.png b/doc/user/profile/img/active_sessions_list.png index 5d94dca69cc..1e242ac4710 100644 Binary files a/doc/user/profile/img/active_sessions_list.png and b/doc/user/profile/img/active_sessions_list.png differ -- cgit v1.2.1 From 5ae9a44aa17c8929627cc450f936cd960c143e25 Mon Sep 17 00:00:00 2001 From: Jacopo Date: Thu, 13 Dec 2018 20:26:56 +0100 Subject: Add project http fetch statistics API The API get projects/:id/traffic/fetches allows user with write access to the repository to get the number of clones for the last 30 days. --- doc/api/project_statistics.md | 49 +++++++++++++++++++++++++++++++++++++++++++ doc/user/permissions.md | 1 + doc/user/project/index.md | 26 ++++++++++++++++++++--- 3 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 doc/api/project_statistics.md (limited to 'doc') diff --git a/doc/api/project_statistics.md b/doc/api/project_statistics.md new file mode 100644 index 00000000000..34d73abfcbf --- /dev/null +++ b/doc/api/project_statistics.md @@ -0,0 +1,49 @@ +# Project statistics API + +Every API call to [project](../user/project/index.md) statistics must be authenticated. + +## Get the statistics of the last 30 days + +Retrieving the statistics requires write access to the repository. +Currently only HTTP fetches statistics are returned. +Fetches statistics includes both clones and pulls count and are HTTP only, SSH fetches are not included. + +``` +GET /projects/:id/statistics +``` + +| Attribute | Type | Required | Description | +| ---------- | ------ | -------- | ----------- | +| `id ` | integer / string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | + +Example response: + +```json +{ + "fetches": { + "total": 50, + "days": [ + { + "count": 10, + "date": "2018-01-10" + }, + { + "count": 10, + "date": "2018-01-09" + }, + { + "count": 10, + "date": "2018-01-08" + }, + { + "count": 10, + "date": "2018-01-07" + }, + { + "count": 10, + "date": "2018-01-06" + } + ] + } +} +``` diff --git a/doc/user/permissions.md b/doc/user/permissions.md index 74a966f3a17..5fc24e175ae 100644 --- a/doc/user/permissions.md +++ b/doc/user/permissions.md @@ -111,6 +111,7 @@ The following table depicts the various user permission levels in a project. | Force push to protected branches [^4] | | | | | | | Remove protected branches [^4] | | | | | | | View project Audit Events | | | | ✓ | ✓ | +| View project statistics | | | | ✓ | ✓ | ## Project features permissions diff --git a/doc/user/project/index.md b/doc/user/project/index.md index 6a1aadf058e..4a1b164bf37 100644 --- a/doc/user/project/index.md +++ b/doc/user/project/index.md @@ -8,7 +8,7 @@ Your projects can be [available](../../public_access/public_access.md) publicly, internally, or privately, at your choice. GitLab does not limit the number of private projects you create. -## Project's features +## Project features When you create a project in GitLab, you'll have access to a large number of [features](https://about.gitlab.com/features/): @@ -82,7 +82,7 @@ your code blocks, overriding GitLab's default choice of language. the source, build output, and other metadata or artifacts associated with a released version of your code. -### Project's integrations +### Project integrations [Integrate your project](integrations/index.md) with Jira, Mattermost, Kubernetes, Slack, and a lot more. @@ -116,7 +116,7 @@ Read through the documentation on [project settings](settings/index.md). - [Export a project from GitLab](settings/import_export.md#exporting-a-project-and-its-data) - [Importing and exporting projects between GitLab instances](settings/import_export.md) -## Project's members +## Project members Learn how to [add members to your projects](members/index.md). @@ -170,3 +170,23 @@ password To quickly access a project from the GitLab UI using the project ID, visit the `/projects/:id` URL in your browser or other tool accessing the project. + +## Project APIs + +There are numerous [APIs](../../api/README.md) to use with your projects: + +- [Badges](../../api/project_badges.md) +- [Clusters](../../api/project_clusters.md) +- [Discussions](../../api/discussions.md) +- [General](../../api/projects.md) +- [Import/export](../../api/project_import_export.md) +- [Issue Board](../../api/boards.md) +- [Labels](../../api/labels.md) +- [Markdown](../../api/markdown.md) +- [Merge Requests](../../api/merge_requests.md) +- [Milestones](../../api/milestones.md) +- [Services](../../api/services.md) +- [Snippets](../../api/project_snippets.md) +- [Templates](../../api/project_templates.md) +- [Traffic](../../api/project_statistics.md) +- [Variables](../../api/project_level_variables.md) -- cgit v1.2.1 From d3accd36a0fda4014979c916ef1c0a3875a30199 Mon Sep 17 00:00:00 2001 From: Alexis Reigel Date: Mon, 11 Jun 2018 18:04:46 +0200 Subject: add tag_list param to runners api --- doc/api/runners.md | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'doc') diff --git a/doc/api/runners.md b/doc/api/runners.md index 35c18649fec..7d7215e6b80 100644 --- a/doc/api/runners.md +++ b/doc/api/runners.md @@ -13,13 +13,15 @@ GET /runners GET /runners?scope=active GET /runners?type=project_type GET /runners?status=active +GET /runners?tag_list=tag1,tag2 ``` -| Attribute | Type | Required | Description | -|-----------|---------|----------|---------------------| -| `scope` | string | no | Deprecated: Use `type` or `status` instead. The scope of specific runners to show, one of: `active`, `paused`, `online`, `offline`; showing all runners if none provided | -| `type` | string | no | The type of runners to show, one of: `instance_type`, `group_type`, `project_type` | -| `status` | string | no | The status of runners to show, one of: `active`, `paused`, `online`, `offline` | +| Attribute | Type | Required | Description | +|-------------|----------------|----------|---------------------| +| `scope` | string | no | Deprecated: Use `type` or `status` instead. The scope of specific runners to show, one of: `active`, `paused`, `online`, `offline`; showing all runners if none provided | +| `type` | string | no | The type of runners to show, one of: `instance_type`, `group_type`, `project_type` | +| `status` | string | no | The status of runners to show, one of: `active`, `paused`, `online`, `offline` | +| `tag_list` | Array[String] | no | List of of the runner's tags | ``` curl --header "PRIVATE-TOKEN: " "https://gitlab.example.com/api/v4/runners" @@ -62,13 +64,15 @@ GET /runners/all GET /runners/all?scope=online GET /runners/all?type=project_type GET /runners/all?status=active +GET /runners/all?tag_list=tag1,tag2 ``` -| Attribute | Type | Required | Description | -|-----------|---------|----------|---------------------| -| `scope` | string | no | Deprecated: Use `type` or `status` instead. The scope of runners to show, one of: `specific`, `shared`, `active`, `paused`, `online`, `offline`; showing all runners if none provided | -| `type` | string | no | The type of runners to show, one of: `instance_type`, `group_type`, `project_type` | -| `status` | string | no | The status of runners to show, one of: `active`, `paused`, `online`, `offline` | +| Attribute | Type | Required | Description | +|-------------|----------------|----------|---------------------| +| `scope` | string | no | Deprecated: Use `type` or `status` instead. The scope of runners to show, one of: `specific`, `shared`, `active`, `paused`, `online`, `offline`; showing all runners if none provided | +| `type` | string | no | The type of runners to show, one of: `instance_type`, `group_type`, `project_type` | +| `status` | string | no | The status of runners to show, one of: `active`, `paused`, `online`, `offline` | +| `tag_list` | Array[String] | no | List of of the runner's tags | ``` curl --header "PRIVATE-TOKEN: " "https://gitlab.example.com/api/v4/runners/all" @@ -347,14 +351,16 @@ GET /projects/:id/runners GET /projects/:id/runners?scope=active GET /projects/:id/runners?type=project_type GET /projects/:id/runners?status=active +GET /projects/:id/runners?tag_list=tag1,tag2 ``` -| Attribute | Type | Required | Description | -|-----------|----------------|----------|---------------------| -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | -| `scope` | string | no | Deprecated: Use `type` or `status` instead. The scope of specific runners to show, one of: `active`, `paused`, `online`, `offline`; showing all runners if none provided | -| `type` | string | no | The type of runners to show, one of: `instance_type`, `group_type`, `project_type` | -| `status` | string | no | The status of runners to show, one of: `active`, `paused`, `online`, `offline` | +| Attribute | Type | Required | Description | +|------------|----------------|----------|---------------------| +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | +| `scope` | string | no | Deprecated: Use `type` or `status` instead. The scope of specific runners to show, one of: `active`, `paused`, `online`, `offline`; showing all runners if none provided | +| `type` | string | no | The type of runners to show, one of: `instance_type`, `group_type`, `project_type` | +| `status` | string | no | The status of runners to show, one of: `active`, `paused`, `online`, `offline` | +| `tag_list` | Array[String] | no | List of of the runner's tags | ``` curl --header "PRIVATE-TOKEN: " "https://gitlab.example.com/api/v4/projects/9/runners" -- cgit v1.2.1 From 77985826d94454514c40b8da926e13b3b3791841 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 20 Feb 2019 17:18:15 +0200 Subject: Show header and footer system messages in email * Add email_header_and_footer_enabled flag to appearances table * Set email_header_and_footer_enabled default value to false * Add checkbox to appearance to toggle show header and footer in emails * Add email_header_and_footer_enabled to allowed params in controller * Add header and footer messages to the html and text email layouts * Remove the color styling for emails header and footer * Add empty_mailer layout for emails without layout, to have the header and footer applied --- .../system_header_and_footer_messages.md | 4 ++++ .../appearance.png | Bin 100302 -> 124214 bytes 2 files changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/customization/system_header_and_footer_messages.md b/doc/customization/system_header_and_footer_messages.md index cf7d8b3f3e8..9d6931c730d 100644 --- a/doc/customization/system_header_and_footer_messages.md +++ b/doc/customization/system_header_and_footer_messages.md @@ -7,6 +7,10 @@ Navigate to the **Admin** area and go to the **Appearance** page. Under **System header and footer** insert your header message and/or footer message. Both background and font color of the header and footer are customizable. +You can also apply the header and footer messages to gitlab emails, +by checking the **Enable header and footer in emails** checkbox. +Note that color settings will only be applied within the app interface and not to emails + ![appearance](system_header_and_footer_messages/appearance.png) After saving, all GitLab pages will contain the custom system header and/or footer messages: diff --git a/doc/customization/system_header_and_footer_messages/appearance.png b/doc/customization/system_header_and_footer_messages/appearance.png index 14667f751c4..fd315bb6c07 100644 Binary files a/doc/customization/system_header_and_footer_messages/appearance.png and b/doc/customization/system_header_and_footer_messages/appearance.png differ -- cgit v1.2.1 From 0e3d745fff0bf87990691186a9b61762f9ceec19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Roussin-B=C3=A9langer?= Date: Fri, 15 Feb 2019 16:07:24 +0000 Subject: add missing regionendpoint documentation. --- doc/administration/container_registry.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/administration/container_registry.md b/doc/administration/container_registry.md index a1ac4a2a57c..e8254668f0a 100644 --- a/doc/administration/container_registry.md +++ b/doc/administration/container_registry.md @@ -387,6 +387,9 @@ So you must use an address that resolves and is accessible outside GitLab server **Omnibus GitLab installations** +> **Note:** +`regionendpoint` is only required when configuring an S3 compatible service such as Minio, by entering a URL such as http://127.0.0.1:9000 + To configure the storage driver in Omnibus: 1. Edit `/etc/gitlab/gitlab.rb`: @@ -397,7 +400,8 @@ To configure the storage driver in Omnibus: 'accesskey' => 's3-access-key', 'secretkey' => 's3-secret-key-for-access-key', 'bucket' => 'your-s3-bucket', - 'region' => 'your-s3-region' + 'region' => 'your-s3-region', + 'regionendpoint' => 'your-s3-regionendpoint' } } ``` @@ -420,6 +424,7 @@ storage: secretkey: 'secret123' bucket: 'gitlab-registry-bucket-AKIAKIAKI' region: 'your-s3-region' + regionendpoint: 'your-s3-regionendpoint' cache: blobdescriptor: inmemory delete: -- cgit v1.2.1 From bea565cacccd6517fcb57f5833dc72bd0d433ceb Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Wed, 27 Feb 2019 14:04:18 -0800 Subject: Bring back mentions of Redash This reverts commit 676e0a3260a216d72131aa963f421c02042b93c1. It was removed when we thought we were moving to Looker. --- doc/development/profiling.md | 6 ++---- doc/development/testing_guide/ci.md | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/development/profiling.md b/doc/development/profiling.md index f41d635de43..be13485ff78 100644 --- a/doc/development/profiling.md +++ b/doc/development/profiling.md @@ -86,10 +86,8 @@ that builds on this to add some additional niceties, such as allowing configuration with a single Yaml file for multiple URLs, and uploading of the profile and log output to S3. -For GitLab.com, currently the latest profiling data has been [moved from -Redash to Looker](https://gitlab.com/gitlab-com/Product/issues/5#note_121194467). -We are [currently investigating how to make this data -public](https://gitlab.com/meltano/looker/issues/294). +For GitLab.com, you can find the latest results here: + ## Sherlock diff --git a/doc/development/testing_guide/ci.md b/doc/development/testing_guide/ci.md index 5aa668290b4..7a7fca46534 100644 --- a/doc/development/testing_guide/ci.md +++ b/doc/development/testing_guide/ci.md @@ -31,7 +31,11 @@ After that, the next pipeline will use the up-to-date The GitLab test suite is [monitored] for the `master` branch, and any branch that includes `rspec-profile` in their name. +A [public dashboard] is available for everyone to see. Feel free to look at the +slowest test files and try to improve them. + [monitored]: ../performance.md#rspec-profiling +[public dashboard]: https://redash.gitlab.com/public/dashboards/l1WhHXaxrCWM5Ai9D7YDqHKehq6OU3bx5gssaiWe?org_slug=default ## CI setup -- cgit v1.2.1 From 01103de2ffac95b624b0d8f89969bfa52b76835e Mon Sep 17 00:00:00 2001 From: Andrew Newdigate Date: Thu, 28 Feb 2019 00:21:37 +0000 Subject: Add developer documentation for distributing tracing This change adds developer documentation on using distributed tracing using Jaeger. --- doc/development/distributed_tracing.md | 182 +++++++++++++++++++++ .../img/distributed_tracing_jaeger_ui.png | Bin 0 -> 1032713 bytes .../img/distributed_tracing_performance_bar.png | Bin 0 -> 108809 bytes doc/development/performance.md | 1 + 4 files changed, 183 insertions(+) create mode 100644 doc/development/distributed_tracing.md create mode 100644 doc/development/img/distributed_tracing_jaeger_ui.png create mode 100644 doc/development/img/distributed_tracing_performance_bar.png (limited to 'doc') diff --git a/doc/development/distributed_tracing.md b/doc/development/distributed_tracing.md new file mode 100644 index 00000000000..038e3de10d7 --- /dev/null +++ b/doc/development/distributed_tracing.md @@ -0,0 +1,182 @@ +# Distributed Tracing - development guidelines + +GitLab is instrumented for distributed tracing. + +According to [Open Tracing](https://opentracing.io/docs/overview/what-is-tracing/): + +> Distributed tracing, also called distributed request tracing, is a method used to profile and +> monitor applications, especially those built using a microservices architecture. Distributed +> tracing helps to pinpoint where failures occur and what causes poor performance. + +Distributed tracing is especially helpful in understanding the lifecycle of a request as it passes +through the different components of the GitLab application. At present, Workhorse, Rails, Sidekiq, +and Gitaly support tracing instrumentation. + +Distributed tracing adds minimal overhead when disabled, but imposes only small overhead when +enabled and is therefore capable in any environment, including production. For this reason, it can +be useful in diagnosing production issues, particularly performance problems. + +## Enabling distributed tracing + +GitLab uses the `GITLAB_TRACING` environment variable to configure distributed tracing. The same +configuration is used for all components (e.g., Workhorse, Rails, etc). + +When `GITLAB_TRACING` is not set, the application will not be instrumented, meaning that there is +no overhead at all. + +To enable `GITLAB_TRACING`, a valid _"configuration-string"_ value should be set, with a URL-like +form: + +```console +GITLAB_TRACING=opentracing://?=&= +``` + +In this example, we have the following hypothetical values: + +- `driver`: the driver. [GitLab supports + `jaeger`](https://docs.gitlab.com/ee/user/project/operations/tracing.html). In future, other + tracing implementations may also be supported. +- `param_name`, `param_value`: these are driver specific configuration values. Configuration + parameters for Jaeger are documented [further on in this + document](#2-configure-the-gitlab_tracing-environment-variable) they should be URL encoded. + Multiple values should be separated by `&` characters like a URL. + +## Using Jaeger in the GitLab Development Kit + +The first tracing implementation that GitLab supports is Jaeger, and the [GitLab Development +Kit](https://gitlab.com/gitlab-org/gitlab-development-kit/) supports distributed tracing with +Jaeger out-of-the-box. + +The easiest way to access tracing from a GDK environment is through the +[performance-bar](../administration/monitoring/performance/performance_bar.md). This can be shown +by typing `p` `b` in the browser window. + +![Jaeger Search UI](img/distributed_tracing_performance_bar.png) + +Once the performance bar is enabled, click on the **Trace** link in the performance bar to go to +the Jaeger UI. + +The Jaeger search UI will return a query for the `Correlation-ID` of the current request. Normally, +this search should return a single trace result. Clicking this result will show the detail of the +trace in a hierarchical time-line. + +![Jaeger Search UI](img/distributed_tracing_jaeger_ui.png) + +## Using Jaeger without the GitLab Developer Kit + +Distributed Tracing can be enabled in non-GDK development environments as well as production or +staging environments, for troubleshooting. Please note that at this time, this functionality is +experimental, and not supported in production environments at present. In this first release, it is intended to be +used for debugging in development environments only. + +Jaeger tracing can be enabled through a three-step process: + +1. [Start Jaeger](#1-start-jaeger). +1. [Configure the `GITLAB_TRACING` environment variable](#2-configure-the-gitlab_tracing-environment-variable). +1. [Start the GitLab application](#3-start-the-gitlab-application). +1. [Go to the Jaeger Search UI in your browser](#4-open-the-jaeger-search-ui). + +### 1. Start Jaeger + +Jaeger has many configuration options, but is very easy to start in an "all-in-one" mode which uses +memory for trace storage (and is therefore non-persistent). The main advantage of "all-in-one" mode +being ease of use. + +For more detailed configuration options, refer to the [Jaeger +documentation](https://www.jaegertracing.io/docs/1.9/getting-started/). + +#### Using Docker + +If you have Docker available, the easier approach to running the Jaeger all-in-one is through +Docker, using the following command: + +```console +$ docker run \ + --rm \ + -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \ + -p 5775:5775/udp \ + -p 6831:6831/udp \ + -p 6832:6832/udp \ + -p 5778:5778 \ + -p 16686:16686 \ + -p 14268:14268 \ + -p 9411:9411 \ + jaegertracing/all-in-one:latest +``` + +#### Using the Jaeger process + +Without Docker, the all-in-one process is still easy to setup. + +1. Download the [latest Jaeger release](https://github.com/jaegertracing/jaeger/releases) for your + platform. +1. Extract the archive and run the `bin/all-in-one` process. + +This should start the process with the default listening ports. + +### 2. Configure the `GITLAB_TRACING` environment variable + +Once you have Jaeger running, you'll need to configure the `GITLAB_TRACING` variable with the +appropriate configuration string. + +**TL;DR:** If you are running everything on the same host, use the following value: + +```console +$ export GITLAB_TRACING="opentracing://jaeger?http_endpoint=http%3A%2F%2Flocalhost%3A14268%2Fapi%2Ftraces&sampler=const&sampler_param=1" +``` + +This configuration string uses the Jaeger driver `opentracing://jaeger` with the following options: + +| Name | Value | Description | +|------|-------|-------------| +| `http_endpoint` | `http://localhost:14268/api/traces` | Configures Jaeger to send trace information to the HTTP endpoint running on `http://localhost:14268/`. Alternatively, the `upd_endpoint` can be used. | +| `sampler` | `const` | Configures Jaeger to use the constant sampler (either on or off). | +| `sampler_param` | `1` | Configures the `const` sampler to sample _all_ traces. Using `0` would sample _no_ traces. | + +**Other parameter values are also possible:** + +| Name | Example | Description | +|------|-------|-------------| +| `udp_endpoint` | `localhost:6831` | This is the default. Configures Jaeger to send trace information to the UDP listener on port `6831` using compact thrift protocol. Note that we've experienced some issues with the [Jaeger Client for Ruby](https://github.com/salemove/jaeger-client-ruby) when using this protocol. | +| `sampler` | `probabalistic` | Configures Jaeger to use a probabilistic random sampler. The rate of samples is configured by the `sampler_param` value. | +| `sampler_param` | `0.01` | Use a ratio of `0.01` to configure the `probabalistic` sampler to randomly sample _1%_ of traces. | + +NOTE: **Note:** +The same `GITLAB_TRACING` value should to be configured in the environment +variables for all GitLab processes, including Workhorse, Gitaly, Rails, and Sidekiq. + +### 3. Start the GitLab application + +Once the `GITLAB_TRACING` environment variable is exported to all GitLab services, start the +application. + +When `GITLAB_TRACING` is configured properly, the application will log this on startup: + +```console +13:41:53 gitlab-workhorse.1 | 2019/02/12 13:41:53 Tracing enabled +... +13:41:54 gitaly.1 | 2019/02/12 13:41:54 Tracing enabled +... +``` + +If `GITLAB_TRACING` is not configured correctly, this will also be logged: + +```console +13:43:45 gitaly.1 | 2019/02/12 13:43:45 skipping tracing configuration step: tracer: unable to load driver mytracer +``` + +By default, GitLab ships with the Jaeger tracer, but other tracers can be included at compile time. +Details of how this can be done are included in the [LabKit tracing +documentation](https://godoc.org/gitlab.com/gitlab-org/labkit/tracing). + +If no log messages about tracing are emitted, the `GITLAB_TRACING` environment variable is likely +not set. + +### 4. Open the Jaeger Search UI + +By default, the Jaeger search UI is available at . + +TIP: **Tip:** +Don't forget that you will need to generate traces by using the application before +they appear in the Jaeger UI. + diff --git a/doc/development/img/distributed_tracing_jaeger_ui.png b/doc/development/img/distributed_tracing_jaeger_ui.png new file mode 100644 index 00000000000..57517dacced Binary files /dev/null and b/doc/development/img/distributed_tracing_jaeger_ui.png differ diff --git a/doc/development/img/distributed_tracing_performance_bar.png b/doc/development/img/distributed_tracing_performance_bar.png new file mode 100644 index 00000000000..c9998cedd2d Binary files /dev/null and b/doc/development/img/distributed_tracing_performance_bar.png differ diff --git a/doc/development/performance.md b/doc/development/performance.md index 2a287611bdf..0e21d45f57c 100644 --- a/doc/development/performance.md +++ b/doc/development/performance.md @@ -38,6 +38,7 @@ GitLab provides built-in tools to help improve performance and availability: - [Profiling](profiling.md). - [Sherlock](profiling.md#sherlock). +- [Distributed Tracing](distributed_tracing.md) - [GitLab Performance Monitoring](../administration/monitoring/performance/index.md). - [Request Profiling](../administration/monitoring/performance/request_profiling.md). - [QueryRecoder](query_recorder.md) for preventing `N+1` regressions. -- cgit v1.2.1 From 9a06ce50e7c836bdc606c0901cec6c63d7de6a41 Mon Sep 17 00:00:00 2001 From: caleb Date: Wed, 27 Feb 2019 20:41:38 -0600 Subject: Update convdev.md for clarity Clarified how instance statistics are presented. --- doc/user/instance_statistics/convdev.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/user/instance_statistics/convdev.md b/doc/user/instance_statistics/convdev.md index 52b99b69a02..ddf34b19a5a 100644 --- a/doc/user/instance_statistics/convdev.md +++ b/doc/user/instance_statistics/convdev.md @@ -2,25 +2,27 @@ > [Introduced][ce-30469] in GitLab 9.3. +NOTE: **NOTE** +Your GitLab instance's [usage ping][ping] must be activated in order to use this feature. + The Conversational Development Index (ConvDev Index) gives you an overview of your entire instance's adoption of [Concurrent DevOps](https://about.gitlab.com/concurrent-devops/) -from planning to monitoring. It displays the usage of these GitLab features over +from planning to monitoring. + +This displays the usage of these GitLab features over the last 30 days, averaged over the number of active users in that time period. It also provides a Lead score per feature, which is calculated based on GitLab's analysis of top-performing instances based on [usage ping data][ping] that GitLab has -collected. Your score is compared to the lead score, expressed as a percentage. -Your overall index score is an average of all your feature score percentages. +collected. Your score is compared to the lead score of each feature and then expressed as a percentage at the bottom of said feature. +Your overall index score is an average of all your feature score percentages - this percentage value is presented above all the of features on the page. ![ConvDev index](img/convdev_index.png) The page also provides helpful links to articles and GitLab docs, to help you improve your scores. -Your GitLab instance's [usage ping][ping] must be activated in order to use this feature. Usage ping data is aggregated on GitLab's servers for analysis. Your usage -information is **not sent** to any other GitLab instances. - -If you have just started using GitLab, it may take a few weeks for data to be +information is **not sent** to any other GitLab instances. If you have just started using GitLab, it may take a few weeks for data to be collected before this feature is available. [ce-30469]: https://gitlab.com/gitlab-org/gitlab-ce/issues/30469 -- cgit v1.2.1 From db218d882998eba8c3d84b86ac9bf307347d3462 Mon Sep 17 00:00:00 2001 From: Luke Duncalfe Date: Thu, 28 Feb 2019 03:34:22 +0000 Subject: Add a link to the gitaly repo's guide The gitaly repository's Beginner's Guide documentation is an excellent source of information that should be read first. --- doc/development/gitaly.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/development/gitaly.md b/doc/development/gitaly.md index d5fc403bf8b..bb203c3f4ba 100644 --- a/doc/development/gitaly.md +++ b/doc/development/gitaly.md @@ -3,6 +3,12 @@ [Gitaly](https://gitlab.com/gitlab-org/gitaly) is a high-level Git RPC service used by GitLab CE/EE, Workhorse and GitLab-Shell. +## Beginner's guide + +Start by reading the gitaly repository's +[Beginner's guide to Gitaly contributions](https://gitlab.com/gitlab-org/gitaly/blob/master/doc/beginners_guide.md). +It describes how to setup gitaly, the various components of gitaly and what they do, and how to run its test suites. + ## Developing new Git features Starting with GitLab 10.8, all new Git features should be developed in -- cgit v1.2.1 From dc4294ef5ddf1639c68e091ae69ac6d20ab00ace Mon Sep 17 00:00:00 2001 From: David Coy Date: Thu, 28 Feb 2019 05:23:53 +0000 Subject: Docs: Add EFS warning message for AWS installs --- doc/install/aws/index.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/install/aws/index.md b/doc/install/aws/index.md index 51d2a232dc0..ce50b5fa317 100644 --- a/doc/install/aws/index.md +++ b/doc/install/aws/index.md @@ -379,6 +379,10 @@ size depends on your needs and you can always migrate to a bigger volume later. You will be able to [set up that volume](#setting-up-the-ebs-volume) after the instance is created. +CAUTION: **Caution:** +We **do not** recommend using the AWS Elastic File System (EFS), as it can result +in [significantly degraded performance](../../administration/high_availability/nfs.html#avoid-using-awss-elastic-file-system-efs). + ### Configure security group As a last step, configure the security group: -- cgit v1.2.1 From 9444e7b918e5f1dfa18fca47ad153d0c2f2f4dfe Mon Sep 17 00:00:00 2001 From: Mike Cave Date: Thu, 28 Feb 2019 05:44:19 +0000 Subject: Update backup_restore.md instructions for Google Cloud Storage bucket configuration to specify required access control option --- doc/raketasks/backup_restore.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md index 069c87f921a..050a2a7d92d 100644 --- a/doc/raketasks/backup_restore.md +++ b/doc/raketasks/backup_restore.md @@ -382,6 +382,8 @@ an access key from the Google console first: 1. Select "Interoperability" and create an access key 1. Make note of the "Access Key" and "Secret" and replace them in the configurations below +1. In the buckets advanced settings ensure the Access Control option "Set object-level + and bucket-level permissions" is selected 1. Make sure you already have a bucket created For Omnibus GitLab packages: -- cgit v1.2.1 From c7623c8abf1bc418da9425786900814a6bbfa2d4 Mon Sep 17 00:00:00 2001 From: Constance Okoghenun Date: Thu, 28 Feb 2019 09:30:32 +0100 Subject: Created documentation for replying to comments Added documentation for starting a discussion from a non-discussion comment feature. --- doc/user/discussions/img/reply_to_comment.gif | Bin 0 -> 508115 bytes doc/user/discussions/img/reply_to_comment_button.png | Bin 0 -> 17224 bytes doc/user/discussions/index.md | 19 +++++++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 doc/user/discussions/img/reply_to_comment.gif create mode 100644 doc/user/discussions/img/reply_to_comment_button.png (limited to 'doc') diff --git a/doc/user/discussions/img/reply_to_comment.gif b/doc/user/discussions/img/reply_to_comment.gif new file mode 100644 index 00000000000..c62f7fdb5fe Binary files /dev/null and b/doc/user/discussions/img/reply_to_comment.gif differ diff --git a/doc/user/discussions/img/reply_to_comment_button.png b/doc/user/discussions/img/reply_to_comment_button.png new file mode 100644 index 00000000000..d362b19785c Binary files /dev/null and b/doc/user/discussions/img/reply_to_comment_button.png differ diff --git a/doc/user/discussions/index.md b/doc/user/discussions/index.md index 1e2fad1efe9..80ec31076c5 100644 --- a/doc/user/discussions/index.md +++ b/doc/user/discussions/index.md @@ -339,6 +339,25 @@ and push the suggested change directly into the codebase in the merge request's Custom commit messages will be introduced by [#54404](https://gitlab.com/gitlab-org/gitlab-ce/issues/54404). +## Start a discussion from a non-discussion comment + +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/30299) in GitLab 11.9 + +To reply a non-discussion comment, you can use the **Reply to comment** button. + +![Reply to comment button](img/reply_to_comment_button.png) + +The **Reply to comment** button is only displayed if you have permissions to reply to an existing discussion, or start a discussion from a standalone comment. + +Clicking on the **Reply to comment** button will bring the reply area into focus and you can type your reply. + +![Reply to comment feature](img/reply_to_comment.gif) + +Relying to a non-discussion comment will convert the non-discussion comment to a +threaded discussion once the reply is submitted. + +This feature only exists for Issues, Merge requests, and Epics. Commits, Snippets and Merge request diff discussions are not supported. + [ce-5022]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5022 [ce-7125]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7125 [ce-7527]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7527 -- cgit v1.2.1 From 2b7cddcf8ad7a2ae803f2b1b8584bf6c4487a749 Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Thu, 28 Feb 2019 10:03:47 +0000 Subject: Apply suggestion to doc/user/discussions/index.md --- doc/user/discussions/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/user/discussions/index.md b/doc/user/discussions/index.md index 80ec31076c5..9838fdeff6d 100644 --- a/doc/user/discussions/index.md +++ b/doc/user/discussions/index.md @@ -356,7 +356,7 @@ Clicking on the **Reply to comment** button will bring the reply area into focus Relying to a non-discussion comment will convert the non-discussion comment to a threaded discussion once the reply is submitted. -This feature only exists for Issues, Merge requests, and Epics. Commits, Snippets and Merge request diff discussions are not supported. +This feature only exists for Issues, Merge requests, and Epics. Commits, Snippets and Merge request diff discussions are not supported yet. [ce-5022]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5022 [ce-7125]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7125 -- cgit v1.2.1 From 68cafb38ee84eb208f8bedb8bce9007b573a71fe Mon Sep 17 00:00:00 2001 From: Ramya Authappan Date: Thu, 28 Feb 2019 10:14:19 +0000 Subject: Enabling performance metrics on Review Apps --- doc/development/testing_guide/review_apps.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/development/testing_guide/review_apps.md b/doc/development/testing_guide/review_apps.md index 703e342fc13..fda3ff57316 100644 --- a/doc/development/testing_guide/review_apps.md +++ b/doc/development/testing_guide/review_apps.md @@ -95,6 +95,14 @@ You can also manually start the `review-qa-all`: it runs the full QA suite. Note that both jobs first wait for the `review-deploy` job to be finished. +## Performance Metrics + +On every [pipeline][gitlab-pipeline] during the `test` stage, the +`review-performance` job is automatically started: this job does basic +browser performance testing using [Sitespeed.io Container](https://docs.gitlab.com/ee/user/project/merge_requests/browser_performance_testing.html) . + +This job waits for the `review-deploy` job to be finished. + ## How to? ### Log into my Review App? -- cgit v1.2.1 From cb313a8edffaea3cdca0ab213be29d135516894c Mon Sep 17 00:00:00 2001 From: Hans Cronau Date: Thu, 28 Feb 2019 11:20:39 +0000 Subject: Minor grammar fix in docker.md --- doc/install/docker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/install/docker.md b/doc/install/docker.md index d0129f0f5c4..4568a949b0a 100644 --- a/doc/install/docker.md +++ b/doc/install/docker.md @@ -2,7 +2,7 @@ [Docker](https://www.docker.com) and container technology have been revolutionizing the software world for the past few years. They combine the performance and efficiency of native execution with the abstraction, security, and immutability of virtualization. -GitLab provides official Docker images to allowing you to easily take advantage of the benefits of containerization while operating your GitLab instance. +GitLab provides official Docker images allowing you to easily take advantage of the benefits of containerization while operating your GitLab instance. ## Omnibus GitLab based images -- cgit v1.2.1 From 6fd932d5a6c0bf57cbb87a3de5db70ae41fbbbd9 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 28 Feb 2019 15:39:20 +0000 Subject: Add docs for EE components in CE components --- doc/development/ee_features.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'doc') diff --git a/doc/development/ee_features.md b/doc/development/ee_features.md index 3e85c0e1995..3227c126e4f 100644 --- a/doc/development/ee_features.md +++ b/doc/development/ee_features.md @@ -880,6 +880,29 @@ import bundle from 'ee_else_ce/protected_branches/protected_branches_bundle.js'; See the frontend guide [performance section](./fe_guide/performance.md) for information on managing page-specific javascript within EE. +## Vue code in `assets/javascript` + +To seperate Vue template differences we should async import the components. +Doing this allows for us to load the correct component in EE whilst in CE +we can load a empty component that renders nothing. This code **should** +exist in the CE repository as well as the EE repository. + +```html + + + +``` + ## SCSS code in `assets/stylesheets` To separate EE-specific styles in SCSS files, if a component you're adding styles for -- cgit v1.2.1 From 2c7e6223b926f08bc5eb949d217ba1b38796fd8d Mon Sep 17 00:00:00 2001 From: Daniel Gruesso Date: Thu, 28 Feb 2019 20:23:31 +0000 Subject: Increase jupyter seo --- doc/user/project/clusters/runbooks/index.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/user/project/clusters/runbooks/index.md b/doc/user/project/clusters/runbooks/index.md index 512a4cb32f4..54c475a1762 100644 --- a/doc/user/project/clusters/runbooks/index.md +++ b/doc/user/project/clusters/runbooks/index.md @@ -4,6 +4,10 @@ Runbooks are a collection of documented procedures that explain how to carry out a particular process, be it starting, stopping, debugging, or troubleshooting a particular system. +Using [Jupyter Notebooks](https://jupyter.org/) and the [Rubix library](https://github.com/Nurtch/rubix), +users can get started writing their own executable runbooks. + + ## Overview Historically, runbooks took the form of a decision tree or a detailed @@ -36,7 +40,7 @@ To create an executable runbook, you will need: can run the helm CLI in a safe environment. 1. **Ingress** - Ingress can provide load balancing, SSL termination, and name-based virtual hosting. It acts as a web proxy for your applications. -1. **JupyterHub** - JupyterHub is a multi-user service for managing notebooks across +1. **JupyterHub** - [JupyterHub](https://jupyterhub.readthedocs.io/) is a multi-user service for managing notebooks across a team. Jupyter Notebooks provide a web-based interactive programming environment used for data analysis, visualization, and machine learning. -- cgit v1.2.1 From e15c33fd06c44f9e188cd03b1f31e22d3030d4e5 Mon Sep 17 00:00:00 2001 From: Michael Kozono Date: Thu, 28 Feb 2019 20:54:46 +0000 Subject: Don't undermine the point with biased logic I.e. Include cleanup in both sides of the comparison. --- doc/development/rolling_out_changes_using_feature_flags.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/development/rolling_out_changes_using_feature_flags.md b/doc/development/rolling_out_changes_using_feature_flags.md index ef1aba95712..48ecee5f231 100644 --- a/doc/development/rolling_out_changes_using_feature_flags.md +++ b/doc/development/rolling_out_changes_using_feature_flags.md @@ -65,15 +65,14 @@ the worst case scenario, which we should optimise for, our total cost is now 20. If we had used a feature flag, things would have been very different. We don't need to revert a release, and because feature flags are disabled by default we don't need to revert and pick any Git commits. In fact, all we have to do is -disable the feature, and _maybe_ perform some cleanup. Let's say that the cost -of this is 1. In this case, our best case cost is 11: 10 to build the feature, -and 1 to add the feature flag. The worst case cost is now 12: 10 to build the -feature, 1 to add the feature flag, and 1 to disable it. +disable the feature, and in the worst case, perform cleanup. Let's say that +the cost of this is 2. In this case, our best case cost is 11: 10 to build the +feature, and 1 to add the feature flag. The worst case cost is now 13: 10 to +build the feature, 1 to add the feature flag, and 2 to disable and clean up. Here we can see that in the best case scenario the work necessary is only a tiny bit more compared to not using a feature flag. Meanwhile, the process of -reverting our changes has been made significantly cheaper, to the point of being -trivial. +reverting our changes has been made significantly and reliably cheaper. In other words, feature flags do not slow down the development process. Instead, they speed up the process as managing incidents now becomes _much_ easier. Once -- cgit v1.2.1 From 9e783be668d09d6a5688490c74213710ed5f056a Mon Sep 17 00:00:00 2001 From: Nick Thomas Date: Thu, 28 Feb 2019 17:06:28 +0000 Subject: bin/background_jobs: use pgroups --- doc/install/installation.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index fb24d4fa0ef..61f544deabe 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -9,7 +9,8 @@ On heavily used GitLab instances the memory usage of the Sidekiq background work Omnibus packages solve this by [letting the Sidekiq terminate gracefully](../administration/operations/sidekiq_memory_killer.md) if it uses too much memory. After this termination Runit will detect Sidekiq is not running and will start it. -Since installations from source don't have Runit, Sidekiq can't be terminated and its memory usage will grow over time. +Since installations from source don't use Runit for process supervision, Sidekiq +can't be terminated and its memory usage will grow over time. ## Select Version to Install @@ -72,7 +73,8 @@ Install the required packages (needed to compile Ruby and native extensions to R ```sh sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libre2-dev \ libreadline-dev libncurses5-dev libffi-dev curl openssh-server checkinstall libxml2-dev \ - libxslt-dev libcurl4-openssl-dev libicu-dev logrotate rsync python-docutils pkg-config cmake + libxslt-dev libcurl4-openssl-dev libicu-dev logrotate rsync python-docutils pkg-config cmake \ + runit ``` Ubuntu 14.04 (Trusty Tahr) doesn't have the `libre2-dev` package available, but -- cgit v1.2.1 From 16cfb7df65788da9594dc2850b26cc5ba5841854 Mon Sep 17 00:00:00 2001 From: Michael Kozono Date: Fri, 1 Mar 2019 01:08:40 +0000 Subject: Replace issue with a link to the feature --- doc/development/feature_flags.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/development/feature_flags.md b/doc/development/feature_flags.md index 67356a12eba..3271f9a7fb3 100644 --- a/doc/development/feature_flags.md +++ b/doc/development/feature_flags.md @@ -26,8 +26,9 @@ the time, you should execute `/chatops run feature set my_feature_flag 50`. ## Feature flags for user applications -GitLab does not yet support the use of feature flags in deployed user applications. -You can follow the progress on that [in the issue on our issue tracker](https://gitlab.com/gitlab-org/gitlab-ee/issues/779). +This document only covers feature flags used in the development of GitLab +itself. Feature flags in deployed user applications can be found at +[Feature Flags](https://docs.gitlab.com/ee/user/project/operations/feature_flags.html) ## Developing with feature flags -- cgit v1.2.1 From 97c768e38e2ae3899ca43204820aaed128eae893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brendan=20O=27Leary=20=F0=9F=90=A2?= Date: Fri, 1 Mar 2019 01:29:30 +0000 Subject: Minor grammar update --- doc/ci/yaml/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index e5668c140fa..455ab900764 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -618,9 +618,9 @@ action fails, the pipeline will eventually succeed. Manual actions are considered to be write actions, so permissions for [protected branches](../../user/project/protected_branches.md) are used when -user wants to trigger an action. In other words, in order to trigger a manual -action assigned to a branch that the pipeline is running for, user needs to -have ability to merge to this branch. +a user wants to trigger an action. In other words, in order to trigger a manual +action assigned to a branch that the pipeline is running for, the user needs to +have the ability to merge to this branch. ### `when:delayed` -- cgit v1.2.1 From 39da7aa29cc6c68a84eb22fdf879eb8d68d06dc4 Mon Sep 17 00:00:00 2001 From: Filipa Lacerda Date: Fri, 1 Mar 2019 10:53:01 +0000 Subject: Adds documentation for frontend single repo move --- doc/development/ee_features.md | 71 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/development/ee_features.md b/doc/development/ee_features.md index 3227c126e4f..17da4c51033 100644 --- a/doc/development/ee_features.md +++ b/doc/development/ee_features.md @@ -880,9 +880,13 @@ import bundle from 'ee_else_ce/protected_branches/protected_branches_bundle.js'; See the frontend guide [performance section](./fe_guide/performance.md) for information on managing page-specific javascript within EE. + ## Vue code in `assets/javascript` +### script tag + +#### Child Component only used in EE +To seperate Vue template differences we should [async import the components](https://vuejs.org/v2/guide/components-dynamic-async.html#Async-Components). -To seperate Vue template differences we should async import the components. Doing this allows for us to load the correct component in EE whilst in CE we can load a empty component that renders nothing. This code **should** exist in the CE repository as well as the EE repository. @@ -903,6 +907,71 @@ export default { ``` +#### For JS code that is EE only, like props, computed properties, methods, etc, we will keep the current approach + - Since we [can't async load a mixin](https://github.com/vuejs/vue-loader/issues/418#issuecomment-254032223) we will use the [`ee_else_ce`](https://docs.gitlab.com/ee/development/ee_features.html#javascript-code-in-assetsjavascripts) alias we already have for webpack. + - This means all the EE specific props, computed properties, methods, etc that are EE only should be in a mixin in the `ee/` folder and we need to create a CE counterpart of the mixin + + ##### Example: + ```javascript + import mixin from 'ee_else_ce/path/mixin'; + + { + mixins: [mixin] + } + ``` +- Computed Properties/methods and getters only used in the child import still need a counterpart in CE + +- For store modules, we will need a CE counterpart too. +- You can see an MR with an example [here](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9762) + +#### `template` tag +* **EE Child components** + - Since we are using the async loading to check which component to load, we'd still use the component's name, check [this example](#child-component-only-used-in-ee). + +* **EE extra HTML** + - For the templates that have extra HTML in EE we will use the `ifEE` mixin with the `v-if` directive. + - You can either use the `template` tag as a wrapper or directly in the element, if there is only one element to be rendered in EE: + +```html + +``` + + +```html +