diff --git a/.gitlab/CODEOWNERS b/.gitlab/CODEOWNERS index 64e74dd12e6..8c999b7e644 100644 --- a/.gitlab/CODEOWNERS +++ b/.gitlab/CODEOWNERS @@ -26,7 +26,7 @@ /doc/administration/troubleshooting @marcel.amirault @marcia @eread /doc/api/graphql/ @msedlakjakubowski @kpaizee /doc/api/graphql/reference/ @kpaizee -/doc/api/group_activity_analytics.md @msedlakjakubowski +/doc/api/group_activity_analytics.md @fneill /doc/ci/ @marcel.amirault @sselhorn /doc/ci/environments/ @rdickenson /doc/ci/services/ @sselhorn @@ -34,7 +34,7 @@ /doc/development/ @marcia /doc/development/documentation/ @cnorris @dianalogan /doc/development/i18n/ @ngaskill -/doc/development/value_stream_analytics.md @msedlakjakubowski +/doc/development/value_stream_analytics.md @fneill /doc/gitlab-basics/ @aqualls /doc/install/ @marcel.amirault /doc/operations/ @ngaskill @rdickenson @@ -45,19 +45,19 @@ /doc/topics/autodevops/ @marcia /doc/topics/git/ @aqualls /doc/update/ @marcel.amirault @marcia -/doc/user/analytics/ @msedlakjakubowski @ngaskill +/doc/user/analytics/ @fneill @ngaskill /doc/user/application_security/ @rdickenson /doc/user/application_security/container_scanning/ @ngaskill /doc/user/application_security/cluster_image_scanning/ @ngaskill /doc/user/clusters/ @marcia /doc/user/compliance/ @rdickenson @eread /doc/user/group/ @msedlakjakubowski -/doc/user/group/devops_adoption/ @msedlakjakubowski +/doc/user/group/devops_adoption/ @fneill /doc/user/group/epics/ @msedlakjakubowski -/doc/user/group/insights/ @msedlakjakubowski +/doc/user/group/insights/ @fneill /doc/user/group/iterations/ @msedlakjakubowski /doc/user/group/roadmap/ @msedlakjakubowski -/doc/user/group/value_stream_analytics/ @msedlakjakubowski +/doc/user/group/value_stream_analytics/ @fneill /doc/user/infrastructure/ @marcia /doc/user/packages/ @ngaskill /doc/user/packages/infrastructure_registry/ @marcia diff --git a/app/graphql/resolvers/merge_requests_resolver.rb b/app/graphql/resolvers/merge_requests_resolver.rb index c0dd61078c6..bd7f1f0774e 100644 --- a/app/graphql/resolvers/merge_requests_resolver.rb +++ b/app/graphql/resolvers/merge_requests_resolver.rb @@ -68,6 +68,12 @@ module Resolvers description: 'Sort merge requests by this criteria.', required: false, default_value: :created_desc + argument :created_after, Types::TimeType, + required: false, + description: 'Merge requests created after this timestamp.' + argument :created_before, Types::TimeType, + required: false, + description: 'Merge requests created before this timestamp.' negated do argument :labels, [GraphQL::Types::String], diff --git a/doc/administration/object_storage.md b/doc/administration/object_storage.md index 6c77576cb27..83f3118556d 100644 --- a/doc/administration/object_storage.md +++ b/doc/administration/object_storage.md @@ -2,7 +2,6 @@ stage: Enablement group: Distribution info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments -type: reference --- # Object storage **(FREE SELF)** @@ -123,8 +122,8 @@ See the section on [ETag mismatch errors](#etag-mismatch) for more details. gitlab_rails['object_store']['objects']['pages']['bucket'] = '' ``` - For GitLab 9.4 or later, if you're using AWS IAM profiles, be sure to omit the - AWS access key and secret access key/value pairs. For example: + If you're using AWS IAM profiles, omit the AWS access key and secret access + key/value pairs. For example: ```ruby gitlab_rails['object_store']['connection'] = { diff --git a/doc/administration/package_information/deprecation_policy.md b/doc/administration/package_information/deprecation_policy.md index 80ce72d54f5..d45c2ea3127 100644 --- a/doc/administration/package_information/deprecation_policy.md +++ b/doc/administration/package_information/deprecation_policy.md @@ -1,7 +1,7 @@ --- stage: Enablement group: Distribution -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments --- # Deprecation policy **(FREE SELF)** @@ -35,9 +35,11 @@ This section lists steps necessary for deprecating and removing configuration. We can differentiate two different types of configuration: -- Sensitive: Configuration that can cause major service outage ( Data integrity, - installation integrity, preventing users from reaching the installation, etc.) -- Regular: Configuration that can make a feature unavailable but still makes the installation useable ( Change in default project/group settings, miscommunication with other components and similar ) +- Sensitive: Configuration that can cause major service outage (like data integrity, + installation integrity, or preventing users from reaching the installation) +- Regular: Configuration that can make a feature unavailable but still makes the + installation useable (like a change in default project/group settings, or + miscommunication with other components) We also need to differentiate deprecation and removal procedure. diff --git a/doc/administration/raketasks/github_import.md b/doc/administration/raketasks/github_import.md index f29e2a6c7f6..0cdfd1c28ff 100644 --- a/doc/administration/raketasks/github_import.md +++ b/doc/administration/raketasks/github_import.md @@ -6,8 +6,6 @@ info: To determine the technical writer assigned to the Stage/Group associated w # GitHub import **(FREE SELF)** -> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/10308) in GitLab 9.1. - To retrieve and import GitHub repositories, you need a [GitHub personal access token](https://github.com/settings/tokens). A username should be passed as the second argument to the Rake task, which becomes the owner of the project. You can resume an import diff --git a/doc/administration/raketasks/project_import_export.md b/doc/administration/raketasks/project_import_export.md index e0ca7bfdeaf..13f8dfdccc2 100644 --- a/doc/administration/raketasks/project_import_export.md +++ b/doc/administration/raketasks/project_import_export.md @@ -6,9 +6,6 @@ info: To determine the technical writer assigned to the Stage/Group associated w # Project import/export administration **(FREE SELF)** -> - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/3050) in GitLab 8.9. -> - From GitLab 11.3, import/export can use object storage automatically. - GitLab provides Rake tasks relating to project import and export. For more information, see: - [Project import/export documentation](../../user/project/settings/import_export.md). diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md index 9fea48cc391..277a34ea667 100644 --- a/doc/api/graphql/reference/index.md +++ b/doc/api/graphql/reference/index.md @@ -10580,6 +10580,8 @@ four standard [pagination arguments](#connection-pagination-arguments): | ---- | ---- | ----------- | | `assigneeUsername` | [`String`](#string) | Username of the assignee. | | `authorUsername` | [`String`](#string) | Username of the author. | +| `createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. | +| `createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. | | `iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. | | `includeSubgroups` | [`Boolean`](#boolean) | Include merge requests belonging to subgroups. | | `labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. | @@ -11494,6 +11496,8 @@ four standard [pagination arguments](#connection-pagination-arguments): | Name | Type | Description | | ---- | ---- | ----------- | | `authorUsername` | [`String`](#string) | Username of the author. | +| `createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. | +| `createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. | | `iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. | | `labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. | | `mergedAfter` | [`Time`](#time) | Merge requests merged after this date. | @@ -11523,6 +11527,8 @@ four standard [pagination arguments](#connection-pagination-arguments): | Name | Type | Description | | ---- | ---- | ----------- | | `assigneeUsername` | [`String`](#string) | Username of the assignee. | +| `createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. | +| `createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. | | `iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. | | `labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. | | `mergedAfter` | [`Time`](#time) | Merge requests merged after this date. | @@ -11570,6 +11576,8 @@ four standard [pagination arguments](#connection-pagination-arguments): | ---- | ---- | ----------- | | `assigneeUsername` | [`String`](#string) | Username of the assignee. | | `authorUsername` | [`String`](#string) | Username of the author. | +| `createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. | +| `createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. | | `iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. | | `labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. | | `mergedAfter` | [`Time`](#time) | Merge requests merged after this date. | @@ -11740,6 +11748,8 @@ four standard [pagination arguments](#connection-pagination-arguments): | Name | Type | Description | | ---- | ---- | ----------- | | `authorUsername` | [`String`](#string) | Username of the author. | +| `createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. | +| `createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. | | `iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. | | `labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. | | `mergedAfter` | [`Time`](#time) | Merge requests merged after this date. | @@ -11769,6 +11779,8 @@ four standard [pagination arguments](#connection-pagination-arguments): | Name | Type | Description | | ---- | ---- | ----------- | | `assigneeUsername` | [`String`](#string) | Username of the assignee. | +| `createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. | +| `createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. | | `iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. | | `labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. | | `mergedAfter` | [`Time`](#time) | Merge requests merged after this date. | @@ -11816,6 +11828,8 @@ four standard [pagination arguments](#connection-pagination-arguments): | ---- | ---- | ----------- | | `assigneeUsername` | [`String`](#string) | Username of the assignee. | | `authorUsername` | [`String`](#string) | Username of the author. | +| `createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. | +| `createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. | | `iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. | | `labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. | | `mergedAfter` | [`Time`](#time) | Merge requests merged after this date. | @@ -13118,6 +13132,8 @@ four standard [pagination arguments](#connection-pagination-arguments): | ---- | ---- | ----------- | | `assigneeUsername` | [`String`](#string) | Username of the assignee. | | `authorUsername` | [`String`](#string) | Username of the author. | +| `createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. | +| `createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. | | `iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. | | `labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. | | `mergedAfter` | [`Time`](#time) | Merge requests merged after this date. | @@ -14688,6 +14704,8 @@ four standard [pagination arguments](#connection-pagination-arguments): | Name | Type | Description | | ---- | ---- | ----------- | | `authorUsername` | [`String`](#string) | Username of the author. | +| `createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. | +| `createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. | | `iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. | | `labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. | | `mergedAfter` | [`Time`](#time) | Merge requests merged after this date. | @@ -14717,6 +14735,8 @@ four standard [pagination arguments](#connection-pagination-arguments): | Name | Type | Description | | ---- | ---- | ----------- | | `assigneeUsername` | [`String`](#string) | Username of the assignee. | +| `createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. | +| `createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. | | `iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. | | `labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. | | `mergedAfter` | [`Time`](#time) | Merge requests merged after this date. | @@ -14764,6 +14784,8 @@ four standard [pagination arguments](#connection-pagination-arguments): | ---- | ---- | ----------- | | `assigneeUsername` | [`String`](#string) | Username of the assignee. | | `authorUsername` | [`String`](#string) | Username of the author. | +| `createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. | +| `createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. | | `iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. | | `labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. | | `mergedAfter` | [`Time`](#time) | Merge requests merged after this date. | @@ -17734,6 +17756,8 @@ four standard [pagination arguments](#connection-pagination-arguments): | Name | Type | Description | | ---- | ---- | ----------- | | `authorUsername` | [`String`](#string) | Username of the author. | +| `createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. | +| `createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. | | `iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. | | `labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. | | `mergedAfter` | [`Time`](#time) | Merge requests merged after this date. | @@ -17763,6 +17787,8 @@ four standard [pagination arguments](#connection-pagination-arguments): | Name | Type | Description | | ---- | ---- | ----------- | | `assigneeUsername` | [`String`](#string) | Username of the assignee. | +| `createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. | +| `createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. | | `iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. | | `labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. | | `mergedAfter` | [`Time`](#time) | Merge requests merged after this date. | @@ -17810,6 +17836,8 @@ four standard [pagination arguments](#connection-pagination-arguments): | ---- | ---- | ----------- | | `assigneeUsername` | [`String`](#string) | Username of the assignee. | | `authorUsername` | [`String`](#string) | Username of the author. | +| `createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. | +| `createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. | | `iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. | | `labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. | | `mergedAfter` | [`Time`](#time) | Merge requests merged after this date. | diff --git a/doc/api/sidekiq_metrics.md b/doc/api/sidekiq_metrics.md index bcb59a6dad3..2be2e71e551 100644 --- a/doc/api/sidekiq_metrics.md +++ b/doc/api/sidekiq_metrics.md @@ -6,8 +6,6 @@ info: To determine the technical writer assigned to the Stage/Group associated w # Sidekiq Metrics API **(FREE SELF)** -> Introduced in GitLab 8.9. - This API endpoint allows you to retrieve some information about the current state of Sidekiq, its jobs, queues, and processes. diff --git a/doc/install/aws/manual_install_aws.md b/doc/install/aws/manual_install_aws.md index 2ad54a17715..985e6abd34f 100644 --- a/doc/install/aws/manual_install_aws.md +++ b/doc/install/aws/manual_install_aws.md @@ -2,7 +2,6 @@ stage: Enablement group: Distribution info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments -type: howto --- {::options parse_block_html="true" /} @@ -410,7 +409,10 @@ persistence and is used to store session data, temporary cache information, and ## Setting up Bastion Hosts -Since our GitLab instances will be in private subnets, we need a way to connect to these instances via SSH to make configuration changes, perform upgrades, etc. One way of doing this is via a [bastion host](https://en.wikipedia.org/wiki/Bastion_host), sometimes also referred to as a jump box. +Because our GitLab instances are in private subnets, we need a way to connect +to these instances with SSH for actions that include making configuration changes +and performing upgrades. One way of doing this is by using a [bastion host](https://en.wikipedia.org/wiki/Bastion_host), +sometimes also referred to as a jump box. NOTE: If you do not want to maintain bastion hosts, you can set up [AWS Systems Manager Session Manager](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager.html) for access to instances. This is beyond the scope of this document. diff --git a/doc/install/docker.md b/doc/install/docker.md index b3e7e758ec3..00e19e2977b 100644 --- a/doc/install/docker.md +++ b/doc/install/docker.md @@ -27,7 +27,7 @@ WARNING: Docker for Windows is not officially supported. There are known issues with volume permissions, and potentially other unknown issues. If you are trying to run on Docker for Windows, see the [getting help page](https://about.gitlab.com/get-help/) for links -to community resources (IRC, forum, etc.) to seek help from other users. +to community resources (such as IRC or forums) to seek help from other users. ## Prerequisites diff --git a/doc/install/google_cloud_platform/index.md b/doc/install/google_cloud_platform/index.md index bda98ead1f5..b10ee543fac 100644 --- a/doc/install/google_cloud_platform/index.md +++ b/doc/install/google_cloud_platform/index.md @@ -3,7 +3,6 @@ stage: Enablement group: Distribution info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments description: 'Learn how to install a GitLab instance on Google Cloud Platform.' -type: howto --- # Installing GitLab on Google Cloud Platform **(FREE SELF)** @@ -126,8 +125,8 @@ Check the [Omnibus documentation](https://docs.gitlab.com/omnibus/settings/smtp. ## Further reading -GitLab can be configured to authenticate with other OAuth providers, LDAP, SAML, -Kerberos, etc. Here are some documents you might be interested in reading: +GitLab can be configured to authenticate with other OAuth providers, like LDAP, +SAML, and Kerberos. Here are some documents you might be interested in reading: - [Omnibus GitLab documentation](https://docs.gitlab.com/omnibus/) - [Integration documentation](../../integration/index.md) diff --git a/doc/install/installation.md b/doc/install/installation.md index 852ddea41bd..7ecd40a2911 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -2,7 +2,6 @@ stage: Enablement group: Distribution info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments -type: howto --- # Installation from source **(FREE SELF)** @@ -838,7 +837,9 @@ Validate your `gitlab` or `gitlab-ssl` NGINX configuration file with the followi sudo nginx -t ``` -You should receive `syntax is okay` and `test is successful` messages. If you receive errors check your `gitlab` or `gitlab-ssl` NGINX configuration file for typos, etc. as indicated in the error message given. +You should receive `syntax is okay` and `test is successful` messages. If you +receive error messages, check your `gitlab` or `gitlab-ssl` NGINX configuration +file for typos, as indicated in the provided error message. Verify that the installed version is greater than 1.12.1: diff --git a/doc/install/relative_url.md b/doc/install/relative_url.md index 8b629e9084e..b992658400d 100644 --- a/doc/install/relative_url.md +++ b/doc/install/relative_url.md @@ -2,7 +2,6 @@ stage: Enablement group: Distribution info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments -type: reference --- # Install GitLab under a relative URL **(FREE SELF)** @@ -37,11 +36,11 @@ After all the changes you need to recompile the assets and [restart GitLab](../a ## Relative URL requirements -If you configure GitLab with a relative URL, the assets (JavaScript, CSS, fonts, -images, etc.) will need to be recompiled, which is a task which consumes a lot -of CPU and memory resources. To avoid out-of-memory errors, you should have at -least 2GB of RAM available on your system, while we recommend 4GB RAM, and 4 or -8 CPU cores. +If you configure GitLab with a relative URL, the assets (including JavaScript, +CSS, fonts, and images) must be recompiled, which can consume a lot of CPU and +memory resources. To avoid out-of-memory errors, you should have at least 2 GB +of RAM available on your computer, and we recommend 4 GB RAM, and four or eight +CPU cores. See the [requirements](requirements.md) document for more information. diff --git a/doc/install/requirements.md b/doc/install/requirements.md index c136fb21a90..70b6de9b427 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -2,7 +2,6 @@ stage: Enablement group: Distribution info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments -type: reference --- # Installation requirements **(FREE SELF)** @@ -119,7 +118,6 @@ the following table) as these were used for development and testing: | GitLab version | Minimum PostgreSQL version | |----------------|----------------------------| -| 10.0 | 9.6 | | 13.0 | 11 | | 14.0 | 12 | @@ -272,9 +270,9 @@ On a very active server (10,000 billable users) the Sidekiq process can use 1GB+ ## Prometheus and its exporters -As of Omnibus GitLab 9.0, [Prometheus](https://prometheus.io) and its related -exporters are enabled by default, to enable easy and in depth monitoring of -GitLab. With default settings, these processes consume approximately 200MB of memory. +[Prometheus](https://prometheus.io) and its related exporters are enabled by +default to enable in depth monitoring of GitLab. With default settings, these +processes consume approximately 200 MB of memory. If you would like to disable Prometheus and it's exporters or read more information about it, check the [Prometheus documentation](../administration/monitoring/prometheus/index.md). diff --git a/doc/integration/mattermost/index.md b/doc/integration/mattermost/index.md index 39005940dfc..0489ccd431c 100644 --- a/doc/integration/mattermost/index.md +++ b/doc/integration/mattermost/index.md @@ -1,7 +1,7 @@ --- stage: Enablement group: Distribution -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments --- # GitLab Mattermost @@ -428,7 +428,7 @@ mattermost['env'] = { Refer to the [Mattermost Configuration Settings documentation](https://docs.mattermost.com/administration/config-settings.html) -for details about categories, configuration values, etc. +for details about categories and configuration values. There are a few exceptions to this rule: diff --git a/doc/update/zero_downtime.md b/doc/update/zero_downtime.md index 7a74435267f..6f00aa3b72b 100644 --- a/doc/update/zero_downtime.md +++ b/doc/update/zero_downtime.md @@ -1,17 +1,17 @@ --- stage: Enablement group: Distribution -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments --- # Zero downtime upgrades **(FREE SELF)** -Starting with GitLab 9.1.0 it's possible to upgrade to a newer major, minor, or -patch version of GitLab without having to take your GitLab instance offline. -However, for this to work there are the following requirements: +It's possible to upgrade to a newer major, minor, or patch version of GitLab +without having to take your GitLab instance offline. However, for this to work +there are the following requirements: -- You can only upgrade 1 minor release at a time. So from 9.1 to 9.2, not to - 9.3. If you skip releases, database modifications may be run in the wrong +- You can only upgrade one minor release at a time. So from 13.1 to 13.2, not to + 13.3. If you skip releases, database modifications may be run in the wrong sequence [and leave the database schema in a broken state](https://gitlab.com/gitlab-org/gitlab/-/issues/321542). - You have to use [post-deployment migrations](../development/post_deployment_migrations.md). - You are using PostgreSQL. Starting from GitLab 12.1, MySQL is not supported. @@ -36,10 +36,10 @@ to re-read any database changes that have been made by post-deployment migration Most of the time you can safely upgrade from a patch release to the next minor release if the patch release is not the latest. For example, upgrading from -9.1.1 to 9.2.0 should be safe even if 9.1.2 has been released. We do recommend +14.1.1 to 14.2.0 should be safe even if 14.1.2 has been released. We do recommend you check the release posts of any releases between your current and target version just in case they include any migrations that may require you to upgrade -1 release at a time. +one release at a time. Some releases may also include so called "background migrations". These migrations are performed in the background by Sidekiq and are often used for @@ -63,21 +63,21 @@ the migrations that are being performed. To help explain this, let's look at some examples: -**Example 1:** You are running a large GitLab installation using version 9.4.2, -which is the latest patch release of 9.4. When GitLab 9.5.0 is released this -installation can be safely upgraded to 9.5.0 without requiring downtime if the -requirements mentioned above are met. You can also skip 9.5.0 and upgrade to -9.5.1 after it's released, but you **can not** upgrade straight to 9.6.0; you -_have_ to first upgrade to a 9.5.Z release. +**Example 1:** You are running a large GitLab installation using version 13.4.2, +which is the latest patch release of 13.4. When GitLab 13.5.0 is released this +installation can be safely upgraded to 13.5.0 without requiring downtime if the +requirements mentioned above are met. You can also skip 13.5.0 and upgrade to +13.5.1 after it's released, but you **can not** upgrade straight to 13.6.0; you +_have_ to first upgrade to a 13.5.Z release. -**Example 2:** You are running a large GitLab installation using version 9.4.2, -which is the latest patch release of 9.4. GitLab 9.5 includes some background -migrations, and 10.0 requires these to be completed (processing any -remaining jobs for you). Skipping 9.5 is not possible without downtime, and due +**Example 2:** You are running a large GitLab installation using version 13.4.2, +which is the latest patch release of 13.4. GitLab 13.5 includes some background +migrations, and 14.0 requires these to be completed (processing any +remaining jobs for you). Skipping 13.5 is not possible without downtime, and due to the background migrations would require potentially hours of downtime depending on how long it takes for the background migrations to complete. To -work around this you have to upgrade to 9.5.Z first, then wait at least a -week before upgrading to 10.0. +work around this you have to upgrade to 13.5.Z first, then wait at least a +week before upgrading to 14.0. **Example 3:** You use MySQL as the database for GitLab. Any upgrade to a new major/minor release requires downtime. If a release includes any background @@ -89,7 +89,7 @@ meet the other online upgrade requirements mentioned above. Before following these instructions, note the following **important** information: -- You can only upgrade 1 minor release at a time. So from 13.6 to 13.7, not to 13.8. +- You can only upgrade one minor release at a time. So from 13.6 to 13.7, not to 13.8. If you attempt more than one minor release, the upgrade may fail. - On single-node Omnibus deployments, updates with no downtime are not possible when using Puma because Puma always requires a complete restart. This is because the @@ -156,7 +156,7 @@ you've completed these steps. ## Multi-node / HA deployment -You can only upgrade 1 minor release at a time. So from 13.6 to 13.7, not to 13.8. +You can only upgrade one minor release at a time. So from 13.6 to 13.7, not to 13.8. If you attempt more than one minor release, the upgrade may fail. ### Use a load balancer in front of web (Puma) nodes diff --git a/doc/user/group/index.md b/doc/user/group/index.md index f56affe9382..3b21f192f47 100644 --- a/doc/user/group/index.md +++ b/doc/user/group/index.md @@ -508,6 +508,9 @@ To prevent a project from being shared with other groups: 1. Select **Prevent sharing a project within `` with other groups**. 1. Select **Save changes**. +This setting applies to all subgroups unless overridden by a group owner. Groups already +added to a project lose access when the setting is enabled. + ## Prevent members from being added to a group **(PREMIUM)** As a group owner, you can prevent any new project membership for all diff --git a/doc/user/project/deploy_keys/index.md b/doc/user/project/deploy_keys/index.md index 61dccf1cb1b..c5950347ae9 100644 --- a/doc/user/project/deploy_keys/index.md +++ b/doc/user/project/deploy_keys/index.md @@ -81,10 +81,11 @@ help you access a repository, but there are some notables differences between th [Project maintainers and owners](../../permissions.md#project-members-permissions) can add or enable a deploy key for a project repository: -1. Navigate to the project's **Settings > Repository** page. -1. Expand the **Deploy keys** section. +1. On the top bar, select **Menu > Projects** and find your project. +1. On the left sidebar, select **Settings > Repository**. +1. Expand **Deploy keys**. 1. Specify a title for the new deploy key and paste your public SSH key. -1. (Optional) Check **Grant write permissions to this key** to allow `read-write` access. Leave it unchecked for `read-only` access. +1. Optional. To allow `read-write` access, select the **Grant write permissions to this key** checkbox. Leave it unchecked for `read-only` access. There are three lists of project deploy keys: @@ -164,9 +165,10 @@ configuration. [Project maintainers and owners](../../permissions.md#project-members-permissions) can remove or disable a deploy key for a project repository: -1. Navigate to the project's **Settings > Repository** page. -1. Expand the **Deploy keys** section. -1. Select the **{remove}** or **{cancel}** button. +1. On the top bar, select **Menu > Projects** and find your project. +1. On the left sidebar, select **Settings > Repository**. +1. Expand **Deploy keys**. +1. Select **Disable** (**{cancel}**). NOTE: Any service that relies on a deploy key stops working after that key is removed. diff --git a/lib/gitlab/background_migration/remove_duplicate_vulnerabilities_findings.rb b/lib/gitlab/background_migration/remove_duplicate_vulnerabilities_findings.rb index ca61118a06c..15799659b55 100644 --- a/lib/gitlab/background_migration/remove_duplicate_vulnerabilities_findings.rb +++ b/lib/gitlab/background_migration/remove_duplicate_vulnerabilities_findings.rb @@ -2,7 +2,7 @@ # rubocop: disable Style/Documentation class Gitlab::BackgroundMigration::RemoveDuplicateVulnerabilitiesFindings - DELETE_BATCH_SIZE = 100 + DELETE_BATCH_SIZE = 50 # rubocop:disable Gitlab/NamespacedClass class VulnerabilitiesFinding < ActiveRecord::Base @@ -10,6 +10,12 @@ class Gitlab::BackgroundMigration::RemoveDuplicateVulnerabilitiesFindings end # rubocop:enable Gitlab/NamespacedClass + # rubocop:disable Gitlab/NamespacedClass + class Vulnerability < ActiveRecord::Base + self.table_name = "vulnerabilities" + end + # rubocop:enable Gitlab/NamespacedClass + def perform(start_id, end_id) batch = VulnerabilitiesFinding.where(id: start_id..end_id) @@ -40,11 +46,19 @@ class Gitlab::BackgroundMigration::RemoveDuplicateVulnerabilitiesFindings ids_to_delete.concat(duplicate_ids) if ids_to_delete.size == DELETE_BATCH_SIZE - VulnerabilitiesFinding.where(id: ids_to_delete).delete_all + delete_findings_and_vulnerabilities(ids_to_delete) ids_to_delete.clear end end - VulnerabilitiesFinding.where(id: ids_to_delete).delete_all if ids_to_delete.any? + delete_findings_and_vulnerabilities(ids_to_delete) if ids_to_delete.any? + end + + private + + def delete_findings_and_vulnerabilities(ids) + vulnerability_ids = VulnerabilitiesFinding.where(id: ids).pluck(:vulnerability_id).compact + VulnerabilitiesFinding.where(id: ids).delete_all + Vulnerability.where(id: vulnerability_ids).delete_all end end diff --git a/spec/graphql/resolvers/merge_requests_resolver_spec.rb b/spec/graphql/resolvers/merge_requests_resolver_spec.rb index a897acf7eba..a931b0a3f77 100644 --- a/spec/graphql/resolvers/merge_requests_resolver_spec.rb +++ b/spec/graphql/resolvers/merge_requests_resolver_spec.rb @@ -218,6 +218,54 @@ RSpec.describe Resolvers::MergeRequestsResolver do end end + context 'with created_after and created_before arguments' do + before do + merge_request_1.update!(created_at: 4.days.ago) + end + + let(:all_mrs) do + [merge_request_1, merge_request_2, merge_request_3, merge_request_4, merge_request_5, merge_request_6, merge_request_with_milestone] + end + + it 'returns merge requests created within a given period' do + result = resolve_mr(project, created_after: 5.days.ago, created_before: 2.days.ago) + + expect(result).to contain_exactly( + merge_request_1 + ) + end + + it 'returns some values filtered with created_before' do + result = resolve_mr(project, created_before: 1.day.ago) + + expect(result).to contain_exactly(merge_request_1) + end + + it 'returns some values filtered with created_after' do + result = resolve_mr(project, created_after: 3.days.ago) + + expect(result).to match_array(all_mrs - [merge_request_1]) + end + + it 'does not return anything for dates (even in the future) not matching any MRs' do + result = resolve_mr(project, created_after: 5.days.from_now) + + expect(result).to be_empty + end + + it 'does not return anything for dates not matching any MRs' do + result = resolve_mr(project, created_before: 15.days.ago) + + expect(result).to be_empty + end + + it 'does not return any values for an impossible set' do + result = resolve_mr(project, created_after: 5.days.ago, created_before: 6.days.ago) + + expect(result).to be_empty + end + end + context 'with milestone argument' do it 'filters merge requests by milestone title' do result = resolve_mr(project, milestone_title: milestone.title) diff --git a/spec/graphql/types/project_type_spec.rb b/spec/graphql/types/project_type_spec.rb index 45a718683be..fc2f67f2451 100644 --- a/spec/graphql/types/project_type_spec.rb +++ b/spec/graphql/types/project_type_spec.rb @@ -296,6 +296,8 @@ RSpec.describe GitlabSchema.types['Project'] do :last, :merged_after, :merged_before, + :created_after, + :created_before, :author_username, :assignee_username, :reviewer_username, diff --git a/spec/lib/gitlab/background_migration/remove_duplicate_vulnerabilities_findings_spec.rb b/spec/lib/gitlab/background_migration/remove_duplicate_vulnerabilities_findings_spec.rb index 47e1d4620cd..7214225c32c 100644 --- a/spec/lib/gitlab/background_migration/remove_duplicate_vulnerabilities_findings_spec.rb +++ b/spec/lib/gitlab/background_migration/remove_duplicate_vulnerabilities_findings_spec.rb @@ -5,9 +5,9 @@ RSpec.describe Gitlab::BackgroundMigration::RemoveDuplicateVulnerabilitiesFindin let(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') } let(:users) { table(:users) } let(:user) { create_user! } - let(:project) { table(:projects).create!(id: 123, namespace_id: namespace.id) } + let(:project) { table(:projects).create!(id: 14219619, namespace_id: namespace.id) } let(:scanners) { table(:vulnerability_scanners) } - let!(:scanner) { scanners.create!(project_id: project.id, external_id: 'test 1', name: 'test scanner 1') } + let!(:scanner1) { scanners.create!(project_id: project.id, external_id: 'test 1', name: 'test scanner 1') } let!(:scanner2) { scanners.create!(project_id: project.id, external_id: 'test 2', name: 'test scanner 2') } let!(:scanner3) { scanners.create!(project_id: project.id, external_id: 'test 3', name: 'test scanner 3') } let!(:unrelated_scanner) { scanners.create!(project_id: project.id, external_id: 'unreleated_scanner', name: 'unrelated scanner') } @@ -16,43 +16,68 @@ RSpec.describe Gitlab::BackgroundMigration::RemoveDuplicateVulnerabilitiesFindin let(:vulnerability_identifiers) { table(:vulnerability_identifiers) } let(:vulnerability_identifier) do vulnerability_identifiers.create!( + id: 1244459, project_id: project.id, external_type: 'vulnerability-identifier', external_id: 'vulnerability-identifier', - fingerprint: '7e394d1b1eb461a7406d7b1e08f057a1cf11287a', + fingerprint: '0a203e8cd5260a1948edbedc76c7cb91ad6a2e45', name: 'vulnerability identifier') end - let!(:first_finding) do + let!(:vulnerability_for_first_duplicate) do + create_vulnerability!( + project_id: project.id, + author_id: user.id + ) + end + + let!(:first_finding_duplicate) do create_finding!( - uuid: "test1", - vulnerability_id: nil, + id: 5606961, + uuid: "bd95c085-71aa-51d7-9bb6-08ae669c262e", + vulnerability_id: vulnerability_for_first_duplicate.id, report_type: 0, - location_fingerprint: '2bda3014914481791847d8eca38d1a8d13b6ad76', + location_fingerprint: '00049d5119c2cb3bfb3d1ee1f6e031fe925aed75', primary_identifier_id: vulnerability_identifier.id, - scanner_id: scanner.id, + scanner_id: scanner1.id, project_id: project.id ) end - let!(:first_duplicate) do + let!(:vulnerability_for_second_duplicate) do + create_vulnerability!( + project_id: project.id, + author_id: user.id + ) + end + + let!(:second_finding_duplicate) do create_finding!( - uuid: "test2", - vulnerability_id: nil, + id: 8765432, + uuid: "5b714f58-1176-5b26-8fd5-e11dfcb031b5", + vulnerability_id: vulnerability_for_second_duplicate.id, report_type: 0, - location_fingerprint: '2bda3014914481791847d8eca38d1a8d13b6ad76', + location_fingerprint: '00049d5119c2cb3bfb3d1ee1f6e031fe925aed75', primary_identifier_id: vulnerability_identifier.id, scanner_id: scanner2.id, project_id: project.id ) end - let!(:second_duplicate) do + let!(:vulnerability_for_third_duplicate) do + create_vulnerability!( + project_id: project.id, + author_id: user.id + ) + end + + let!(:third_finding_duplicate) do create_finding!( - uuid: "test3", - vulnerability_id: nil, + id: 8832995, + uuid: "cfe435fa-b25b-5199-a56d-7b007cc9e2d4", + vulnerability_id: vulnerability_for_third_duplicate.id, report_type: 0, - location_fingerprint: '2bda3014914481791847d8eca38d1a8d13b6ad76', + location_fingerprint: '00049d5119c2cb3bfb3d1ee1f6e031fe925aed75', primary_identifier_id: vulnerability_identifier.id, scanner_id: scanner3.id, project_id: project.id @@ -61,6 +86,7 @@ RSpec.describe Gitlab::BackgroundMigration::RemoveDuplicateVulnerabilitiesFindin let!(:unrelated_finding) do create_finding!( + id: 9999999, uuid: "unreleated_finding", vulnerability_id: nil, report_type: 1, @@ -71,7 +97,7 @@ RSpec.describe Gitlab::BackgroundMigration::RemoveDuplicateVulnerabilitiesFindin ) end - subject { described_class.new.perform(first_finding.id, unrelated_finding.id) } + subject { described_class.new.perform(first_finding_duplicate.id, unrelated_finding.id) } before do stub_const("#{described_class}::DELETE_BATCH_SIZE", 1) @@ -82,7 +108,15 @@ RSpec.describe Gitlab::BackgroundMigration::RemoveDuplicateVulnerabilitiesFindin expect { subject }.to change { vulnerability_findings.count }.from(4).to(2) - expect(vulnerability_findings.pluck(:id)).to eq([second_duplicate.id, unrelated_finding.id]) + expect(vulnerability_findings.pluck(:id)).to match_array([third_finding_duplicate.id, unrelated_finding.id]) + end + + it "removes vulnerabilites without findings" do + expect(vulnerabilities.count).to eq(3) + + expect { subject }.to change { vulnerabilities.count }.from(3).to(1) + + expect(vulnerabilities.pluck(:id)).to match_array([vulnerability_for_third_duplicate.id]) end private @@ -100,11 +134,12 @@ RSpec.describe Gitlab::BackgroundMigration::RemoveDuplicateVulnerabilitiesFindin # rubocop:disable Metrics/ParameterLists def create_finding!( + id: nil, vulnerability_id:, project_id:, scanner_id:, primary_identifier_id:, name: "test", severity: 7, confidence: 7, report_type: 0, project_fingerprint: '123qweasdzxc', location_fingerprint: 'test', metadata_version: 'test', raw_metadata: 'test', uuid: 'test') - vulnerability_findings.create!( + params = { vulnerability_id: vulnerability_id, project_id: project_id, name: name, @@ -118,7 +153,9 @@ RSpec.describe Gitlab::BackgroundMigration::RemoveDuplicateVulnerabilitiesFindin metadata_version: metadata_version, raw_metadata: raw_metadata, uuid: uuid - ) + } + params[:id] = id unless id.nil? + vulnerability_findings.create!(params) end # rubocop:enable Metrics/ParameterLists