Skip to content

Commit cb6408f

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent cbd6e78 commit cb6408f

File tree

98 files changed

+577
-361
lines changed

Some content is hidden

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

98 files changed

+577
-361
lines changed

app/assets/javascripts/pages/projects/forks/new/components/fork_form.vue

+4-3
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,11 @@ export default {
283283
redirectTo(data.web_url); // eslint-disable-line import/no-deprecated
284284
} catch (error) {
285285
this.isSaving = false;
286+
const message =
287+
error?.response?.data?.message?.join('. ') ||
288+
s__('ForkProject|An error occurred while forking the project. Please try again.');
286289
createAlert({
287-
message: s__(
288-
'ForkProject|An error occurred while forking the project. Please try again.',
289-
),
290+
message,
290291
});
291292
}
292293
},

app/models/project.rb

+7-1
Original file line numberDiff line numberDiff line change
@@ -2318,7 +2318,13 @@ def pipeline_status
23182318
def add_export_job(current_user:, after_export_strategy: nil, params: {})
23192319
check_project_export_limit!
23202320

2321-
job_id = ProjectExportWorker.perform_async(current_user.id, self.id, after_export_strategy, params)
2321+
job_id = if Feature.enabled?(:parallel_project_export, current_user)
2322+
Projects::ImportExport::CreateRelationExportsWorker
2323+
.perform_async(current_user.id, self.id, after_export_strategy, params)
2324+
else
2325+
ProjectExportWorker
2326+
.perform_async(current_user.id, self.id, after_export_strategy, params)
2327+
end
23222328

23232329
if job_id
23242330
Gitlab::AppLogger.info "Export job started for project ID #{self.id} with job ID #{job_id}"

app/workers/projects/import_export/create_relation_exports_worker.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ def perform(user_id, project_id, after_export_strategy = {}, params = {})
3333
RelationExportWorker.with_status.perform_async(relation_export.id, user_id, params)
3434
end
3535

36+
project_export_job.start!
37+
3638
WaitRelationExportsWorker.perform_in(
3739
INITIAL_DELAY,
3840
project_export_job.id,
3941
user_id,
4042
after_export_strategy
4143
)
42-
43-
project_export_job.start!
4444
end
4545
# rubocop: enable CodeReuse/ActiveRecord
4646
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: parallel_project_export
3+
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/145165
4+
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/442337
5+
milestone: '16.10'
6+
type: development
7+
group: group::import and integrate
8+
default_enabled: false

