Skip to content

Commit 6a7ae91

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 90d525e commit 6a7ae91

File tree

49 files changed

+373
-1571
lines changed

Some content is hidden

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

49 files changed

+373
-1571
lines changed

.gitlab/CODEOWNERS

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
.gitlab/CODEOWNERS @gitlab-org/development-leaders @gitlab-org/tw-leadership
88

99
## Allows release tooling and Gitaly team members to update the Gitaly Version
10-
/GITALY_SERVER_VERSION @project_278964_bot_77e28085fcec07f14dfd31c689824b5b @gitlab-org/maintainers/rails-backend @gitlab-org/delivery @gl-gitaly
10+
/GITALY_SERVER_VERSION @project_278964_bot_e2e6cca5e3b0076fdecec369cccb9e18 @gitlab-org/maintainers/rails-backend @gitlab-org/delivery @gl-gitaly
1111

1212
## Allows release tooling, KAS version maintainers and the delivery team to update the KAS version
13-
/GITLAB_KAS_VERSION @project_278964_bot_77e28085fcec07f14dfd31c689824b5b @gitlab-org/maintainers/kas-version-maintainers @gitlab-org/maintainers/rails-backend @gitlab-org/delivery
13+
/GITLAB_KAS_VERSION @project_278964_bot_e2e6cca5e3b0076fdecec369cccb9e18 @gitlab-org/maintainers/kas-version-maintainers @gitlab-org/maintainers/rails-backend @gitlab-org/delivery
1414

1515
## Allows automated updates to E2E test knapsack reports
1616
/qa/knapsack/**/*.json @project_278964_bot_bd38289efeb650826d995b5f830ca9cb @gl-dx

app/assets/javascripts/glql/components/presenters/table.vue

