Skip to content

Commit 08c02e9

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 7cf5520 commit 08c02e9

File tree

18 files changed

+196
-71
lines changed

18 files changed

+196
-71
lines changed

.gitlab/ci/qa-common/rules.gitlab-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
.spec-file-specified: &spec-file-specified
1515
if: $QA_TESTS =~ /_spec\.rb/
1616

17+
# code pattern changes
18+
.code-pattern-changes: &code-pattern-changes
19+
if: $MR_CODE_PATTERNS == "true"
20+
1721
# Specs directory specified
1822
.spec-directory-specified: &spec-directory-specified
1923
if: $QA_TESTS != "" && $QA_TESTS !~ /_spec\.rb/

.gitlab/ci/rules.gitlab-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,6 +1623,10 @@
16231623
UPDATE_QA_CACHE: "true"
16241624
- <<: *if-dot-com-gitlab-org-and-security-merge-request-and-qa-tests-specified
16251625
changes: *code-patterns
1626+
- <<: *if-merge-request
1627+
changes: *code-patterns
1628+
variables:
1629+
MR_CODE_PATTERNS: "true"
16261630
- <<: *if-merge-request
16271631
changes: *code-qa-patterns # Includes all CI changes
16281632
- <<: *if-force-ci

.gitlab/ci/test-on-gdk/main.gitlab-ci.yml

Lines changed: 74 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,55 @@ include:
33
- local: .gitlab/ci/qa-common/main.gitlab-ci.yml
44
- local: .gitlab/ci/qa-common/rules.gitlab-ci.yml
55
- local: .gitlab/ci/qa-common/variables.gitlab-ci.yml
6+
- component: "gitlab.com/gitlab-org/quality/pipeline-common/[email protected]"
7+
inputs:
8+
job_name: "e2e-test-report"
9+
job_stage: "report"
10+
aws_access_key_id_variable_name: "QA_ALLURE_AWS_ACCESS_KEY_ID"
11+
aws_secret_access_key_variable_name: "QA_ALLURE_AWS_SECRET_ACCESS_KEY"
12+
gitlab_auth_token_variable_name: "PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE"
13+
allure_results_glob: "qa/tmp/allure-results"
14+
allure_ref_slug: "${CI_COMMIT_REF_SLUG}"
15+
allure_project_path: "${CI_PROJECT_PATH}"
16+
allure_merge_request_iid: "${CI_MERGE_REQUEST_IID}"
17+
allure_job_name: "${QA_RUN_TYPE}"
18+
19+
# code pattern changes
20+
.code-pattern-changes: &code-pattern-changes
21+
if: $MR_CODE_PATTERNS == "true"
22+
23+
# Run all tests when QA framework changes present, full suite execution is explicitly enabled or a feature flag file is removed
24+
.qa-run-all-tests: &qa-run-all-tests
25+
if: $QA_FRAMEWORK_CHANGES == "true" || $QA_RUN_ALL_TESTS == "true" || $QA_RUN_ALL_E2E_LABEL == "true" || $QA_FEATURE_FLAGS =~ /deleted/
26+
27+
variables:
28+
COLORIZED_LOGS: "true"
29+
GIT_DEPTH: "20"
30+
GIT_STRATEGY: "clone" # 'GIT_STRATEGY: clone' optimizes the pack-objects cache hit ratio
31+
GIT_SUBMODULE_STRATEGY: "none"
32+
33+
.rules:gdk:qa-selective:
34+
rules:
35+
- <<: *code-pattern-changes
36+
when: never
37+
- !reference [.rules:test:qa-selective, rules]
38+
- if: $QA_SUITES =~ /Test::Instance::Blocking/
39+
40+
.rules:gdk:qa-parallel:
41+
rules:
42+
- *code-pattern-changes
43+
- !reference [.rules:test:qa-parallel, rules]
44+
- if: $QA_SUITES =~ /Test::Instance::Blocking/
45+
46+
.rules:gdk:qa-smoke:
47+
rules:
48+
- <<: *code-pattern-changes
49+
variables:
50+
QA_TESTS: ""
51+
- <<: *qa-run-all-tests
52+
variables:
53+
QA_TESTS: ""
54+
- if: $QA_SUITES =~ /Test::Instance::Smoke/
655

756
.gdk-qa-base:
857
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}:bundler-2.3-git-2.36-lfs-2.9-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION}-gcloud-383-kubectl-1.23
@@ -70,27 +119,10 @@ include:
70119
expire_in: 7 days
71120
when: always
72121

