Skip to content

Commit 7817e86

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 6a83773 commit 7817e86

File tree

61 files changed

+475
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+475
-203
lines changed

.gitlab/issue_templates/Bug.md

+5
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ will also determine whether the bug is fixed in a more recent version. -->
4242
<!-- If you are reporting a bug on GitLab.com, uncomment below -->
4343

4444
<!-- This bug happens on GitLab.com -->
45+
46+
<!-- and uncomment below if you have /label privileges -->
4547
<!-- /label ~"reproduced on GitLab.com" -->
48+
<!-- or follow up with an issue comment of `@gitlab-bot label ~"reproduced on GitLab.com"` if you do not -->
4649

4750
#### Results of GitLab environment info
4851

@@ -86,3 +89,5 @@ will also determine whether the bug is fixed in a more recent version. -->
8689
<!-- If you can, link to the line of code that might be responsible for the problem. -->
8790

8891
/label ~"type::bug"
92+
<!-- If you don't have /label privileges, follow up with an issue comment of `@gitlab-bot label ~"type::bug"` -->
93+

app/graphql/resolvers/ci/project_pipeline_analytics_resolver.rb

+14-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ class ProjectPipelineAnalyticsResolver < BaseResolver
1313

1414
alias_method :project, :object
1515

16+
argument :source, Types::PipelineCiSourcesEnum,
17+
required: false,
18+
description: 'Source of the pipeline.',
19+
alpha: { milestone: '17.5' }
20+
21+
argument :ref, GraphQL::Types::String,
22+
required: false,
23+
description: 'Branch that triggered the pipeline.',
24+
alpha: { milestone: '17.5' }
25+
1626
argument :from_time, Types::TimeType,
1727
required: false,
1828
description: 'Start of the requested time frame. Defaults to the pipelines started in the past week.',
@@ -23,13 +33,15 @@ class ProjectPipelineAnalyticsResolver < BaseResolver
2333
description: 'End of the requested time frame. Defaults to pipelines started before the current date.',
2434
alpha: { milestone: '17.5' }
2535

26-
def resolve(lookahead:, from_time: nil, to_time: nil)
36+
def resolve(lookahead:, source: nil, ref: nil, from_time: nil, to_time: nil)
2737
result = legacy_fields(lookahead)
2838

2939
if any_field_selected?(lookahead, :aggregate)
3040
response =
3141
::Ci::CollectPipelineAnalyticsService.new(
32-
current_user: context[:current_user], project: project, from_time: from_time, to_time: to_time,
42+
current_user: context[:current_user], project: project,
43+
source: source, ref: ref,
44+
from_time: from_time, to_time: to_time,
3345
status_groups: selected_status_groups(lookahead)
3446
).execute
3547

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# frozen_string_literal: true
2+
3+
module Types
4+
class PipelineCiSourcesEnum < BaseEnum # rubocop:disable Gitlab/BoundedContexts -- Disabling because it's a custom enum
5+
graphql_name 'PipelineCiSources'
6+
description 'Pipeline CI sources'
7+
8+
Enums::Ci::Pipeline.ci_sources.each_key do |source|
9+
article = %w[a e i o u].include?(source.to_s[0].downcase) ? 'an' : 'a'
10+
desc_source = source.to_s.include?('api') ? 'API' : source
11+
description = "Pipeline created by #{article} #{desc_source.to_s.tr('_', ' ').delete_suffix(' event')} event"
12+
value source.to_s.upcase, value: source, description: description
13+
end
14+
end
15+
end

app/helpers/preferences_helper.rb

+7-1
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,14 @@ def dashboard_choices
2727