config/metrics/counts_7d/20210216184524_p_ci_templates_aws_cf_deploy_ec2_weekly.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Count of projects using `AWS/CF-Provision-and-Deploy-EC2.gitlab-ci.
55
template in last 7 days.
66
product_section: ops
77
product_stage: release
8-
product_group: delivery
8+
product_group: environments
99
value_type: number
1010
status: removed
1111
milestone_removed: '14.6'

config/metrics/counts_7d/20210216184528_p_ci_templates_aws_deploy_ecs_weekly.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Count of projects using `AWS/Deploy-ECS.gitlab-ci.yml` template in
55
7 days.
66
product_section: ops
77
product_stage: release
8-
product_group: delivery
8+
product_group: environments
99
value_type: number
1010
status: active
1111
time_frame: 7d

config/metrics/counts_7d/20211015154445_p_ci_templates_kaniko_weekly.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ key_path: redis_hll_counters.ci_templates.p_ci_templates_kaniko_weekly
33
description: ''
44
product_section: ops
55
product_stage: release
6-
product_group: delivery
6+
product_group: environments
77
value_type: number
88
status: active
99
milestone: '14.5'

config/metrics/counts_7d/20220202160120_ci_users_executing_deployment_job_weekly.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ key_path: redis_hll_counters.ci_users.ci_users_executing_deployment_job_weekly
33
description: Weekly counts of times users have executed deployment jobs
44
product_section: ops
55
product_stage: release
6-
product_group: delivery
6+
product_group: environments
77
value_type: number
88
status: active
99
milestone: "14.8"

config/metrics/counts_7d/20220706175117_ci_users_executing_verify_job_weekly.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ key_path: redis_hll_counters.ci_users.ci_users_executing_verify_environment_job_
33
description: Weekly counts of times users have executed verify jobs
44
product_section: ops
55
product_stage: release
6-
product_group: delivery
6+
product_group: environments
77
value_type: number
88
status: active
99
milestone: "15.2"

db/docs/deleted_tables/user_interacted_projects.yml renamed to db/docs/user_interacted_projects.yml

-2
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,3 @@ allow_cross_foreign_keys:
1616
- gitlab_main_clusterwide
1717
sharding_key:
1818
project_id: projects
19-
removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/139630
20-
removed_in_milestone: '16.10'

db/post_migrate/20240212200632_remove_foreign_keys_user_interacted_projects.rb

+2-19
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,11 @@
33
class RemoveForeignKeysUserInteractedProjects < Gitlab::Database::Migration[2.2]
44
milestone '16.10'
55

6-
disable_ddl_transaction!
7-
8-
FOREIGN_KEY_NAME_USERS = "fk_0894651f08"
9-
FOREIGN_KEY_NAME_PROJECTS = "fk_722ceba4f7"
10-
116
def up
12-
with_lock_retries do
13-
remove_foreign_key_if_exists(:user_interacted_projects, :users,
14-
name: FOREIGN_KEY_NAME_USERS, reverse_lock_order: true)
15-
16-
remove_foreign_key_if_exists(:user_interacted_projects, :projects,
17-
name: FOREIGN_KEY_NAME_PROJECTS, reverse_lock_order: true)
18-
end
7+
# No-op https://gitlab.com/gitlab-com/gl-infra/production/-/issues/17622
198
end
209

2110
def down
22-
add_concurrent_foreign_key(:user_interacted_projects, :users,
23-
name: FOREIGN_KEY_NAME_USERS, column: :user_id,
24-
target_column: :id, on_delete: :cascade)
25-
26-
add_concurrent_foreign_key(:user_interacted_projects, :projects,
27-
name: FOREIGN_KEY_NAME_PROJECTS, column: :project_id,
28-
target_column: :id, on_delete: :cascade)
11+
# No-op https://gitlab.com/gitlab-com/gl-infra/production/-/issues/17622
2912
end
3013
end

db/post_migrate/20240212200947_drop_user_interacted_projects_table.rb

+2-16
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,11 @@
33
class DropUserInteractedProjectsTable < Gitlab::Database::Migration[2.2]
44
milestone '16.10'
55

6-
disable_ddl_transaction!
7-
8-
TABLE_NAME = 'user_interacted_projects'
9-
INDEX_NAME = 'index_user_interacted_projects_on_user_id'
10-
PRIMARY_KEY_CONSTRAINT = 'user_interacted_projects_pkey'
11-
126
def up
13-
drop_table :user_interacted_projects
7+
# No-op https://gitlab.com/gitlab-com/gl-infra/production/-/issues/17622
148
end
159

1610
def down
17-
unless table_exists?(:user_interacted_projects)
18-
create_table :user_interacted_projects, id: false do |t|
19-
t.integer :user_id, null: false
20-
t.integer :project_id, null: false
21-
t.index :user_id, name: INDEX_NAME
22-
end
23-
end
24-
25-
execute "ALTER TABLE #{TABLE_NAME} ADD CONSTRAINT #{PRIMARY_KEY_CONSTRAINT} PRIMARY KEY (project_id, user_id)"
11+
# No-op https://gitlab.com/gitlab-com/gl-infra/production/-/issues/17622
2612
end
2713
end

db/structure.sql

+16
Original file line numberDiff line numberDiff line change
@@ -16626,6 +16626,11 @@ CREATE TABLE user_highest_roles (
1662616626
highest_access_level integer
1662716627
);
1662816628

16629+
CREATE TABLE user_interacted_projects (
16630+
user_id integer NOT NULL,
16631+
project_id integer NOT NULL
16632+
);
16633+
1662916634
CREATE TABLE user_namespace_callouts (
1663016635
id bigint NOT NULL,
1663116636
user_id bigint NOT NULL,
@@ -22001,6 +22006,9 @@ ALTER TABLE ONLY user_group_callouts
2200122006
ALTER TABLE ONLY user_highest_roles
2200222007
ADD CONSTRAINT user_highest_roles_pkey PRIMARY KEY (user_id);
2200322008

22009+
ALTER TABLE ONLY user_interacted_projects
22010+
ADD CONSTRAINT user_interacted_projects_pkey PRIMARY KEY (project_id, user_id);
22011+
2200422012
ALTER TABLE ONLY user_namespace_callouts
2200522013
ADD CONSTRAINT user_namespace_callouts_pkey PRIMARY KEY (id);
2200622014

@@ -26980,6 +26988,8 @@ CREATE INDEX index_user_group_callouts_on_group_id ON user_group_callouts USING
2698026988

2698126989
CREATE INDEX index_user_highest_roles_on_user_id_and_highest_access_level ON user_highest_roles USING btree (user_id, highest_access_level);
2698226990

26991+
CREATE INDEX index_user_interacted_projects_on_user_id ON user_interacted_projects USING btree (user_id);
26992+
2698326993
CREATE INDEX index_user_namespace_callouts_on_namespace_id ON user_namespace_callouts USING btree (namespace_id);
2698426994

2698526995
CREATE INDEX index_user_permission_export_uploads_on_user_id_and_status ON user_permission_export_uploads USING btree (user_id, status);
@@ -29228,6 +29238,9 @@ ALTER TABLE ONLY sbom_occurrences_vulnerabilities
2922829238
ALTER TABLE ONLY abuse_report_user_mentions
2922929239
ADD CONSTRAINT fk_088018ecd8 FOREIGN KEY (abuse_report_id) REFERENCES abuse_reports(id) ON DELETE CASCADE;
2923029240

29241+
ALTER TABLE ONLY user_interacted_projects
29242+
ADD CONSTRAINT fk_0894651f08 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
29243+
2923129244
ALTER TABLE ONLY merge_request_assignment_events
2923229245
ADD CONSTRAINT fk_08f7602bfd FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
2923329246

@@ -29663,6 +29676,9 @@ ALTER TABLE ONLY protected_branch_push_access_levels
2966329676
ALTER TABLE ONLY integrations
2966429677
ADD CONSTRAINT fk_71cce407f9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
2966529678

29679+
ALTER TABLE ONLY user_interacted_projects
29680+
ADD CONSTRAINT fk_722ceba4f7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
29681+
2966629682
ALTER TABLE ONLY subscription_user_add_on_assignments
2966729683
ADD CONSTRAINT fk_724c2df9a8 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
2966829684

doc/administration/auth/ldap/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,7 @@ For more information on synchronizing users and groups between LDAP and GitLab,
12721272
- `omniauth_auto_link_user` to `saml` only.
12731273
- `omniauth_auto_link_ldap_user` to false.
12741274
- `ldap_enabled` to `false`.
1275-
You can also comment out the LDAP provider settings.
1275+
You can also comment out the LDAP provider settings.
12761276

12771277
## Troubleshooting
12781278

doc/administration/auth/oidc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ but `LocalAccounts` authenticates against local Active Directory accounts. Befor
328328
```
329329