73-
# Take the existing GDK docker image and reconfigure it with Postgres load
74-
# balancing. Adding 5s lag to 1 of the replicas to validate robustness of
75-
# the load balancer.
76-
.gdk-with-load-balancer-setup:
77-
before_script:
78-
- !reference [".gdk-qa-base", "before_script"]
79-
- |
80-
docker exec gdk bash -c "
81-
gdk config set postgresql.replica.enabled true &&\
82-
gdk config set postgresql.replica_2.enabled true &&\
83-
gdk config set load_balancing.enabled true &&\
84-
gdk reconfigure &&\
85-
gdk restart"
86-
87122
download-knapsack-report:
88123
extends:
89124
- .download-knapsack-report
90125
- .rules:download-knapsack
91-
needs:
92-
- pipeline: $PARENT_PIPELINE_ID
93-
job: build-qa-image
94126

95127
cache-gems:
96128
extends:
@@ -103,23 +135,33 @@ cache-gems:
103135
script:
104136
- cd qa && bundle install
105137

138+
# Take the existing GDK docker image and reconfigure it with Postgres load
139+
# balancing. Adding 5s lag to 1 of the replicas to validate robustness of
140+
# the load balancer.
141+
.gdk-with-load-balancer-setup:
142+
before_script:
143+
- !reference [".gdk-qa-base", "before_script"]
144+
- |
145+
docker exec gdk bash -c "
146+
gdk config set postgresql.replica.enabled true &&\
147+
gdk config set postgresql.replica_2.enabled true &&\
148+
gdk config set load_balancing.enabled true &&\
149+
gdk reconfigure &&\
150+
gdk restart"
151+
106152
download-fast-quarantine-report:
107153
extends:
108154
- .download-fast-quarantine-report
109155
- .rules:download-fast-quarantine-report
110156

111-
# ==========================================
112-
# Test stage
113-
# ==========================================
114157
gdk-qa-smoke:
115158
extends:
116159
- .gdk-qa-base
117160
- .gitlab-qa-report
161+
- .rules:gdk:qa-smoke
118162
variables:
119163
QA_SCENARIO: Test::Instance::Smoke
120164
QA_RUN_TYPE: gdk-qa-smoke
121-
rules:
122-
- when: always
123165

124166
gdk-qa-smoke-with-load-balancer:
125167
extends:
@@ -143,12 +185,20 @@ gdk-qa-reliable:
143185
- .gdk-qa-base
144186
- .gitlab-qa-report
145187
- .parallel
188+
- .rules:gdk:qa-parallel
146189
variables:
147190
QA_SCENARIO: Test::Instance::Blocking
148191
QA_RUN_TYPE: gdk-qa-blocking
149192
parallel: 10
150-
rules:
151-
- when: always
193+
194+
gdk-qa-reliable-selective:
195+
extends:
196+
- .gdk-qa-base
197+
- .gitlab-qa-report
198+
- .rules:gdk:qa-selective
199+
variables:
200+
QA_SCENARIO: Test::Instance::Blocking
201+
QA_RUN_TYPE: gdk-qa-blocking
152202

153203
gdk-qa-reliable-with-load-balancer:
154204
extends:
@@ -184,8 +234,6 @@ gdk-qa-non-blocking:
184234
# ==========================================
185235
e2e-test-report:
186236
extends: .rules:report:allure-report
187-
variables:
188-
ALLURE_REPORT_RESULTS_GLOB: "qa/tmp/allure-results"
189237

190238
upload-knapsack-report:
191239
extends:

app/finders/packages/packages_finder.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def execute
2222
packages = filter_by_package_type(packages)
2323
packages = filter_by_package_name(packages)
2424
packages = filter_by_status(packages)
25+
packages = filter_by_package_version(packages)
2526
order_packages(packages)
2627
end
2728

app/graphql/resolvers/packages_base_resolver.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ class PackagesBaseResolver < BaseResolver
1919
required: false,
2020
default_value: nil
2121

22+
argument :package_version, GraphQL::Types::String,
23+
description: 'Filter a package by version.',
24+
required: false,
25+
default_value: nil
26+
2227
argument :status, Types::Packages::PackageStatusEnum,
2328
description: 'Filter a package by status.',
2429
required: false,

doc/administration/gitaly/recovery.md

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,17 @@ You can add and replace Gitaly nodes on a Gitaly Cluster.
1515

1616
### Add new Gitaly nodes
1717

