Skip to content

Commit c823a6f

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 444db32 commit c823a6f

File tree

169 files changed

+490
-464
lines changed

Some content is hidden

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

169 files changed

+490
-464
lines changed

.gitlab/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,7 @@ lib/gitlab/checks/**
11531153
/app/views/groups/settings/_resource_access_token_creation.html.haml
11541154
/app/views/groups/settings/_two_factor_auth.html.haml
11551155
/app/views/groups/settings/access_tokens/
1156+
/app/views/layouts/devise*.haml
11561157
/app/views/layouts/oauth_error.html.haml
11571158
/app/views/notify/access_token_about_to_expire_email.html.haml
11581159
/app/views/notify/access_token_about_to_expire_email.text.erb
@@ -1236,7 +1237,6 @@ lib/gitlab/checks/**
12361237
/ee/app/views/admin/application_settings/_personal_access_token_expiration_policy.html.haml
12371238
/ee/app/views/credentials_inventory_mailer/personal_access_token_revoked_email.html.haml
12381239
/ee/app/views/credentials_inventory_mailer/personal_access_token_revoked_email.text.haml
1239-
/app/views/devise/**/
12401240
/ee/app/views/groups/_personal_access_token_expiration_policy.html.haml
12411241
/ee/app/views/groups/sso/_authorize_pane.html.haml
12421242
/ee/app/views/notify/policy_revoked_personal_access_tokens_email.html.haml

.vale.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ StylesPath = doc/.vale
66
MinAlertLevel = suggestion
77

88
[*.md]
9-
BasedOnStyles = gitlab
9+
BasedOnStyles = gitlab_base, gitlab_docs
1010

1111
# Ignore SVG markup
1212
TokenIgnores = (\*\*\{\w*\}\*\*)

GITALY_SERVER_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
09eeaffa3ae3118b03eb0e9e7000e5901ced015a
1+
da03e230032486c2fc2cbed95d78308eff2887c6

app/assets/javascripts/badges/components/badge_form.vue