2828
# Maps `dashboard` values to more user-friendly option text
2929
def localized_dashboard_choices
30+
projects = if Feature.enabled?(:your_work_projects_vue, current_user)
31+
_("Your Contributed Projects (default)")
32+
else
33+
_("Your Projects (default)")
34+
end
35+
3036
{
31-
projects: _("Your Projects (default)"),
37+
projects: projects,
3238
stars: _("Starred Projects"),
3339
your_activity: _("Your Activity"),
3440
project_activity: _("Your Projects' Activity"),

app/services/ci/collect_pipeline_analytics_service.rb

+11-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ class CollectPipelineAnalyticsService
66
STATUS_GROUPS = STATUS_GROUP_TO_STATUSES.keys.freeze
77
STATUS_TO_STATUS_GROUP = STATUS_GROUP_TO_STATUSES.flat_map { |k, v| v.product([k]) }.to_h
88

9-
def initialize(current_user:, project:, from_time:, to_time:, status_groups: [:all])
9+
def initialize(current_user:, project:, from_time:, to_time:, source: nil, ref: nil, status_groups: [:all])
1010
@current_user = current_user
1111
@project = project
1212
@status_groups = status_groups
13+
@source = source
14+
@ref = ref
1315
@from_time = from_time || 1.week.ago.utc
1416
@to_time = to_time || Time.now.utc
1517
end
@@ -45,7 +47,14 @@ def clickhouse_model
4547

4648
def calculate_aggregate
4749
result = @status_groups.index_with(0)
48-
query = clickhouse_model.for_project(@project).within_dates(@from_time, @to_time)
50+
51+
query = clickhouse_model
52+
.for_project(@project)
53+
.within_dates(@from_time, @to_time)
54+
55+
query = query.for_source(@source) if @source
56+
query = query.for_ref(@ref) if @ref
57+
4958
if @status_groups.include?(:all)
5059
all_query = query.select(query.count_pipelines_function.as('all'))
5160
result[:all] = ::ClickHouse::Client.select(all_query.to_sql, :main).first['all']
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
name: partition_ci_build_trace_metadata
3+
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/469056
4+
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/168756
5+
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/481800
6+
milestone: '17.5'
7+
group: group::ci platform
8+
type: gitlab_com_derisk
9+
default_enabled: false

config/initializers/postgres_partitioning.rb

+18
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,22 @@
102102
}
103103
]
104104
)
105+
106+
Gitlab::Database::Partitioning.register_tables(
107+
[
108+
{
109+
limit_connection_names: %i[ci],
110+
table_name: 'p_ci_build_trace_metadata',
111+
partitioned_column: :partition_id,
112+
strategy: :ci_sliding_list,
113+
next_partition_if: ->(latest_partition) {
114+
::Feature.enabled?(:partition_ci_build_trace_metadata, :instance) &&
115+
latest_partition &&
116+
[100, 101].include?(latest_partition.values.max)
117+
},
118+
detach_partition_if: proc { false }
119+
}
120+
]
121+
)
122+
105123
Gitlab::Database::Partitioning.sync_partitions_ignore_db_error

doc/administration/backup_restore/backup_gitlab.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ DECOMPRESS_CMD=tee gitlab-backup restore
388388
##### Parallel compression with `pigz`
389389

390390
WARNING:
391-
While we support using `COMPRESS_CMD` and `DECOMPRESS_CMD` to override the default Gzip compression library, we currently only test the default Gzip library with default options on a routine basis. You are responsible for testing and validating the viability of your backups. We strongly recommend this as best practice in general for backups, whether overriding the compression command or not. If you encounter issues with another compression library, you should revert back to the default. Troubleshooting and fixing errors with alternative libraries are a lower priority for GitLab.
391+
While we support using `COMPRESS_CMD` and `DECOMPRESS_CMD` to override the default Gzip compression library, we only test the default Gzip library with default options on a routine basis. You are responsible for testing and validating the viability of your backups. We strongly recommend this as best practice in general for backups, whether overriding the compression command or not. If you encounter issues with another compression library, you should revert back to the default. Troubleshooting and fixing errors with alternative libraries are a lower priority for GitLab.
392392

393393
NOTE:
394394
`pigz` is not included in the GitLab Linux package. You must install it yourself.
@@ -408,7 +408,7 @@ DECOMPRESS_CMD="pigz --decompress --stdout" sudo gitlab-backup restore
408408
##### Parallel compression with `zstd`
409409