-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ export default {
7676
persist-collapsed-state
7777
class="!gl-mt-5 gl-overflow-hidden"
7878
:body-class="{ '!gl-m-[-1px] !gl-p-0': items.length || isPreview }"
79-
footer-class="!gl-border-t-0"
8079
@collapsed="isCollapsed = true"
8180
@expanded="isCollapsed = false"
8281
>

app/finders/groups/user_groups_finder.rb

+10-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# permissions: string (see Types::Groups::UserPermissionsEnum)
1212
# search: string used for search on path and group name
1313
# sort: string (see Types::Namespaces::GroupSortEnum)
14+
# exact_matches_first: boolean used to enable priotization of exact matches
1415
#
1516
# Initially created to filter user groups and descendants where the user can create projects
1617
module Groups
@@ -26,8 +27,11 @@ def execute
2627
return Group.none if target_user.blank?
2728

2829
items = by_permission_scope
29-
items = by_search(items)
3030

31+
# Search will perform an ORDER BY to ensure exact matches are returned first.
32+
return by_search(items, exact_matches_first: true) if exact_matches_first_enabled?
33+
34+
items = by_search(items)
3135
sort(items)
3236
end
3337

@@ -68,5 +72,10 @@ def sort(items)
6872

6973
items.sort_by_attribute(params[:sort])
7074
end
75+
76+
def exact_matches_first_enabled?
77+
params[:exact_matches_first] && params[:search].present? &&
78+
Feature.enabled?(:exact_matches_first_project_transfer, current_user)
79+
end
7180
end
7281
end

app/finders/notes_finder.rb

-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ def redact_internal(notes)
193193
end
194194

195195
def without_hidden_notes?
196-
return false unless Feature.enabled?(:hidden_notes)
197196
return false if @current_user&.can_admin_all_resources?
198197

199198
true

app/models/note.rb

+1-5
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,7 @@ class Note < ApplicationRecord
171171
scope :with_metadata, -> { includes(:system_note_metadata) }
172172

173173
scope :without_hidden, -> {
174-
if Feature.enabled?(:hidden_notes)
175-
where_not_exists(Users::BannedUser.where('notes.author_id = banned_users.user_id'))
176-
else
177-
all
178-
end
174+
where_not_exists(Users::BannedUser.where('notes.author_id = banned_users.user_id'))
179175
}
180176

181177
scope :for_note_or_capitalized_note, ->(text) { where(note: [text, text.capitalize]) }

app/policies/base_policy.rb

+6
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ class BasePolicy < DeclarativePolicy::Base
7777
with_options scope: :global, score: 0
7878
condition(:can_create_organization) { Gitlab::CurrentSettings.can_create_organization }
7979

80+
desc "Only admins can destroy projects"
81+
condition(:owner_cannot_destroy_project, scope: :global) do
82+
::Gitlab::CurrentSettings.current_application_settings
83+
.default_project_deletion_protection
84+
end
85+
8086
desc "The application is restricted from public visibility"
8187
condition(:restricted_public_level, scope: :global) do
8288
Gitlab::CurrentSettings.current_application_settings.restricted_visibility_levels.include?(Gitlab::VisibilityLevel::PUBLIC)

app/services/click_house/sync_strategies/base_sync_strategy.rb

+9-3
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ def next_batch
7474
def process_batch(context)
7575
Enumerator.new do |yielder|
7676
has_more_data = false
77-
batching_scope.each_batch(of: BATCH_SIZE) do |relation|
78-
records = relation.select(projections).to_a
77+
batching_scope.each_batch(of: BATCH_SIZE, column: primary_key) do |relation|
78+
records = relation.select(*projections, "#{primary_key} AS id_for_cursor").to_a
7979
has_more_data = records.size == BATCH_SIZE
8080
records.each do |row|
8181
yielder << transform_row(row)
82-
context.last_processed_id = row.id
82+
context.last_processed_id = row.id_for_cursor
8383

8484
break if context.record_limit_reached?
8585
end
@@ -112,6 +112,12 @@ def projections
112112
raise NotImplementedError, "Subclasses must implement `projections`"
113113
end
114114

115+
# UInt type primary key used for cursor management,
116+
# override if necessary.
117+
def primary_key
118+
:id
119+
end
120+
115121
def csv_mapping
116122
raise NotImplementedError, "Subclasses must implement `csv_mapping`"
117123
end

app/views/groups/settings/_remove.html.haml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
- return unless can?(current_user, :remove_group, group)
12
- remove_form_id = local_assigns.fetch(:remove_form_id, nil)
23

34
- if group.adjourned_deletion?

config/feature_flags/development/hidden_notes.yml

-8
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: exact_matches_first_project_transfer
3+
description: Prioritize exact matches when searching for groups in project transfer
4+
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/536745
5+
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/188711
6+
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/536751
7+
milestone: '18.0'
8+
group: group::project management
9+
type: gitlab_com_derisk
10+
default_enabled: false

config/feature_flags/ops/database_reindexing.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ rollout_issue_url:
55
milestone: '13.5'
66
type: ops
77
group: group::database
8-
default_enabled: false
8+
default_enabled: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# frozen_string_literal: true
2+
3+
class SyncDropArtifactsPartitionIdJobIdIndex < Gitlab::Database::Migration[2.2]
4+
include Gitlab::Database::PartitioningMigrationHelpers
5+
6+
milestone '18.0'
7+
disable_ddl_transaction!
8+
9+
INDEX_NAME = :p_ci_job_artifacts_partition_id_job_id_idx
10+
11+
def up
12+
remove_concurrent_partitioned_index_by_name :p_ci_job_artifacts, INDEX_NAME
13+
end
14+
15+
def down
16+
add_concurrent_partitioned_index :p_ci_job_artifacts, [:partition_id, :job_id], name: INDEX_NAME
17+
end
18+
end

db/schema_migrations/20250411093351

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3edf57d181e9c073e472b33eac4b599afd3bddca2d99130e08fb58457f187cb2

db/structure.sql

-6
Original file line numberDiff line numberDiff line change
@@ -34490,10 +34490,6 @@ CREATE INDEX p_ci_job_artifacts_project_id_file_type_id_idx ON ONLY p_ci_job_art
3449034490

3449134491
CREATE INDEX index_ci_job_artifacts_on_id_project_id_and_file_type ON ci_job_artifacts USING btree (project_id, file_type, id);
3449234492

34493-
CREATE INDEX p_ci_job_artifacts_partition_id_job_id_idx ON ONLY p_ci_job_artifacts USING btree (partition_id, job_id);
34494-
34495-
CREATE INDEX index_ci_job_artifacts_on_partition_id_job_id ON ci_job_artifacts USING btree (partition_id, job_id);
34496-
3449734493
CREATE INDEX p_ci_job_artifacts_project_id_id_idx1 ON ONLY p_ci_job_artifacts USING btree (project_id, id);
3449834494

3449934495
CREATE INDEX index_ci_job_artifacts_on_project_id_and_id ON ci_job_artifacts USING btree (project_id, id);
@@ -40986,8 +40982,6 @@ ALTER INDEX p_ci_job_artifacts_project_id_created_at_id_idx ATTACH PARTITION ind
4098640982

4098740983
ALTER INDEX p_ci_job_artifacts_project_id_file_type_id_idx ATTACH PARTITION index_ci_job_artifacts_on_id_project_id_and_file_type;
4098840984

40989-
ALTER INDEX p_ci_job_artifacts_partition_id_job_id_idx ATTACH PARTITION index_ci_job_artifacts_on_partition_id_job_id;
40990-
4099140985
ALTER INDEX p_ci_job_artifacts_project_id_id_idx1 ATTACH PARTITION index_ci_job_artifacts_on_project_id_and_id;
4099240986

4099340987
ALTER INDEX p_ci_job_artifacts_project_id_idx1 ATTACH PARTITION index_ci_job_artifacts_on_project_id_for_security_reports;

doc/administration/gitlab_duo_self_hosted/troubleshooting.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ echo $AIGW_CUSTOM_MODELS__ENABLED # must be true
257257
```
258258
259259
If the environment variables are not set up correctly, set them by
260-
[creating a container](../../install/install_ai_gateway.md#find-the-ai-gateway-release).
260+
[creating a container](../../install/install_ai_gateway.md#find-the-ai-gateway-image).
261261
262262
## Check if the model is reachable from AI gateway
263263
@@ -295,7 +295,7 @@ If not successful, verify your network configurations.
295295
296296
## The image's platform does not match the host
297297
298-
When [finding the AI gateway release](../../install/install_ai_gateway.md#find-the-ai-gateway-release),
298+
When [finding the AI gateway release](../../install/install_ai_gateway.md#find-the-ai-gateway-image),
299299
you might get an error that states `The requested image's platform (linux/amd64) does not match the detected host`.
300300
301301
To work around this error, add `--platform linux/amd64` to the `docker run` command:

doc/administration/raketasks/maintenance.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -387,16 +387,17 @@ Starting with GitLab 17.1, migrations are executed in an
387387

388388
## Rebuild database indexes
389389

390-
{{< details >}}
390+
{{< history >}}
391391

392-
- Status: Experiment
392+
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42705) in GitLab 13.5 [with a flag](../../administration/feature_flags.md) named `database_reindexing`. Disabled by default.
393+
- [Enabled on GitLab.com](https://gitlab.com/groups/gitlab-org/-/epics/3989) in GitLab 13.9.
394+
- [Enabled on GitLab Self-Managed and GitLab Dedicated](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/188548) in GitLab 18.0.
393395

394-
{{< /details >}}
396+
{{< /history >}}
395397

396398
{{< alert type="warning" >}}
397399

398-
This feature is experimental, and isn't enabled by default. Use caution when
399-
running in a production environment, and run during off-peak times.
400+
Use with caution when running in a production environment, and run during off-peak times.
400401

401402
{{< /alert >}}
402403

@@ -410,7 +411,6 @@ Prerequisites:
410411

411412
- This feature requires PostgreSQL 12 or later.
412413
- These index types are **not supported**: expression indexes and indexes used for constraint exclusion.
413-
- Not enabled by default. A feature flag must be set for this task to work: `Feature.enable("database_reindexing")`
414414

415415
### Run reindexing
416416

doc/api/graphql/getting_started.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ curl "https://gitlab.com/api/graphql" --header "Authorization: Bearer $GRAPHQL_T
6060
```
6161

6262
To nest strings in the query string,
63-
wrap the data in single quotes or escape the strings with <code>&#92;&#92;</code>:
63+
wrap the data in single quotes or escape the strings with ` \\ `:
6464

6565
```shell
6666
curl "https://gitlab.com/api/graphql" --header "Authorization: Bearer $GRAPHQL_TOKEN" \

doc/api/graphql/reference/_index.md

+2
Original file line numberDiff line numberDiff line change
@@ -26431,6 +26431,7 @@ Relationship between an epic and an issue.
2643126431
| <a id="epicissueseverity"></a>`severity` | [`IssuableSeverity`](#issuableseverity) | Severity level of the incident. |
2643226432
| <a id="epicissuesladueat"></a>`slaDueAt` | [`Time`](#time) | Timestamp of when the issue SLA expires. |
2643326433
| <a id="epicissuestate"></a>`state` | [`IssueState!`](#issuestate) | State of the issue. |
26434+
| <a id="epicissuestatus"></a>`status` {{< icon name="warning-solid" >}} | [`WorkItemStatus`](#workitemstatus) | **Introduced** in GitLab 18.0. **Status**: Experiment. Status of the issue. |
2643426435
| <a id="epicissuestatuspagepublishedincident"></a>`statusPagePublishedIncident` | [`Boolean`](#boolean) | Indicates whether an issue is published to the status page. |
2643526436
| <a id="epicissuesubscribed"></a>`subscribed` | [`Boolean!`](#boolean) | Indicates the currently logged in user is subscribed to the issue. |
2643626437
| <a id="epicissuetaskcompletionstatus"></a>`taskCompletionStatus` | [`TaskCompletionStatus!`](#taskcompletionstatus) | Task completion status of the issue. |
@@ -29829,6 +29830,7 @@ Describes an issuable resource link for incident issues.
2982929830
| <a id="issueseverity"></a>`severity` | [`IssuableSeverity`](#issuableseverity) | Severity level of the incident. |
2983029831
| <a id="issuesladueat"></a>`slaDueAt` | [`Time`](#time) | Timestamp of when the issue SLA expires. |
2983129832
| <a id="issuestate"></a>`state` | [`IssueState!`](#issuestate) | State of the issue. |
29833+
| <a id="issuestatus"></a>`status` {{< icon name="warning-solid" >}} | [`WorkItemStatus`](#workitemstatus) | **Introduced** in GitLab 18.0. **Status**: Experiment. Status of the issue. |
2983229834
| <a id="issuestatuspagepublishedincident"></a>`statusPagePublishedIncident` | [`Boolean`](#boolean) | Indicates whether an issue is published to the status page. |
2983329835
| <a id="issuesubscribed"></a>`subscribed` | [`Boolean!`](#boolean) | Indicates the currently logged in user is subscribed to the issue. |
2983429836
| <a id="issuetaskcompletionstatus"></a>`taskCompletionStatus` | [`TaskCompletionStatus!`](#taskcompletionstatus) | Task completion status of the issue. |

doc/ci/docker/using_docker_images.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ Use one of the following methods to determine the value for `DOCKER_AUTH_CONFIG`
314314

315315
{{< alert type="note" >}}
316316

317-
If your username includes special characters like `@`, you must escape them with a backslash (<code>&#92;</code>) to prevent authentication problems.
317+
If your username includes special characters like `@`, you must escape them with a backslash (` \ `) to prevent authentication problems.
318318

319319
{{< /alert >}}
320320

doc/ci/pipelines/downstream_pipelines.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ with the CI/CD configuration in that file.
233233
The artifact path is parsed by GitLab, not the runner, so the path must match the
234234
syntax for the OS running GitLab. If GitLab is running on Linux but using a Windows
235235
runner for testing, the path separator for the trigger job is `/`. Other CI/CD
236-
configuration for jobs that use the Windows runner, like scripts, use <code>&#92;</code>.
236+
configuration for jobs that use the Windows runner, like scripts, use ` \ `.
237237

238238
You cannot use CI/CD variables in an `include` section in a dynamic child pipeline's configuration.
239239
[Issue 378717](https://gitlab.com/gitlab-org/gitlab/-/issues/378717) proposes fixing

doc/ci/yaml/_index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4153,7 +4153,7 @@ job:
41534153
You can use CI/CD variables to define the description, but some shells
41544154
[use different syntax](../variables/_index.md#use-cicd-variables-in-job-scripts)
41554155
to reference variables. Similarly, some shells might require special characters
4156-
to be escaped. For example, backticks (`` ` ``) might need to be escaped with a backslash (<code>&#92;</code>).
4156+
to be escaped. For example, backticks (`` ` ``) might need to be escaped with a backslash (` \ `).
41574157

41584158
#### `release:ref`
41594159

0 commit comments

Comments
 (0)