330330
1. For OIDC discovery to work with B2C, configure the policy with an issuer compatible with the
331-
[OIDC specification](https://openid.net/specs/openid-connect-discovery-1_0.html#rfc.section.4.3).
331+
[OIDC specification](https://openid.net/specs/openid-connect-discovery-1_0.html#rfc.section.4.3).
332332
See the [token compatibility settings](https://learn.microsoft.com/en-us/azure/active-directory-b2c/configure-tokens?pivots=b2c-custom-policy#token-compatibility-settings).
333333
In `TrustFrameworkBase.xml` under `JwtIssuer`, set `IssuanceClaimPattern` to `AuthorityWithTfp`:
334334

doc/administration/docs_self_host.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ To host the product documentation site with GitLab Pages:
9696
image: registry.gitlab.com/gitlab-org/gitlab-docs/archives:16.0
9797
pages:
9898
script:
99-
- mkdir public
100-
- cp -a /usr/share/nginx/html/* public/
99+
- mkdir public
100+
- cp -a /usr/share/nginx/html/* public/
101101
artifacts:
102102
paths:
103103
- public
@@ -136,7 +136,7 @@ In this example:
136136

137137
- `16.0/` is the directory where the documentation is hosted.
138138
- `index.html` is a simple HTML file that redirects to the directory containing the documentation. In this
139-
case, `16.0/`.
139+
case, `16.0/`.
140140

141141
To extract the HTML files of the documentation site:
142142

doc/administration/geo/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ NOTE:
128128

129129
- All sites must run [the same PostgreSQL versions](setup/database.md#postgresql-replication).
130130
- Where possible, you should also use the same operating system version on all
131-
Geo sites. If using different operating system versions between Geo sites, you
132-
**must** [check OS locale data compatibility](replication/troubleshooting.md#check-os-locale-data-compatibility)
131+
Geo sites. If using different operating system versions between Geo sites, you
132+
**must** [check OS locale data compatibility](replication/troubleshooting.md#check-os-locale-data-compatibility)
133133
across Geo sites to avoid silent corruption of database indexes.
134134
- Git 2.9 or later
135135
- Git-lfs 2.4.2 or later on the user side when using LFS

doc/administration/geo/replication/configuration.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -223,17 +223,17 @@ In the following steps, replace `<ssh_host_key_path>` with the one you're using:
223223
1. On the left sidebar, at the bottom, select **Admin Area**.
224224
1. On the left sidebar, select **Geo > Sites**.
225225
1. Select **Add site**.
226-
![Add secondary site](img/adding_a_secondary_v15_8.png)
226+
![Add secondary site](img/adding_a_secondary_v15_8.png)
227227
1. In **Name**, enter the value for `gitlab_rails['geo_node_name']` in
228-
`/etc/gitlab/gitlab.rb`. These values must always match **exactly**, character
229-
for character.
228+
`/etc/gitlab/gitlab.rb`. These values must always match **exactly**, character
229+
for character.
230230
1. In **External URL**, enter the value for `external_url` in `/etc/gitlab/gitlab.rb`. These
231-
values must always match, but it doesn't matter if one ends with a `/` and
232-
the other doesn't.
231+
values must always match, but it doesn't matter if one ends with a `/` and
232+
the other doesn't.
233233
1. Optional. In **Internal URL (optional)**, enter an internal URL for the primary site.
234234
1. Optional. Select which groups or storage shards should be replicated by the
235-
**secondary** site. Leave blank to replicate all. For more information, see
236-
[selective synchronization](#selective-synchronization).
235+
**secondary** site. Leave blank to replicate all. For more information, see
236+
[selective synchronization](#selective-synchronization).
237237
1. Select **Save changes** to add the **secondary** site.
238238
1. SSH into **each Rails, and Sidekiq node on your secondary** site and restart the services:
239239

doc/administration/geo/setup/database.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ On all GitLab Geo **secondary** sites:
605605
password for the replication user account to two locations:
606606

607607
- `gitlab-geo.conf`: Used by the PostgreSQL replication process, written to the PostgreSQL data
608-
directory, by default at `/var/opt/gitlab/postgresql/data/gitlab-geo.conf`.
608+
directory, by default at `/var/opt/gitlab/postgresql/data/gitlab-geo.conf`.
609609
- `.pgpass`: Used by the `gitlab-psql` user, located by default at `/var/opt/gitlab/postgresql/.pgpass`.
610610

611611
Update the plaintext password in both of these files, and restart PostgreSQL:

doc/administration/geo/setup/two_single_node_external_services.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ secondary site is a read-only copy.
317317
![Add secondary site](../replication/img/adding_a_secondary_v15_8.png)
318318

319319
1. In **Name**, enter the value for `gitlab_rails['geo_node_name']` in
320-
`/etc/gitlab/gitlab.rb`. The values must match exactly.
320+
`/etc/gitlab/gitlab.rb`. The values must match exactly.
321321
1. In **External URL**, enter the value for `external_url` in `/etc/gitlab/gitlab.rb`.
322322
It's okay if one values ends in `/` and the other doesn't. Otherwise, the values must
323323
match exactly.

doc/administration/geo/setup/two_single_node_sites.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Prerequisites:
164164
you should use the secondary site private address for `postgresql['md5_auth_cidr_addresses']`.
165165

166166
1. Add the following lines to `/etc/gitlab/gitlab.rb`. Be sure to replace the IP
167-
addresses with addresses appropriate to your network configuration:
167+
addresses with addresses appropriate to your network configuration:
168168

169169
```ruby
170170
##
@@ -563,7 +563,7 @@ You must manually replicate the secret file across all of your secondary sites,
563563
![Add secondary site](../replication/img/adding_a_secondary_v15_8.png)
564564

565565
1. In **Name**, enter the value for `gitlab_rails['geo_node_name']` in
566-
`/etc/gitlab/gitlab.rb`. The values must match exactly.
566+
`/etc/gitlab/gitlab.rb`. The values must match exactly.
567567
1. In **External URL**, enter the value for `external_url` in `/etc/gitlab/gitlab.rb`.
568568
It's okay if one values ends in `/` and the other doesn't. Otherwise, the values must
569569
match exactly.

doc/administration/gitaly/configure_gitaly.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -619,14 +619,14 @@ to `gitaly['configuration'][:cgroups]` in `/etc/gitlab/gitlab.rb`:
619619

620620
- `mountpoint` is where the parent cgroup directory is mounted. Defaults to `/sys/fs/cgroup`.
621621
- `hierarchy_root` is the parent cgroup under which Gitaly creates groups, and
622-
is expected to be owned by the user and group Gitaly runs as. A Linux package installation
623-
creates the set of directories `mountpoint/<cpu|memory>/hierarchy_root`
624-
when Gitaly starts.
622+
is expected to be owned by the user and group Gitaly runs as. A Linux package installation
623+
creates the set of directories `mountpoint/<cpu|memory>/hierarchy_root`
624+
when Gitaly starts.
625625
- `memory_bytes` is the total memory limit that is imposed collectively on all
626-
Git processes that Gitaly spawns. 0 implies no limit.
626+
Git processes that Gitaly spawns. 0 implies no limit.
627627
- `cpu_shares` is the CPU limit that is imposed collectively on all Git
628-
processes that Gitaly spawns. 0 implies no limit. The maximum is 1024 shares,
629-
which represents 100% of CPU.
628+
processes that Gitaly spawns. 0 implies no limit. The maximum is 1024 shares,
629+
which represents 100% of CPU.
630630
- `cpu_quota_us` is the [`cfs_quota_us`](https://docs.kernel.org/scheduler/sched-bwc.html#management)
631631
to throttle the cgroups' processes if they exceed this quota value. We set
632632
`cfs_period_us` to `100ms` so 1 core is `100000`. 0 implies no limit.
@@ -673,14 +673,14 @@ To configure repository cgroups in Gitaly using the legacy method, use the follo
673673
in `/etc/gitlab/gitlab.rb`:
674674

675675
- `cgroups_count` is the number of cgroups created. Each time a new
676-
command is spawned, Gitaly assigns it to one of these cgroups based
677-
on the command line arguments of the command. A circular hashing algorithm assigns
678-
commands to these cgroups.
676+
command is spawned, Gitaly assigns it to one of these cgroups based
677+
on the command line arguments of the command. A circular hashing algorithm assigns
678+
commands to these cgroups.
679679
- `cgroups_mountpoint` is where the parent cgroup directory is mounted. Defaults to `/sys/fs/cgroup`.
680680
- `cgroups_hierarchy_root` is the parent cgroup under which Gitaly creates groups, and
681-
is expected to be owned by the user and group Gitaly runs as. A Linux package installation
682-
creates the set of directories `mountpoint/<cpu|memory>/hierarchy_root`
683-
when Gitaly starts.
681+
is expected to be owned by the user and group Gitaly runs as. A Linux package installation
682+
creates the set of directories `mountpoint/<cpu|memory>/hierarchy_root`
683+
when Gitaly starts.
684684
- `cgroups_memory_enabled` enables or disables the memory limit on cgroups.
685685
- `cgroups_memory_bytes` is the total memory limit each cgroup imposes on the processes added to it.
686686
- `cgroups_cpu_enabled` enables or disables the CPU limit on cgroups.

doc/administration/gitaly/monitoring.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ In Prometheus, look for the following metrics:
136136
You can observe the status of [control groups (cgroups)](configure_gitaly.md#control-groups) using Prometheus:
137137

138138
- `gitaly_cgroups_reclaim_attempts_total`, a gauge for the total number of times
139-
there has been a memory reclaim attempt. This number resets each time a server is
140-
restarted.
139+
there has been a memory reclaim attempt. This number resets each time a server is
140+
restarted.
141141
- `gitaly_cgroups_cpu_usage`, a gauge that measures CPU usage per cgroup.
142142
- `gitaly_cgroup_procs_total`, a gauge that measures the total number of
143-
processes Gitaly has spawned under the control of cgroups.
143+
processes Gitaly has spawned under the control of cgroups.
144144
- `gitaly_cgroup_cpu_cfs_periods_total`, a counter that for the value of [`nr_periods`](https://docs.kernel.org/scheduler/sched-bwc.html#statistics).
145145
- `gitaly_cgroup_cpu_cfs_throttled_periods_total`, a counter for the value of [`nr_throttled`](https://docs.kernel.org/scheduler/sched-bwc.html#statistics).
146146
- `gitaly_cgroup_cpu_cfs_throttled_seconds_total`, a counter for the value of [`throttled_time`](https://docs.kernel.org/scheduler/sched-bwc.html#statistics) in seconds.

0 commit comments

Comments
 (0)