410410
WARNING:
411-
While we support using `COMPRESS_CMD` and `DECOMPRESS_CMD` to override the default Gzip compression library, we currently only test the default Gzip library with default options on a routine basis. You are responsible for testing and validating the viability of your backups. We strongly recommend this as best practice in general for backups, whether overriding the compression command or not. If you encounter issues with another compression library, you should revert back to the default. Troubleshooting and fixing errors with alternative libraries are a lower priority for GitLab.
411+
While we support using `COMPRESS_CMD` and `DECOMPRESS_CMD` to override the default Gzip compression library, we only test the default Gzip library with default options on a routine basis. You are responsible for testing and validating the viability of your backups. We strongly recommend this as best practice in general for backups, whether overriding the compression command or not. If you encounter issues with another compression library, you should revert back to the default. Troubleshooting and fixing errors with alternative libraries are a lower priority for GitLab.
412412

413413
NOTE:
414414
`zstd` is not included in the GitLab Linux package. You must install it yourself.

doc/administration/backup_restore/migrate_to_new_server.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ To prepare the new server:
9292
1. On the left sidebar, select **Monitoring > Background jobs**.
9393
1. Under the Sidekiq dashboard, select **Cron** tab and then
9494
**Disable All**.
95-
1. Wait for the currently running CI/CD jobs to finish, or accept that jobs that have not completed may be lost.
96-
To view jobs currently running, on the left sidebar, select **Overviews > Jobs**,
95+
1. Wait for the running CI/CD jobs to finish, or accept that jobs that have not completed may be lost.
96+
To view jobs running, on the left sidebar, select **Overviews > Jobs**,
9797
and then select **Running**.
9898
1. Wait for Sidekiq jobs to finish:
9999
1. On the left sidebar, select **Monitoring > Background jobs**.

doc/administration/backup_restore/troubleshooting_backup_gitlab.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ Truncate the filenames in the `uploads` table:
375375

376376
Where:
377377

378-
- `current_filename`: a filename that is currently more than 246 characters long.
378+
- `current_filename`: a filename that is more than 246 characters long.
379379
- `new_filename`: a filename that has been truncated to 246 characters maximum.
380380
- `new_path`: new path considering the `new_filename` (truncated).
381381

doc/administration/dedicated/configure_instance.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ You can use the configuration change log to track the changes made to your GitLa
7878
Each configuration change has a status:
7979

8080
- Initiated: Configuration change is made in Switchboard, but not yet deployed to the instance.
81-
- In progress: Configuration change is currently being deployed to the instance.
81+
- In progress: Configuration change is actively being deployed to the instance.
8282
- Complete: Configuration change has been deployed to the instance.
8383
- Delayed: Initial job to deploy a change has failed and the change has not yet been assigned to a new job.
8484

doc/administration/geo/disaster_recovery/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ causes downtime.
1919

2020
## Promoting a **secondary** Geo site in single-secondary configurations
2121

22-
We don't currently provide an automated way to promote a Geo replica and do a
23-
failover, but you can do it manually if you have `root` access to the machine.
22+
While you can't automatically promote a Geo replica and do a failover,
23+
you can promote it manually if you have `root` access to the machine.
2424

2525
This process promotes a **secondary** Geo site to a **primary** site. To regain
2626
geographic redundancy as quickly as possible, you should add a new **secondary** site

doc/administration/geo/replication/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Read the documentation for [Disaster Recovery](../disaster_recovery/index.md).
4848

4949
## What data is replicated to a **secondary** site?
5050

51-
We currently replicate the whole rails database, project repositories, LFS objects, generated
51+
We replicate the whole rails database, project repositories, LFS objects, generated
5252
attachments, avatars and more. This means information such as user accounts,
5353
issues, merge requests, groups, and project data are available for
5454
query.