+2-3
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export default {
208208
<form
209209
ref="form"
210210
:class="{ 'was-validated': wasValidated }"
211-
class="gl-mt-3 gl-mb-3 needs-validation"
211+
class="needs-validation"
212212
novalidate
213213
@submit.prevent.stop="onSubmit"
214214
>
@@ -264,14 +264,13 @@ export default {
264264
</p>
265265
</div>
266266

267-
<div v-if="!inModal" class="form-group" data-testid="action-buttons">
267+
<div v-if="!inModal" class="gl-flex gl-gap-3" data-testid="action-buttons">
268268
<gl-button
269269
:loading="isSaving"
270270
type="submit"
271271
variant="confirm"
272272
category="primary"
273273
data-testid="add-badge-button"
274-
class="gl-mr-3"
275274
>
276275
{{ saveText }}
277276
</gl-button>

app/assets/javascripts/badges/components/badge_list.vue

+8-4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export default {
3131
GlTooltip: GlTooltipDirective,
3232
},
3333
i18n: {
34+
edit: __('Edit'),
35+
delete: __('Delete'),
3436
emptyGroupMessage: s__('Badges|This group has no badges. Add an existing badge or create one.'),
3537
emptyProjectMessage: s__('Badges|This project has no badges. Start by adding a new badge.'),
3638
},
@@ -138,24 +140,26 @@ export default {
138140
data-testid="badge-actions"
139141
>
140142
<gl-button
143+
v-gl-tooltip
141144
v-gl-modal.edit-badge-modal
142145
:disabled="item.isDeleting"
143-
variant="default"
144146
category="tertiary"
145147
icon="pencil"
146148
size="medium"
147-
:aria-label="__('Edit')"
149+
:title="$options.i18n.edit"
150+
:aria-label="$options.i18n.edit"
148151
data-testid="edit-badge-button"
149152
@click="editBadge(item)"
150153
/>
151154
<gl-button
155+
v-gl-tooltip
152156
v-gl-modal.delete-badge-modal
153157
:disabled="item.isDeleting"
154158
category="tertiary"
155-
variant="danger"
156159
icon="remove"
157160
size="medium"
158-
:aria-label="__('Delete')"
161+
:title="$options.i18n.delete"
162+
:aria-label="$options.i18n.delete"
159163
data-testid="delete-badge"
160164
@click="updateBadgeInModal(item)"
161165
/>

app/assets/javascripts/badges/components/badge_settings.vue

+10-26
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script>
2-
import { GlButton, GlModal, GlSprintf } from '@gitlab/ui';
2+
import { GlModal, GlSprintf } from '@gitlab/ui';
33
// eslint-disable-next-line no-restricted-imports
44
import { mapState, mapActions } from 'vuex';
55
import { createAlert, VARIANT_INFO } from '~/alert';
@@ -12,13 +12,12 @@ import BadgeList from './badge_list.vue';
1212
export default {
1313
name: 'BadgeSettings',
1414
components: {
15+
CrudComponent,
1516
Badge,
1617
BadgeForm,
1718
BadgeList,
18-
GlButton,
1919
GlModal,
2020
GlSprintf,
21-
CrudComponent,
2221
},
2322
i18n: {
2423
title: s__('Badges|Your badges'),
@@ -28,11 +27,6 @@ export default {
2827
'Badges|If you delete this badge, you %{strongStart}cannot%{strongEnd} restore it.',
2928
),
3029
},
31-
data() {
32-
return {
33-
addFormVisible: false,
34-
};
35-
},
3630
computed: {
3731
...mapState(['badges', 'badgeInModal', 'isEditing']),
3832
saveProps() {
@@ -55,11 +49,8 @@ export default {
5549
},
5650
methods: {
5751
...mapActions(['deleteBadge']),
58-
showAddForm() {
59-
this.addFormVisible = !this.addFormVisible;
60-
},
6152
closeAddForm() {
62-
this.addFormVisible = false;
53+
this.$refs.badgesCrud.hideForm();
6354
},
6455
onSubmitEditModal() {
6556
this.$refs.editForm.onSubmit();
@@ -85,25 +76,19 @@ export default {
8576

8677
<template>
8778
<crud-component
79+
ref="badgesCrud"
8880
:title="$options.i18n.title"
8981
icon="labels"
9082
:count="badges.length"
91-
class="badge-settings"
83+
:toggle-text="$options.i18n.addFormTitle"
84+
data-testid="badge-settings"
9285
>
93-
<template #actions>
94-
<gl-button
95-
v-if="!addFormVisible"
96-
size="small"
97-
data-testid="show-badge-add-form"
98-
@click="showAddForm"
99-
>{{ $options.i18n.addButton }}</gl-button
100-
>
101-
</template>
102-
103-
<div v-if="addFormVisible" class="gl-new-card-add-form gl-m-5">
86+
<template #form>
10487
<h4 class="gl-mt-0">{{ $options.i18n.addFormTitle }}</h4>
10588
<badge-form :is-editing="false" @close-add-form="closeAddForm" />
106-
</div>
89+
</template>
90+
91+
<badge-list />
10792

10893
<gl-modal
10994
modal-id="edit-badge-modal"
@@ -136,6 +121,5 @@ export default {
136121
</gl-sprintf>
137122
</p>
138123
</gl-modal>
139-
<badge-list />
140124
</crud-component>
141125
</template>

app/assets/javascripts/vue_shared/components/crud_component.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export default {
8888
</div>
8989
<div class="gl-flex gl-items-baseline gl-gap-3" data-testid="crud-actions">
9090
<gl-button
91-
v-if="toggleText"
91+
v-if="toggleText && !isFormVisible"
9292
size="small"
9393
data-testid="crud-form-toggle"
9494
@click="toggleForm"

app/services/audit_event_service.rb

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
class AuditEventService
44
include AuditEventSaveType
5+
include ::Gitlab::Audit::Logging
56

67
# Instantiates a new service
78
#
@@ -123,6 +124,7 @@ def log_security_event_to_database
123124

124125
event = build_event
125126
save_or_track event
127+
log_to_new_tables([event], event.class.to_s) if should_save_database?(@save_type)
126128
event
127129
end
128130

app/views/user_settings/ssh_keys/_key.html.haml

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
= _('Never')
4141

4242
%td{ data: { label: _('Actions'), testid: 'actions' } }
43-
%div{ class: 'gl-display-flex! gl-pl-0!' }
43+
.gl-flex.gl-items-center.gl-justify-end.gl-gap-3.-gl-m-3
4444
- if key.can_delete?
4545
- if key.signing? && !is_admin
46-
= render Pajamas::ButtonComponent.new(size: :small, button_options: { class: 'js-confirm-modal-button', 'aria-label' => _('Revoke'), data: ssh_key_revoke_modal_data(key, revoke_user_settings_ssh_key_path(key)) }) do
46+
= render Pajamas::ButtonComponent.new(size: :small, category: :secondary, variant: :danger, button_options: { class: 'js-confirm-modal-button', 'aria-label' => _('Revoke'), data: ssh_key_revoke_modal_data(key, revoke_user_settings_ssh_key_path(key)) }) do
4747
= _('Revoke')
48-
.gl-pl-3
49-
= render Pajamas::ButtonComponent.new(size: :small, icon: 'remove', button_options: { title: _('Remove'), 'aria-label' => _('Remove'), class: 'js-confirm-modal-button', data: ssh_key_delete_modal_data(key, path_to_key(key, is_admin)) })
48+
49+
= render Pajamas::ButtonComponent.new(icon: 'remove', category: :tertiary, button_options: { title: _('Remove'), 'aria-label' => _('Remove'), class: 'js-confirm-modal-button', data: ssh_key_delete_modal_data(key, path_to_key(key, is_admin)) })

app/views/user_settings/ssh_keys/_key_table.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
%th= s_('Profiles|Created')
1212
%th= s_('Profiles|Last used')
1313
%th= s_('Profiles|Expires')
14-
%th= _('Actions')
14+
%th.gl-text-right= _('Actions')
1515
= render partial: 'user_settings/ssh_keys/key', collection: @keys, locals: { is_admin: is_admin }
1616
- else
1717
- if is_admin
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,28 @@
11
- page_title _('SSH Keys')
22
- add_page_specific_style 'page_bundles/profile'
33
- @force_desktop_expanded_sidebar = true
4-
- add_form_class = 'gl-hidden' if !form_errors(@key)
54
- hide_class = 'gl-hidden' if form_errors(@key)
65

7-
.settings-section.js-search-settings-section
8-
.settings-sticky-header
9-
.settings-sticky-header-inner
10-
%h4.gl-my-0
11-
= page_title
12-
%p.gl-text-secondary
6+
= render ::Layouts::SettingsSectionComponent.new(page_title) do |c|
7+
- c.with_description do
138
= _('SSH keys allow you to establish a secure connection between your computer and GitLab.')
149
- config_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_instance_configuration_url }
1510
= html_escape(s_('SSH fingerprints verify that the client is connecting to the correct host. Check the %{config_link_start}current instance configuration%{config_link_end}.')) % { config_link_start: config_link_start, config_link_end: '</a>'.html_safe }
1611

17-
= render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card js-toggle-container' }, header_options: { class: 'gl-new-card-header' }, body_options: { class: 'gl-new-card-body gl-px-0' }) do |c|
18-
- c.with_header do
19-
.gl-new-card-title-wrapper
20-
%h3.gl-new-card-title
21-
= _('Your SSH keys')
22-
.gl-new-card-count
23-
= sprite_icon('key', css_class: 'gl-mr-2')
24-
= @keys.count
25-
.gl-new-card-actions
26-
= render Pajamas::ButtonComponent.new(size: :small, button_options: { class: "js-toggle-button js-toggle-content #{hide_class}" }) do
27-
= _('Add new key')
28-
- c.with_body do
29-
.gl-new-card-add-form.gl-m-3.js-toggle-content{ class: add_form_class }
12+
- c.with_body do
13+
= render ::Layouts::CrudComponent.new(_('Your SSH keys'),
14+
icon: 'key',
15+
count: @keys.count,
16+
toggle_text: _('Add new key'),
17+
toggle_options: { class: hide_class },
18+
form_options: { form_errors: form_errors(@key) }) do |c|
19+
- c.with_form do
3020
%h4.gl-mt-0
3121
= _('Add an SSH key')
3222
%p
3323
- help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/ssh') }
3424
= _('Add an SSH key for secure access to GitLab. %{help_link_start}Learn more%{help_link_end}.').html_safe % {help_link_start: help_link_start, help_link_end: '</a>'.html_safe }
3525
= render 'form'
3626

37-
= render 'key_table', hide_class: hide_class
27+
- c.with_body do
28+
= render 'key_table'

config/feature_flags/development/json_wrapper_legacy_mode.yml

-8
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# frozen_string_literal: true
2+
3+
class DropCodeSuggestionDailyUsagesTable < ClickHouse::Migration
4+
def up
5+
execute <<~SQL
6+
DROP VIEW IF EXISTS code_suggestion_daily_usages_mv
7+
SQL
8+
9+
execute <<~SQL
10+
DROP TABLE IF EXISTS code_suggestion_daily_usages
11+
SQL
12+
end
13+
14+
def down
15+
execute <<~SQL
16+
CREATE TABLE IF NOT EXISTS code_suggestion_daily_usages
17+
(
18+
user_id UInt64 DEFAULT 0,
19+
timestamp Date32 DEFAULT toDate(now64()),
20+
) ENGINE = ReplacingMergeTree
21+
PARTITION BY toYear(timestamp)
22+
ORDER BY (user_id, timestamp)
23+
SETTINGS index_granularity = 64
24+
SQL
25+
26+
execute <<~SQL
27+
CREATE MATERIALIZED VIEW code_suggestion_daily_usages_mv
28+
TO code_suggestion_daily_usages
29+
AS
30+
SELECT
31+
user_id,
32+
timestamp
33+
FROM code_suggestion_usages
34+
WHERE event IN (1, 2, 5)
35+
GROUP BY user_id, timestamp
36+
SQL
37+
end
38+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# frozen_string_literal: true
2+
3+
class AddProjectIdToMergeRequestDiffCommitsB5377a7a34 < Gitlab::Database::Migration[2.2]
4+
milestone '17.3'
5+
6+
def up
7+
add_column :merge_request_diff_commits_b5377a7a34, :project_id, :bigint
8+
end
9+
10+
def down
11+
remove_column :merge_request_diff_commits_b5377a7a34, :project_id
12+
end
13+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# frozen_string_literal: true
2+
3+
class PrepareIndexMergeRequestDiffCommitsB5377a7a34OnProjectId < Gitlab::Database::Migration[2.2]
4+
milestone '17.3'
5+
disable_ddl_transaction!
6+
7+
INDEX_NAME = 'index_merge_request_diff_commits_b5377a7a34_on_project_id'
8+
9+
def up
10+
prepare_async_index :merge_request_diff_commits_b5377a7a34, :project_id, name: INDEX_NAME
11+
end
12+
13+
def down
14+
unprepare_async_index :merge_request_diff_commits_b5377a7a34, INDEX_NAME
15+
end
16+
end

db/schema_migrations/20240802194745

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
13f2a6dc299a6c88a90f68c430fa268a11a0605f7fb9cc8fa26c05fec747b309

db/schema_migrations/20240802194749

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
32446f048c0fdbc4fa4d8fc2443fcf4835df2133a9ad813b29b8f5cb883b780c

db/structure.sql

+2-1
Original file line numberDiff line numberDiff line change
@@ -2531,7 +2531,8 @@ CREATE TABLE merge_request_diff_commits_b5377a7a34 (
25312531
commit_author_id bigint,
25322532
committer_id bigint,
25332533
merge_request_diff_id bigint NOT NULL,
2534-
relative_order integer NOT NULL
2534+
relative_order integer NOT NULL,
2535+
project_id bigint
25352536
)
25362537
PARTITION BY RANGE (merge_request_diff_id);
25372538

File renamed without changes.
File renamed without changes.
File renamed without changes.

doc/.vale/gitlab/Spelling.yml renamed to doc/.vale/gitlab_base/Spelling.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ extends: spelling
1313
message: "Check the spelling of '%s'. If the spelling is correct, ask a Technical Writer to add this word to the spelling exception list."
1414
level: warning
1515
ignore:
16-
- gitlab/spelling-exceptions.txt
16+
- gitlab_base/spelling-exceptions.txt
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

doc/administration/auth/ldap/ldap_synchronization.md

+2-2

0 commit comments

Comments
 (0)