Skip to content

Commit 6505e8e

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent c54e728 commit 6505e8e

File tree

52 files changed

+1267
-905
lines changed

Some content is hidden

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

52 files changed

+1267
-905
lines changed

app/assets/javascripts/behaviors/markdown/render_math.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class SafeMathRenderer {
9090

9191
const html = `
9292
<div class="alert gl-alert gl-alert-warning alert-dismissible lazy-render-math-container js-lazy-render-math-container fade show" role="alert">
93-
${spriteIcon('warning', 'text-warning-600 s16 gl-alert-icon')}
93+
${spriteIcon('warning', 'gl-text-orange-600 s16 gl-alert-icon')}
9494
<div class="display-flex gl-alert-content">
9595
<div>${message}</div>
9696
<div class="gl-alert-actions">

app/assets/javascripts/boards/components/issue_due_date.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export default {
102102
<gl-tooltip :target="() => $refs.issueDueDate" :placement="tooltipPlacement">
103103
<span class="bold">{{ __('Due date') }}</span>
104104
<br />
105-
<span :class="{ 'text-danger-muted': isPastDue }">{{ title }}</span>
105+
<span :class="{ 'gl-text-red-300': isPastDue }">{{ title }}</span>
106106
</gl-tooltip>
107107
</span>
108108
</template>

app/assets/javascripts/ci/reports/codequality_report/constants.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
export const SEVERITY_CLASSES = {
2-
info: 'text-primary-400',
3-
minor: 'text-warning-200',
4-
major: 'text-warning-400',
5-
critical: 'text-danger-600',
6-
blocker: 'text-danger-800',
7-
unknown: 'text-secondary-400',
2+
info: 'gl-text-blue-400',
3+
minor: 'gl-text-orange-200',
4+
major: 'gl-text-orange-400',
5+
critical: 'gl-text-red-600',
6+
blocker: 'gl-text-red-800',
7+
unknown: 'gl-text-gray-400',
88
};
99

1010
export const SEVERITY_ICONS = {

app/assets/javascripts/clusters/agents/constants.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const EVENT_DETAILS = {
2222
body: s__('ClusterAgents|Agent %{strongStart}connected%{strongEnd}'),
2323
titleIcon: {
2424
name: 'status-success',
25-
class: 'text-success-500',
25+
class: 'gl-text-green-500',
2626
},
2727
},
2828
agent_disconnected: {
@@ -31,7 +31,7 @@ export const EVENT_DETAILS = {
3131
body: s__('ClusterAgents|Agent %{strongStart}disconnected%{strongEnd}'),
3232
titleIcon: {
3333
name: 'severity-critical',
34-
class: 'text-danger-800',
34+
class: 'gl-text-red-800',
3535
},
3636
},
3737
};
@@ -50,12 +50,12 @@ export const REVOKE_TOKEN_MODAL_ID = 'revoke-token-%{tokenName}';
5050

5151
export const INTEGRATION_STATUS_VALID_TOKEN = {
5252
icon: 'status-success',
53-
iconClass: 'text-success-500',
53+
iconClass: 'gl-text-green-500',
5454
text: s__('ClusterAgents|Valid access token'),
5555
};
5656
export const INTEGRATION_STATUS_NO_TOKEN = {
5757
icon: 'status-alert',
58-
iconClass: 'text-danger-500',
58+
iconClass: 'gl-text-red-500',
5959
text: s__('ClusterAgents|No agent access token'),
6060
};
6161

app/assets/javascripts/clusters_list/constants.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,15 @@ export const AGENT_STATUSES = {
144144
active: {
145145
name: s__('ClusterAgents|Connected'),
146146
icon: 'status-success',
147-
class: 'text-success-500',
147+
class: 'gl-text-green-500',
148148
tooltip: {
149149
title: sprintf(s__('ClusterAgents|Last connected %{timeAgo}.')),
150150
},
151151
},
152152
inactive: {
153153
name: s__('ClusterAgents|Not connected'),
154154
icon: 'status-alert',
155-
class: 'text-danger-500',
155+
class: 'gl-text-red-500',
156156
tooltip: {
157157
title: s__('ClusterAgents|Agent might not be connected to GitLab'),
158158
body: sprintf(
@@ -165,7 +165,7 @@ export const AGENT_STATUSES = {
165165
unused: {
166166
name: s__('ClusterAgents|Never connected'),
167167
icon: 'status-neutral',
168-
class: 'text-secondary-500',
168+
class: 'gl-text-gray-500',
169169
tooltip: {
170170
title: s__('ClusterAgents|Agent never connected to GitLab'),
171171
body: s__('ClusterAgents|Make sure you are using a valid token.'),

app/assets/javascripts/design_management/components/list/item.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,17 @@ export default {
6464
const icons = {
6565
creation: {
6666
name: 'file-addition-solid',
67-
classes: 'text-success-500',
67+
classes: 'gl-text-green-500',
6868
tooltip: __('Added in this version'),
6969
},
7070
modification: {
7171
name: 'file-modified-solid',
72-
classes: 'text-primary-500',
72+
classes: 'gl-text-blue-500',
7373
tooltip: __('Modified in this version'),
7474
},
7575
deletion: {
7676
name: 'file-deletion-solid',
77-
classes: 'text-danger-500',
77+
classes: 'gl-text-red-500',
7878
tooltip: __('Archived in this version'),
7979
},
8080
};

app/assets/javascripts/issuable/components/issue_milestone.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default {
8282
<span
8383
v-if="milestoneStart || milestoneDue"
8484
:class="{
85-
'text-danger-muted': isMilestonePastDue,
85+
'gl-text-red-300': isMilestonePastDue,
8686
'text-tertiary': !isMilestonePastDue,
8787
}"
8888
><span>{{ milestoneDatesHuman }}</span
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export const SEVERITY_CLASS_NAME_MAP = {
2-
critical: 'text-danger-800',
3-
high: 'text-danger-600',
4-
medium: 'text-warning-400',
5-
low: 'text-warning-200',
6-
info: 'text-primary-400',
7-
unknown: 'text-secondary-400',
2+
critical: 'gl-text-red-800',
3+
high: 'gl-text-red-600',
4+
medium: 'gl-text-orange-400',
5+
low: 'gl-text-orange-200',
6+
info: 'gl-text-blue-400',
7+
unknown: 'gl-text-gray-400',
88
};

app/assets/stylesheets/utilities.scss

-9
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,6 @@
44
to see the available utility classes. If you cannot find the class you need,
55
consider adding it to Gitlab UI before adding it here.
66
**/
7-
8-
@each $variant, $range in $color-ranges {
9-
@each $suffix, $color in $range {
10-
#{'.text-#{$variant}-#{$suffix}'} {
11-
color: $color;
12-
}
13-
}
14-
}
15-
167
@each $index, $size in $type-scale {
178
#{'.text-#{$index}'} {
189
font-size: $size;

app/controllers/projects/issues_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def new
128128
discussion_to_resolve: params[:discussion_to_resolve],
129129
confidential: !!Gitlab::Utils.to_boolean(issue_params[:confidential])
130130
)
131-
service = ::Issues::BuildService.new(project: project, current_user: current_user, params: build_params)
131+
service = ::Issues::BuildService.new(container: project, current_user: current_user, params: build_params)
132132

133133
@issue = @noteable = service.execute
134134

app/models/concerns/noteable.rb

+6-5
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ def discussion_root_note_ids(notes_filter:)
106106

107107
relations << discussion_notes.select(
108108
"'notes' AS table_name",
109-
'discussion_id',
110109
'MIN(id) AS id',
111-
'MIN(created_at) AS created_at'
110+
'MIN(created_at) AS created_at',
111+
'ARRAY_AGG(id) AS ids'
112112
).with_notes_filter(notes_filter)
113113
.group(:discussion_id)
114114

@@ -223,15 +223,16 @@ def synthetic_note_ids_relations
223223
# currently multiple models include Noteable concern, but not all of them support
224224
# all resource events, so we check if given model supports given resource event.
225225
if respond_to?(:resource_label_events)
226-
relations << resource_label_events.select("'resource_label_events'", "'NULL'", :id, :created_at)
226+
relations << resource_label_events.select("'resource_label_events'", 'MIN(id)', :created_at, 'ARRAY_AGG(id)')
227+
.group(:created_at, :user_id)
227228
end
228229

229230
if respond_to?(:resource_state_events)
230-
relations << resource_state_events.select("'resource_state_events'", "'NULL'", :id, :created_at)
231+
relations << resource_state_events.select("'resource_state_events'", :id, :created_at, 'ARRAY_FILL(id, ARRAY[1])')
231232
end
232233

233234
if respond_to?(:resource_milestone_events)
234-
relations << resource_milestone_events.select("'resource_milestone_events'", "'NULL'", :id, :created_at)
235+
relations << resource_milestone_events.select("'resource_milestone_events'", :id, :created_at, 'ARRAY_FILL(id, ARRAY[1])')
235236
end
236237

237238
relations

app/services/issuable/discussions_list_service.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def execute
2525
paginated_discussions_by_type = paginator.records.group_by(&:table_name)
2626

2727
notes = if paginated_discussions_by_type['notes'].present?
28-
notes.with_discussion_ids(paginated_discussions_by_type['notes'].map(&:discussion_id))
28+
notes.id_in(paginated_discussions_by_type['notes'].flat_map(&:ids))
2929
else
3030
notes.none
3131
end

app/services/issues/build_service.rb

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ module Issues
44
class BuildService < Issues::BaseService
55
include ResolveDiscussions
66

7+
# TODO: this is to be removed once we get to rename the IssuableBaseService project param to container
8+
def initialize(container:, current_user: nil, params: {})
9+
super(project: container, current_user: current_user, params: params)
10+
end
11+
712
def execute
813
filter_resolve_discussion_params
914

app/services/issues/create_service.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def initialize(project:, spam_params:, current_user: nil, params: {}, build_serv
1717
@extra_params = params.delete(:extra_params) || {}
1818
super(project: project, current_user: current_user, params: params)
1919
@spam_params = spam_params
20-
@build_service = build_service || BuildService.new(project: project, current_user: current_user, params: params)
20+
@build_service = build_service || BuildService.new(container: project, current_user: current_user, params: params)
2121
end
2222

2323
def execute(skip_system_notes: false)

app/services/resource_events/base_synthetic_notes_builder_service.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def apply_pagination(events)
3232
return events if params[:paginated_notes].nil?
3333
return events.none if params[:paginated_notes][table_name].blank?
3434

35-
events.id_in(params[:paginated_notes][table_name].map(&:id))
35+
events.id_in(params[:paginated_notes][table_name].flat_map(&:ids))
3636
end
3737

3838
def apply_last_fetched_at(events)

app/services/tasks_to_be_done/base_service.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def execute
1919
update_service = Issues::UpdateService.new(project: project, current_user: current_user, params: { add_assignee_ids: params[:assignee_ids] })
2020
update_service.execute(issue)
2121
else
22-
build_service = Issues::BuildService.new(project: project, current_user: current_user, params: params)
22+
build_service = Issues::BuildService.new(container: project, current_user: current_user, params: params)
2323
create(build_service.execute)
2424
end
2525
end

app/services/work_items/create_service.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def initialize(project:, spam_params:, current_user: nil, params: {}, widget_par
1010
current_user: current_user,
1111
params: params,
1212
spam_params: spam_params,
13-
build_service: ::WorkItems::BuildService.new(project: project, current_user: current_user, params: params)
13+
build_service: ::WorkItems::BuildService.new(container: project, current_user: current_user, params: params)
1414
)
1515
@widget_params = widget_params
1616
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: elasticsearch_use_traversal_id_optimization
3+
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/108135
4+
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/391286
5+
milestone: '15.9'
6+
type: development
7+
group: group::global search
8+
default_enabled: false
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: validate_environment_tier_presence
22
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/111011
3-
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/385253
3+
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/391293
44
milestone: '15.9'
55
type: development
66
group: group::release
7-
default_enabled: false
7+
default_enabled: true

danger/stable_branch_patch/Dangerfile

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
# frozen_string_literal: true
22

3+
if stable_branch.non_security_stable_branch?
4+
markdown(<<~MARKDOWN)
5+
### QA `e2e:package-and-test`
6+
7+
**@#{helper.mr_author}, the `package-and-test` job must complete before merging this merge request.***
8+
9+
If there are failures on the `package-and-test` pipeline, ping your team's associated Software Engineer in Test (SET) to confirm
10+
the failures are unrelated to the merge request. If there's no SET assigned, ask for assistance on the `#quality` Slack channel.
11+
MARKDOWN
12+
end
13+
314
stable_branch.check!

db/post_migrate/20221108045019_truncate_timeline_event_tags_table.rb

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ class TruncateTimelineEventTagsTable < Gitlab::Database::Migration[2.0]
44
disable_ddl_transaction!
55

66
def up
7+
return unless Gitlab::Database.gitlab_schemas_for_connection(connection).include?(:gitlab_main)
8+
79
execute('TRUNCATE TABLE incident_management_timeline_event_tags, incident_management_timeline_event_tag_links')
810
end
911

0 commit comments

Comments
 (0)