18-
To add a new Gitaly node to a Gitaly Cluster that has [replication factor](praefect.md#configure-replication-factor):
18+
The steps to add a new Gitaly node to a Gitaly Cluster depend on whether a [custom replication factor](praefect.md#configure-replication-factor) is set.
1919

20-
- Set, set the [replication factor](praefect.md#configure-replication-factor) for each repository using `set-replication-factor` Praefect command. New repositories are
21-
replicated based on [replication factor](praefect.md#configure-replication-factor). Praefect doesn't automatically replicate existing repositories to the new Gitaly node.
22-
- Not set, add the new node in your [Praefect configuration](praefect.md#praefect) under `praefect['virtual_storages']`. Praefect automatically replicates all data to any
23-
new Gitaly node added to the configuration.
20+
#### Custom replication factor
21+
22+
If a custom replication factor is set, set the [replication factor](praefect.md#configure-replication-factor) for each repository using the
23+
`set-replication-factor` Praefect command. New repositories are replicated based on the [replication factor](praefect.md#configure-replication-factor). Praefect doesn't automatically replicate existing repositories to the new Gitaly node.
24+
25+
#### Default replication factor
26+
27+
If the default replication factor is used, add the new node in your [Praefect configuration](praefect.md#praefect) under `praefect['virtual_storages']`.
28+
Praefect automatically replicates all data to any new Gitaly node added to the configuration.
2429

2530
### Replace an existing Gitaly node
2631

@@ -33,32 +38,37 @@ To use the same name for the replacement node, use [repository verifier](praefec
3338

3439
#### With a node with a different name
3540

36-
To use a different name for the replacement node for a Gitaly Cluster that has [replication factor](praefect.md#configure-replication-factor):
41+
The steps use a different name for the replacement node for a Gitaly Cluster depend on if a [custom replication factor](praefect.md#configure-replication-factor)
42+
is set.
3743

38-
- Set, use [`praefect set-replication-factor`](praefect.md#configure-replication-factor) to set the replication factor per repository again to get new storage assigned.
39-
For example:
44+
##### Custom replication factor set
4045

41-
```shell
42-
$ sudo /opt/gitlab/embedded/bin/praefect -config /var/opt/gitlab/praefect/config.toml set-replication-factor -virtual-storage default -relative-path @hashed/3f/db/3fdba35f04dc8c462986c992bcf875546257113072a909c162f7e470e581e278.git -replication-factor 2
46+
If a custom replication factor is set, use [`praefect set-replication-factor`](praefect.md#configure-replication-factor) to set the replication factor per repository again to get new storage assigned. For example:
4347

44-
current assignments: gitaly-1, gitaly-2
45-
```
48+
```shell
49+
$ sudo /opt/gitlab/embedded/bin/praefect -config /var/opt/gitlab/praefect/config.toml set-replication-factor -virtual-storage default -relative-path @hashed/3f/db/3fdba35f04dc8c462986c992bcf875546257113072a909c162f7e470e581e278.git -replication-factor 2
50+
51+
current assignments: gitaly-1, gitaly-2
52+
```
53+
54+
To reassign all repositories from the old storage to the new one, after configuring the new Gitaly node:
4655

47-
To reassign all repositories from the old storage to the new one, after configuring the new Gitaly node:
56+
1. Connect to Praefect database:
4857

49-
1. Connect to Praefect database:
58+
```shell
59+
/opt/gitlab/embedded/bin/psql -h <psql host> -U <user> -d <database name>
60+
```
5061

51-
```shell
52-
/opt/gitlab/embedded/bin/psql -h <psql host> -U <user> -d <database name>
53-
```
62+
1. Update the `repository_assignments` table to replace the old Gitaly node name (for example, `old-gitaly`) with the new Gitaly node name
63+
(for example, `new-gitaly`):
5464

55-
1. Update `repository_assignments` table to replace the old Gitaly node name (for example, `old-gitaly`) with the new Gitaly node name (for example, `new-gitaly`):
65+
```sql
66+
UPDATE repository_assignments SET storage='new-gitaly' WHERE storage='old-gitaly';
67+
```
5668

57-
```sql
58-
UPDATE repository_assignments SET storage='new-gitaly' WHERE storage='old-gitaly';
59-
```
69+
##### Default replication factor
6070

61-
- Not set, replace the node in the configuration. The old node's state remains in the Praefect database but it is ignored.
71+
If the default replication factor is used, replace the node in the configuration. The old node's state remains in the Praefect database but it is ignored.
6272

6373
## Primary node failure
6474

doc/administration/settings/jira_cloud_app.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ To create an OAuth application on your self-managed instance:
4545
1. Paste the **Application ID** value into **Jira Connect Application ID**.
4646
1. Select **Save changes**.
4747

48+
## Jira user requirements
49+
50+
You must ensure that the Jira user that is used to setup the GitLab for Jira Cloud app is a member of the Site Administrators (`site-admins`) group in your
51+
[Atlassian organization](https://admin.atlassian.com):
52+
53+
1. If you don't have a `site-admins` group in your Atlassian organization, [create the group](https://support.atlassian.com/user-management/docs/create-groups/).
54+
1. If not already a member, [add your Jira user as a member](https://support.atlassian.com/user-management/docs/edit-a-group/) of the `site-admins` group.
55+
56+
If you have customized your global permissions in Jira, you might also need to grant the
57+
[`Browse users and groups` permission](https://confluence.atlassian.com/jirakb/unable-to-browse-for-users-and-groups-120521888.html) to the Jira user.
58+
4859
## Connect the GitLab for Jira Cloud app
4960

5061
> Introduced in GitLab 15.7.
@@ -76,6 +87,7 @@ With this method:
7687
- Set up an internet-facing reverse proxy in front of your self-managed instance. To secure this proxy further, only allow inbound
7788
traffic from [Atlassian IP addresses](https://support.atlassian.com/organization-administration/docs/ip-addresses-and-domains-for-atlassian-cloud-products/#Outgoing-Connections).
7889
- Add [GitLab IP addresses](../../user/gitlab_com/index.md#ip-range) to the allowlist of your firewall.
90+
- The Jira user that installs and configures the GitLab for Jira Cloud app must meet certain [requirements](#jira-user-requirements).
7991

8092
### Set up your instance
8193

@@ -144,6 +156,7 @@ To support your self-managed instance with Jira Cloud, do one of the following:
144156

145157
- The instance must be publicly available.
146158
- You must set up [OAuth authentication](#set-up-oauth-authentication).
159+
- The Jira user that installs and configures the GitLab for Jira Cloud app must meet certain [requirements](#jira-user-requirements).
147160

148161
### Install the app in development mode
149162

@@ -349,9 +362,6 @@ When you check the browser console, you might see the following message:
349362
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://gitlab.example.com/-/jira_connect/oauth_application_id. (Reason: CORS header 'Access-Control-Allow-Origin' missing). Status code: 403.
350363
```
351364

352-
`403` status code is returned if:
353-
354-
- The user information cannot be fetched from Jira.
355-
- The authenticated Jira user does not have [site administrator](https://support.atlassian.com/user-management/docs/give-users-admin-permissions/#Make-someone-a-site-admin) access.
365+
`403` status code is returned if the user information cannot be fetched from Jira because of insufficient permissions.
356366

357-
To resolve this issue, ensure the authenticated user is a Jira site administrator and try again.
367+
To resolve this issue, ensure that the Jira user that installs and configures the GitLab for Jira Cloud app meets certain [requirements](#jira-user-requirements).

doc/api/graphql/reference/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18884,6 +18884,7 @@ four standard [pagination arguments](#connection-pagination-arguments):
1888418884
| <a id="grouppackagesincludeversionless"></a>`includeVersionless` | [`Boolean`](#boolean) | Include versionless packages. |
1888518885
| <a id="grouppackagespackagename"></a>`packageName` | [`String`](#string) | Search a package by name. |
1888618886
| <a id="grouppackagespackagetype"></a>`packageType` | [`PackageTypeEnum`](#packagetypeenum) | Filter a package by type. |
18887+
| <a id="grouppackagespackageversion"></a>`packageVersion` | [`String`](#string) | Filter a package by version. |
1888718888
| <a id="grouppackagessort"></a>`sort` | [`PackageGroupSort`](#packagegroupsort) | Sort packages by this criteria. |
1888818889
| <a id="grouppackagesstatus"></a>`status` | [`PackageStatus`](#packagestatus) | Filter a package by status. |
1888918890

@@ -23826,6 +23827,7 @@ four standard [pagination arguments](#connection-pagination-arguments):
2382623827
| <a id="projectpackagesincludeversionless"></a>`includeVersionless` | [`Boolean`](#boolean) | Include versionless packages. |
2382723828
| <a id="projectpackagespackagename"></a>`packageName` | [`String`](#string) | Search a package by name. |
2382823829
| <a id="projectpackagespackagetype"></a>`packageType` | [`PackageTypeEnum`](#packagetypeenum) | Filter a package by type. |
23830+
| <a id="projectpackagespackageversion"></a>`packageVersion` | [`String`](#string) | Filter a package by version. |
2382923831
| <a id="projectpackagessort"></a>`sort` | [`PackageSort`](#packagesort) | Sort packages by this criteria. |
2383023832
| <a id="projectpackagesstatus"></a>`status` | [`PackageStatus`](#packagestatus) | Filter a package by status. |
2383123833

doc/api/packages.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ GET /projects/:id/packages
3030
| `sort` | string | no | The direction of the order, either `asc` (default) for ascending order or `desc` for descending order. |
3131
| `package_type` | string | no | Filter the returned packages by type. One of `conan`, `maven`, `npm`, `pypi`, `composer`, `nuget`, `helm`, `terraform_module`, or `golang`. (_Introduced in GitLab 12.9_)
3232
| `package_name` | string | no | Filter the project packages with a fuzzy search by name. (_Introduced in GitLab 12.9_)
33+
| `package_version` | string | no | Filter the project packages by version. (_[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/349065) in GitLab 16.6_)
3334
| `include_versionless` | boolean | no | When set to true, versionless packages are included in the response. (_Introduced in GitLab 13.8_)
3435
| `status` | string | no | Filter the returned packages by status. One of `default` (default), `hidden`, `processing`, `error`, or `pending_destruction`. (_Introduced in GitLab 13.9_)
3536

@@ -97,6 +98,7 @@ GET /groups/:id/packages
9798
| `sort` | string | no | The direction of the order, either `asc` (default) for ascending order or `desc` for descending order. |
9899
| `package_type` | string | no | Filter the returned packages by type. One of `conan`, `maven`, `npm`, `pypi`, `composer`, `nuget`, `helm`, or `golang`. (_Introduced in GitLab 12.9_) |
99100
| `package_name` | string | no | Filter the project packages with a fuzzy search by name. (_[Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/30980) in GitLab 13.0_)
101+
| `package_version` | string | no | Filter the returned packages by version. (_[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/349065) in GitLab 16.6_)
100102
| `include_versionless` | boolean | no | When set to true, versionless packages are included in the response. (_Introduced in GitLab 13.8_)
101103
| `status` | string | no | Filter the returned packages by status. One of `default` (default), `hidden`, `processing`, `error`, or `pending_destruction`. (_Introduced in GitLab 13.9_)
102104

doc/development/api_graphql_styleguide.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,14 @@ developers must familiarize themselves with our [Deprecation and Removal process
154154
Breaking changes are:
155155

156156
- Removing or renaming a field, argument, enum value, or mutation.
157-
- Changing the type or type name of an argument. This is because the type of an argument
157+
- Changing the type or type name of an argument. The type of an argument
158158
is declared by the client when [using variables](https://graphql.org/learn/queries/#variables),
159-
and queries with the old type name would be rejected by the API.
160-
- Changing the _scalar type_ of a field or enum value. Object types can be changed so long as all
161-
scalar type fields of the object remain the same.
159+
and a change would cause a query using the old type name to be rejected by the API.
160+
- Changing the [_scalar type_](https://graphql.org/learn/schema/#scalar-types) of a field or enum
161+
value where it results in a change to how the value serializes to JSON.
162+
For example, a change from a JSON String to a JSON Number, or a change to how a String is formatted.
163+
A change to another [_object type_](https://graphql.org/learn/schema/#object-types-and-fields) can be
164+
allowed so long as all scalar type fields of the object continue to serialize in the same way.
162165
- Raising the [complexity](#max-complexity) of a field or complexity multipliers in a resolver.
163166
- Changing a field from being _not_ nullable (`null: false`) to nullable (`null: true`), as
164167
discussed in [Nullable fields](#nullable-fields).

doc/integration/jira/connect-app.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,7 @@ After you connect the GitLab for Jira Cloud app, you might get this error:
107107
Failed to link group. Please try again.
108108
```
109109

110-
`403` status code is returned if:
110+
`403` status code is returned if the user information cannot be fetched from Jira due to insufficient permissions.
111111

112-
- The user information cannot be fetched from Jira.
113-
- The authenticated Jira user does not have [site administrator](https://support.atlassian.com/user-management/docs/give-users-admin-permissions/#Make-someone-a-site-admin) access.
114-
115-
To resolve this issue, ensure the authenticated user is a Jira site administrator and try again.
112+
To resolve this issue, ensure that the Jira user that installs and configures the GitLab for Jira Cloud app meets certain
113+
[requirements](../../administration/settings/jira_cloud_app.md#jira-user-requirements).

0 commit comments

Comments
 (0)