doc/administration/geo/replication/object_storage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ configure the **secondary** in a few ways:
6969
- Use a separate object store and enable the **Allow this secondary node to replicate
7070
content on Object Storage** setting.
7171

72-
GitLab does not currently support the case where both:
72+
GitLab does not support the case where both:
7373

7474
- The **primary** site uses local storage.
7575
- A **secondary** site uses object storage.

doc/administration/geo/replication/security_review.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ from [owasp.org](https://owasp.org/).
272272

273273
### What user authorization requirements have been defined?
274274

275-
- **Secondary** sites must only be able to *read* data. They are not currently able to mutate data on the **primary** site.
275+
- **Secondary** sites must only be able to *read* data. They cannot mutate data on the **primary** site.
276276

277277
### What session management requirements have been defined?
278278

doc/administration/geo/replication/troubleshooting/synchronization.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ project.replicator.sync
301301

302302
The following script:
303303

304-
- Loops over all currently failed repositories.
304+
- Loops over all failed repositories.
305305
- Displays the project details and the reasons for the last failure.
306306
- Attempts to resync the repository.
307307
- Reports back if a failure occurs, and why.

doc/administration/geo/secondary_proxy/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ distributes traffic to your Geo sites using a location-aware URL.
118118
### Configure each site to use the same external URL
119119

120120
After you have set up routing from a single URL to all of your Geo sites, follow
121-
the following steps if your sites currently use different URLs:
121+
the following steps if your sites use different URLs:
122122

123123
1. On each GitLab site, SSH into **each** node running Rails (Puma, Sidekiq, Log-Cursor)
124124
and set the `external_url` to that of the single URL:
@@ -153,7 +153,7 @@ GitLab does not support multiple external URLs, see [issue 21319](https://gitlab
153153

154154
### Configure a secondary Geo site to a different external URL than the primary site
155155

156-
If your secondary site currently uses the same external URL as the primary site:
156+
If your secondary site uses the same external URL as the primary site:
157157

158158
1. On the secondary site, SSH into **each** node running Rails (Puma, Sidekiq, Log-Cursor)
159159
and set the `external_url` to the desired URL for the secondary site:
@@ -197,7 +197,7 @@ Most HTTP traffic sent to a secondary Geo site is proxied to the primary Geo sit
197197
secondary Geo sites are able to support write requests, and avoid read-after-write problems. Certain
198198
**read** requests are handled locally by secondary sites for improved latency and bandwidth nearby.
199199

200-
The following table details the components currently tested through the Geo secondary site Workhorse proxy.
200+
The following table details the components tested through the Geo secondary site Workhorse proxy.
201201
It does not cover all data types.
202202

203203
In this context, accelerated reads refer to read requests served from the secondary site, provided that the data is up to date for the component on the secondary site. If the data on the secondary site is determined to be out of date, the request is forwarded to the primary site. Read requests for components not listed in the table below are always automatically forwarded to the primary site.

doc/administration/geo_sites.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ All Geo sites have the following settings:
2828
| Name | The unique identifier for the Geo site. It's highly recommended to use a physical location as a name. Good examples are "London Office" or "us-east-1". Avoid words like "primary", "secondary", "Geo", or "DR". This makes the failover process easier because the physical location does not change, but the Geo site role can. All nodes in a single Geo site use the same site name. Nodes use the `gitlab_rails['geo_node_name']` setting in `/etc/gitlab/gitlab.rb` to lookup their Geo site record in the PostgreSQL database. If `gitlab_rails['geo_node_name']` is not set, the node's `external_url` with trailing slash is used as fallback. The value of `Name` is case-sensitive, and most characters are allowed. |
2929
| URL | The instance's user-facing URL. |
3030

31-
The site you're currently browsing is indicated with a blue `Current` label, and
31+
The site you're browsing is indicated with a blue `Current` label, and
3232
the **primary** node is listed first as `Primary site`.
3333

3434
## Secondary site settings

doc/administration/operations/ssh_certificates.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,15 @@ Consider the balance between the number of keys for typical users (especially if
153153

154154
Users can still bypass SSH certificate authentication by manually
155155
uploading an SSH public key to their profile, relying on the
156-
`~/.ssh/authorized_keys` fallback to authenticate it. There's
157-
currently no feature to prevent this,
158-
[but there's an open request for adding it](https://gitlab.com/gitlab-org/gitlab/-/issues/23260).
159-
160-
Such a restriction can currently be hacked in by, for example, providing a
161-
custom `AuthorizedKeysCommand` which checks if the discovered key-ID
162-
returned from `gitlab-shell-authorized-keys-check` is a deploy key or
163-
not (all non-deploy keys should be refused).
156+
`~/.ssh/authorized_keys` fallback to authenticate it.
157+
158+
There's an [open issue](https://gitlab.com/gitlab-org/gitlab/-/issues/23260)
159+
to add a setting that prevents users from uploading SSH keys that are not deploy keys.
160+
161+
You can build a check to enforce this restriction yourself.
162+
For example, provide a custom `AuthorizedKeysCommand` which checks
163+
if the discovered key-ID returned from `gitlab-shell-authorized-keys-check`
164+
is a deploy key or not (all non-deploy keys should be refused).
164165

165166
## Disabling the global warning about users lacking SSH keys
166167

doc/administration/package_information/supported_os.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ avoid confusion, the official policy is that at any point of time, all the
1717
operating systems supported by GitLab are listed in the
1818
[installation page](https://about.gitlab.com/install/).
1919

20-
The following lists the currently supported OSs and their possible EOL dates.
20+
The following lists the supported OSs and their possible EOL dates.
2121

2222
NOTE:
2323
`amd64` and `x86_64` refer to the same 64-bit architecture.

doc/administration/postgresql/upgrading_os.md

-2
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,6 @@ different types of indexes were handled, see the blog post about
240240

241241
To see what version of `glibc` is used, run `ldd --version`.
242242

243-
You can compare the behavior of `glibc` on your servers [using shell commands](../geo/replication/troubleshooting/common.md#check-os-locale-data-compatibility).
244-
245243
The following table shows the `glibc` versions shipped for different operating systems:
246244

247245
| Operating system | `glibc` version |

doc/administration/reference_architectures/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ architectures are designed to have enough memory in most cases to avoid the need
410410
[Praefect requires its own database server](../gitaly/praefect.md#postgresql) and
411411
a third-party PostgreSQL database solution to achieve full HA.
412412

413-
We hope to offer a built-in solution for these restrictions in the future. In the meantime, you can set up a
413+
We hope to offer a built-in solution for these restrictions in the future. In the meantime, you can set up a
414414
non-HA PostgreSQL server using the Linux package as the specifications reflect. See the following issues for more information:
415415

416416
- [`omnibus-gitlab#7292`](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/7292).
@@ -812,7 +812,7 @@ The Reference Architectures have been designed to have elasticity to accommodate
812812
The following components can impact others when they have been significantly scaled:
813813

814814
- Puma and Sidekiq - Notable scale ups of either Puma or Sidekiq workers will result in higher concurrent connections to the internal load balancer, PostgreSQL (via PgBouncer if present), Gitaly (via Praefect if present) and Redis respectively.
815-
- Redis is primarily single threaded and in some cases may need to be split up into different instances (Cache / Persistent) if the increased throughput causes CPU exhaustion if a combined cluster is currently being used.
815+
- Redis is primarily single-threaded. In some cases, you may need to split Redis into separate instances (for example, cache and persistent) if the increased throughput causes CPU exhaustion in a combined cluster.
816816
- PgBouncer is also single threaded but a scale out might result in a new pool being added that in turn might increase the total connections to Postgres. It's strongly recommended to only do this if you have experience in managing Postgres connections and to seek assistance if in doubt.
817817
- Gitaly Cluster / PostgreSQL - A notable scale out of additional nodes can have a detrimental effect on the HA system and performance due to increased replication calls to the primary node.
818818

0 commit comments

Comments
 (0)