Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
7e1b27cedb
commit
dc97e55141
|
@ -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
|
||||
|
|
|
@ -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],
|
||||
|
|
|
@ -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'] = '<pages>'
|
||||
```
|
||||
|
||||
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'] = {
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -10580,6 +10580,8 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="groupmergerequestsassigneeusername"></a>`assigneeUsername` | [`String`](#string) | Username of the assignee. |
|
||||
| <a id="groupmergerequestsauthorusername"></a>`authorUsername` | [`String`](#string) | Username of the author. |
|
||||
| <a id="groupmergerequestscreatedafter"></a>`createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. |
|
||||
| <a id="groupmergerequestscreatedbefore"></a>`createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. |
|
||||
| <a id="groupmergerequestsiids"></a>`iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. |
|
||||
| <a id="groupmergerequestsincludesubgroups"></a>`includeSubgroups` | [`Boolean`](#boolean) | Include merge requests belonging to subgroups. |
|
||||
| <a id="groupmergerequestslabels"></a>`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 |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mergerequestassigneeassignedmergerequestsauthorusername"></a>`authorUsername` | [`String`](#string) | Username of the author. |
|
||||
| <a id="mergerequestassigneeassignedmergerequestscreatedafter"></a>`createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. |
|
||||
| <a id="mergerequestassigneeassignedmergerequestscreatedbefore"></a>`createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. |
|
||||
| <a id="mergerequestassigneeassignedmergerequestsiids"></a>`iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. |
|
||||
| <a id="mergerequestassigneeassignedmergerequestslabels"></a>`labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. |
|
||||
| <a id="mergerequestassigneeassignedmergerequestsmergedafter"></a>`mergedAfter` | [`Time`](#time) | Merge requests merged after this date. |
|
||||
|
@ -11523,6 +11527,8 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mergerequestassigneeauthoredmergerequestsassigneeusername"></a>`assigneeUsername` | [`String`](#string) | Username of the assignee. |
|
||||
| <a id="mergerequestassigneeauthoredmergerequestscreatedafter"></a>`createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. |
|
||||
| <a id="mergerequestassigneeauthoredmergerequestscreatedbefore"></a>`createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. |
|
||||
| <a id="mergerequestassigneeauthoredmergerequestsiids"></a>`iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. |
|
||||
| <a id="mergerequestassigneeauthoredmergerequestslabels"></a>`labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. |
|
||||
| <a id="mergerequestassigneeauthoredmergerequestsmergedafter"></a>`mergedAfter` | [`Time`](#time) | Merge requests merged after this date. |
|
||||
|
@ -11570,6 +11576,8 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mergerequestassigneereviewrequestedmergerequestsassigneeusername"></a>`assigneeUsername` | [`String`](#string) | Username of the assignee. |
|
||||
| <a id="mergerequestassigneereviewrequestedmergerequestsauthorusername"></a>`authorUsername` | [`String`](#string) | Username of the author. |
|
||||
| <a id="mergerequestassigneereviewrequestedmergerequestscreatedafter"></a>`createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. |
|
||||
| <a id="mergerequestassigneereviewrequestedmergerequestscreatedbefore"></a>`createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. |
|
||||
| <a id="mergerequestassigneereviewrequestedmergerequestsiids"></a>`iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. |
|
||||
| <a id="mergerequestassigneereviewrequestedmergerequestslabels"></a>`labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. |
|
||||
| <a id="mergerequestassigneereviewrequestedmergerequestsmergedafter"></a>`mergedAfter` | [`Time`](#time) | Merge requests merged after this date. |
|
||||
|
@ -11740,6 +11748,8 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mergerequestreviewerassignedmergerequestsauthorusername"></a>`authorUsername` | [`String`](#string) | Username of the author. |
|
||||
| <a id="mergerequestreviewerassignedmergerequestscreatedafter"></a>`createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. |
|
||||
| <a id="mergerequestreviewerassignedmergerequestscreatedbefore"></a>`createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. |
|
||||
| <a id="mergerequestreviewerassignedmergerequestsiids"></a>`iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. |
|
||||
| <a id="mergerequestreviewerassignedmergerequestslabels"></a>`labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. |
|
||||
| <a id="mergerequestreviewerassignedmergerequestsmergedafter"></a>`mergedAfter` | [`Time`](#time) | Merge requests merged after this date. |
|
||||
|
@ -11769,6 +11779,8 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mergerequestreviewerauthoredmergerequestsassigneeusername"></a>`assigneeUsername` | [`String`](#string) | Username of the assignee. |
|
||||
| <a id="mergerequestreviewerauthoredmergerequestscreatedafter"></a>`createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. |
|
||||
| <a id="mergerequestreviewerauthoredmergerequestscreatedbefore"></a>`createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. |
|
||||
| <a id="mergerequestreviewerauthoredmergerequestsiids"></a>`iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. |
|
||||
| <a id="mergerequestreviewerauthoredmergerequestslabels"></a>`labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. |
|
||||
| <a id="mergerequestreviewerauthoredmergerequestsmergedafter"></a>`mergedAfter` | [`Time`](#time) | Merge requests merged after this date. |
|
||||
|
@ -11816,6 +11828,8 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mergerequestreviewerreviewrequestedmergerequestsassigneeusername"></a>`assigneeUsername` | [`String`](#string) | Username of the assignee. |
|
||||
| <a id="mergerequestreviewerreviewrequestedmergerequestsauthorusername"></a>`authorUsername` | [`String`](#string) | Username of the author. |
|
||||
| <a id="mergerequestreviewerreviewrequestedmergerequestscreatedafter"></a>`createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. |
|
||||
| <a id="mergerequestreviewerreviewrequestedmergerequestscreatedbefore"></a>`createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. |
|
||||
| <a id="mergerequestreviewerreviewrequestedmergerequestsiids"></a>`iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. |
|
||||
| <a id="mergerequestreviewerreviewrequestedmergerequestslabels"></a>`labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. |
|
||||
| <a id="mergerequestreviewerreviewrequestedmergerequestsmergedafter"></a>`mergedAfter` | [`Time`](#time) | Merge requests merged after this date. |
|
||||
|
@ -13118,6 +13132,8 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="projectmergerequestsassigneeusername"></a>`assigneeUsername` | [`String`](#string) | Username of the assignee. |
|
||||
| <a id="projectmergerequestsauthorusername"></a>`authorUsername` | [`String`](#string) | Username of the author. |
|
||||
| <a id="projectmergerequestscreatedafter"></a>`createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. |
|
||||
| <a id="projectmergerequestscreatedbefore"></a>`createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. |
|
||||
| <a id="projectmergerequestsiids"></a>`iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. |
|
||||
| <a id="projectmergerequestslabels"></a>`labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. |
|
||||
| <a id="projectmergerequestsmergedafter"></a>`mergedAfter` | [`Time`](#time) | Merge requests merged after this date. |
|
||||
|
@ -14688,6 +14704,8 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="usercoreassignedmergerequestsauthorusername"></a>`authorUsername` | [`String`](#string) | Username of the author. |
|
||||
| <a id="usercoreassignedmergerequestscreatedafter"></a>`createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. |
|
||||
| <a id="usercoreassignedmergerequestscreatedbefore"></a>`createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. |
|
||||
| <a id="usercoreassignedmergerequestsiids"></a>`iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. |
|
||||
| <a id="usercoreassignedmergerequestslabels"></a>`labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. |
|
||||
| <a id="usercoreassignedmergerequestsmergedafter"></a>`mergedAfter` | [`Time`](#time) | Merge requests merged after this date. |
|
||||
|
@ -14717,6 +14735,8 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="usercoreauthoredmergerequestsassigneeusername"></a>`assigneeUsername` | [`String`](#string) | Username of the assignee. |
|
||||
| <a id="usercoreauthoredmergerequestscreatedafter"></a>`createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. |
|
||||
| <a id="usercoreauthoredmergerequestscreatedbefore"></a>`createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. |
|
||||
| <a id="usercoreauthoredmergerequestsiids"></a>`iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. |
|
||||
| <a id="usercoreauthoredmergerequestslabels"></a>`labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. |
|
||||
| <a id="usercoreauthoredmergerequestsmergedafter"></a>`mergedAfter` | [`Time`](#time) | Merge requests merged after this date. |
|
||||
|
@ -14764,6 +14784,8 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="usercorereviewrequestedmergerequestsassigneeusername"></a>`assigneeUsername` | [`String`](#string) | Username of the assignee. |
|
||||
| <a id="usercorereviewrequestedmergerequestsauthorusername"></a>`authorUsername` | [`String`](#string) | Username of the author. |
|
||||
| <a id="usercorereviewrequestedmergerequestscreatedafter"></a>`createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. |
|
||||
| <a id="usercorereviewrequestedmergerequestscreatedbefore"></a>`createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. |
|
||||
| <a id="usercorereviewrequestedmergerequestsiids"></a>`iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. |
|
||||
| <a id="usercorereviewrequestedmergerequestslabels"></a>`labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. |
|
||||
| <a id="usercorereviewrequestedmergerequestsmergedafter"></a>`mergedAfter` | [`Time`](#time) | Merge requests merged after this date. |
|
||||
|
@ -17734,6 +17756,8 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="userassignedmergerequestsauthorusername"></a>`authorUsername` | [`String`](#string) | Username of the author. |
|
||||
| <a id="userassignedmergerequestscreatedafter"></a>`createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. |
|
||||
| <a id="userassignedmergerequestscreatedbefore"></a>`createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. |
|
||||
| <a id="userassignedmergerequestsiids"></a>`iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. |
|
||||
| <a id="userassignedmergerequestslabels"></a>`labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. |
|
||||
| <a id="userassignedmergerequestsmergedafter"></a>`mergedAfter` | [`Time`](#time) | Merge requests merged after this date. |
|
||||
|
@ -17763,6 +17787,8 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="userauthoredmergerequestsassigneeusername"></a>`assigneeUsername` | [`String`](#string) | Username of the assignee. |
|
||||
| <a id="userauthoredmergerequestscreatedafter"></a>`createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. |
|
||||
| <a id="userauthoredmergerequestscreatedbefore"></a>`createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. |
|
||||
| <a id="userauthoredmergerequestsiids"></a>`iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. |
|
||||
| <a id="userauthoredmergerequestslabels"></a>`labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. |
|
||||
| <a id="userauthoredmergerequestsmergedafter"></a>`mergedAfter` | [`Time`](#time) | Merge requests merged after this date. |
|
||||
|
@ -17810,6 +17836,8 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="userreviewrequestedmergerequestsassigneeusername"></a>`assigneeUsername` | [`String`](#string) | Username of the assignee. |
|
||||
| <a id="userreviewrequestedmergerequestsauthorusername"></a>`authorUsername` | [`String`](#string) | Username of the author. |
|
||||
| <a id="userreviewrequestedmergerequestscreatedafter"></a>`createdAfter` | [`Time`](#time) | Merge requests created after this timestamp. |
|
||||
| <a id="userreviewrequestedmergerequestscreatedbefore"></a>`createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. |
|
||||
| <a id="userreviewrequestedmergerequestsiids"></a>`iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. |
|
||||
| <a id="userreviewrequestedmergerequestslabels"></a>`labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. |
|
||||
| <a id="userreviewrequestedmergerequestsmergedafter"></a>`mergedAfter` | [`Time`](#time) | Merge requests merged after this date. |
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -508,6 +508,9 @@ To prevent a project from being shared with other groups:
|
|||
1. Select **Prevent sharing a project within `<group_name>` 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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue