Skip to content

Commit 2761b44

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 43e40e8 commit 2761b44

File tree

89 files changed

+707
-296
lines changed

Some content is hidden

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

89 files changed

+707
-296
lines changed

.rubocop_todo/performance/method_object_as_block.yml

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Performance/MethodObjectAsBlock:
2929
- 'ee/app/services/security/findings/cleanup_service.rb'
3030
- 'ee/app/services/security/ingestion/ingest_reports_service.rb'
3131
- 'ee/app/services/security/ingestion/tasks/ingest_vulnerability_statistics.rb'
32-
- 'ee/app/services/security/store_findings_metadata_service.rb'
3332
- 'ee/app/services/security/store_grouped_scans_service.rb'
3433
- 'ee/lib/ee/container_registry/client.rb'
3534
- 'ee/lib/ee/gitlab/ci/config_ee.rb'

.rubocop_todo/rspec/expect_change.yml

-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ RSpec/ExpectChange:
293293
- 'ee/spec/services/security/orchestration/assign_service_spec.rb'
294294
- 'ee/spec/services/security/override_uuids_service_spec.rb'
295295
- 'ee/spec/services/security/security_orchestration_policies/sync_opened_merge_requests_service_spec.rb'
296-
- 'ee/spec/services/security/store_findings_metadata_service_spec.rb'
297296
- 'ee/spec/services/security/store_scan_service_spec.rb'
298297
- 'ee/spec/services/start_pull_mirroring_service_spec.rb'
299298
- 'ee/spec/services/status_page/mark_for_publication_service_spec.rb'

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ gem 'seed-fu', '~> 2.3.7'
166166
gem 'elasticsearch-model', '~> 7.2'
167167
gem 'elasticsearch-rails', '~> 7.2', require: 'elasticsearch/rails/instrumentation'
168168
gem 'elasticsearch-api', '7.13.3'
169-
gem 'aws-sdk-core', '~> 3.166.0'
169+
gem 'aws-sdk-core', '~> 3.167.0'
170170
gem 'aws-sdk-cloudformation', '~> 1'
171171
gem 'aws-sdk-s3', '~> 1.117.1'
172172
gem 'faraday_middleware-aws-sigv4', '~>0.3.0'

Gemfile.checksum

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
{"name":"awesome_print","version":"1.9.2","platform":"ruby","checksum":"e99b32b704acff16d768b3468680793ced40bfdc4537eb07e06a4be11133786e"},
3434
{"name":"awrence","version":"1.1.1","platform":"ruby","checksum":"9be584c97408ed92d5e1ca11740853646fe270de675f2f8dd44e8233226dfc97"},
3535
{"name":"aws-eventstream","version":"1.2.0","platform":"ruby","checksum":"ffa53482c92880b001ff2fb06919b9bb82fd847cbb0fa244985d2ebb6dd0d1df"},
36-
{"name":"aws-partitions","version":"1.651.0","platform":"ruby","checksum":"61f354049eb2c10bf0aa96b115f7443d181d79ec5508f7a34b8724c4cfa95dda"},
36+
{"name":"aws-partitions","version":"1.658.0","platform":"ruby","checksum":"bba2e21fc87c4e68c7ba5c09e3cd2b81d59ca86111ab236eaf9c5a8ae207b3fc"},
3737
{"name":"aws-sdk-cloudformation","version":"1.41.0","platform":"ruby","checksum":"31e47539719734413671edf9b1a31f8673fbf9688549f50c41affabbcb1c6b26"},
38-
{"name":"aws-sdk-core","version":"3.166.0","platform":"ruby","checksum":"827b82a31f13007fbd3ce78801949019ad3b6fa0c658270d5caa6095cb4945fa"},
38+
{"name":"aws-sdk-core","version":"3.167.0","platform":"ruby","checksum":"d371856ad86f8bff08928059ee09b7cb9bca8ebf36bf5081f12424e4f491b624"},
3939
{"name":"aws-sdk-kms","version":"1.59.0","platform":"ruby","checksum":"6c002ebf8e404625c8338ca12ae69b1329399f9dc1b0ebca474e00ff06700153"},
4040
{"name":"aws-sdk-s3","version":"1.117.1","platform":"ruby","checksum":"76f6dac5baeb2b78616eb34c6af650c1b7a15c1078b169d1b27e8421904c509d"},
4141
{"name":"aws-sigv4","version":"1.5.1","platform":"ruby","checksum":"d68c87fff4ee843b4b92b23c7f31f957f254ec6eb064181f7119124aab8b8bb4"},

Gemfile.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,11 @@ GEM
185185
awesome_print (1.9.2)
186186
awrence (1.1.1)
187187
aws-eventstream (1.2.0)
188-
aws-partitions (1.651.0)
188+
aws-partitions (1.658.0)
189189
aws-sdk-cloudformation (1.41.0)
190190
aws-sdk-core (~> 3, >= 3.99.0)
191191
aws-sigv4 (~> 1.1)
192-
aws-sdk-core (3.166.0)
192+
aws-sdk-core (3.167.0)
193193
aws-eventstream (~> 1, >= 1.0.2)
194194
aws-partitions (~> 1, >= 1.651.0)
195195
aws-sigv4 (~> 1.5)
@@ -1590,7 +1590,7 @@ DEPENDENCIES
15901590
autoprefixer-rails (= 10.2.5.1)
15911591
awesome_print
15921592
aws-sdk-cloudformation (~> 1)
1593-
aws-sdk-core (~> 3.166.0)
1593+
aws-sdk-core (~> 3.167.0)
15941594
aws-sdk-s3 (~> 1.117.1)
15951595
babosa (~> 1.0.4)
15961596
base32 (~> 0.3.0)
@@ -1869,4 +1869,4 @@ DEPENDENCIES
18691869
yajl-ruby (~> 1.4.3)
18701870

18711871
BUNDLED WITH
1872-
2.3.24
1872+
2.3.25

app/assets/javascripts/alerts_settings/components/alerts_settings_form.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ export default {
612612
>
613613
<alert-settings-form-help-block
614614
:message="viewCredentialsHelpMsg"
615-
link="https://docs.gitlab.com/ee/operations/incident_management/alert_integrations.html"
615+
link="https://docs.gitlab.com/ee/operations/incident_management/integrations.html#configuration"
616616
/>
617617
618618
<gl-form-group id="integration-webhook">

app/assets/javascripts/clusters_list/components/delete_agent_button.vue

+5-2
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ export default {
9292
disableModalSubmit() {
9393
return this.deleteConfirmText !== this.agent.name;
9494
},
95+
containerTabIndex() {
96+
return this.canAdminCluster ? -1 : 0;
97+
},
9598
},
9699
methods: {
97100
async deleteAgent() {
@@ -156,8 +159,8 @@ export default {
156159
<div>
157160
<div
158161
v-gl-tooltip="deleteButtonTooltip"
159-
class="gl-display-inline-block"
160-
tabindex="-1"
162+
:tabindex="containerTabIndex"
163+
class="cluster-button-container gl-rounded-base gl-display-inline-block"
161164
data-testid="delete-agent-button-tooltip"
162165
>
163166
<gl-button

app/assets/javascripts/editor/schema/ci.json

+50-16
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
"$ref": "#/definitions/exists"
133133
},
134134
"variables": {
135-
"$ref": "#/definitions/variables"
135+
"$ref": "#/definitions/rulesVariables"
136136
},
137137
"when": {
138138
"type": "string",
@@ -690,7 +690,7 @@
690690
"$ref": "#/definitions/exists"
691691
},
692692
"variables": {
693-
"$ref": "#/definitions/variables"
693+
"$ref": "#/definitions/rulesVariables"
694694
},
695695
"when": {
696696
"$ref": "#/definitions/when"
@@ -744,6 +744,10 @@
744744
"description": {
745745
"type": "string",
746746
"markdownDescription": "Explains what the variable is used for, what the acceptable values are. Variables with `description` are prefilled when running a pipeline manually. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#variablesdescription)."
747+
},
748+
"expand": {
749+
"type": "boolean",
750+
"markdownDescription": "If the variable is expandable or not. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#variablesexpand)."
747751
}
748752
},
749753
"additionalProperties": false
@@ -753,6 +757,49 @@
753757
"additionalProperties": false
754758
}
755759
},
760+
"jobVariables": {
761+
"markdownDescription": "Defines variables for a job. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#variables).",
762+
"type": "object",
763+
"patternProperties": {
764+
".*": {
765+
"oneOf": [
766+
{
767+
"type": [
768+
"string",
769+
"number"
770+
]
771+
},
772+
{
773+
"type": "object",
774+
"properties": {
775+
"value": {
776+
"type": "string"
777+
},
778+
"expand": {
779+
"type": "boolean",
780+
"markdownDescription": "Defines if the variable is expandable or not. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#variablesexpand)."
781+
}
782+
},
783+
"additionalProperties": false
784+
}
785+
]
786+
},
787+
"additionalProperties": false
788+
}
789+
},
790+
"rulesVariables": {
791+
"markdownDescription": "Defines variables for a rule result. [Learn More](https://docs.gitlab.com/ee/ci/yaml/index.html#rulesvariables).",
792+
"type": "object",
793+
"patternProperties": {
794+
".*": {
795+
"type": [
796+
"string",
797+
"number"
798+
]
799+
},
800+
"additionalProperties": false
801+
}
802+
},
756803
"if": {
757804
"type": "string",
758805
"markdownDescription": "Expression to evaluate whether additional attributes should be provided to the job. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#rulesif)."
@@ -795,19 +842,6 @@
795842
"type": "string"
796843
}
797844
},
798-
"variables": {
799-
"markdownDescription": "Defines environment variables. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#variables).",
800-
"type": "object",
801-
"patternProperties": {
802-
".*": {
803-
"type": [
804-
"string",
805-
"number"
806-
]
807-
},
808-
"additionalProperties": false
809-
}
810-
},
811845
"timeout": {
812846
"type": "string",
813847
"markdownDescription": "Allows you to configure a timeout for a specific job (e.g. `1 minute`, `1h 30m 12s`). [Learn More](https://docs.gitlab.com/ee/ci/yaml/index.html#timeout).",
@@ -1170,7 +1204,7 @@
11701204
"$ref": "#/definitions/rules"
11711205
},
11721206
"variables": {
1173-
"$ref": "#/definitions/variables"
1207+
"$ref": "#/definitions/jobVariables"
11741208
},
11751209
"cache": {
11761210
"$ref": "#/definitions/cache"

app/assets/javascripts/work_items/router/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Vue.use(VueRouter);
99

1010
export function createRouter(fullPath) {
1111
return new VueRouter({
12-
routes,
12+
routes: routes(),
1313
mode: 'history',
1414
base: joinPaths(fullPath, '-', 'work_items'),
1515
});
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1-
export const routes = [
2-
{
3-
path: '/new',
4-
name: 'createWorkItem',
5-
component: () => import('../pages/create_work_item.vue'),
6-
},
7-
{
8-
path: '/:id',
9-
name: 'workItem',
10-
component: () => import('../pages/work_item_root.vue'),
11-
props: true,
12-
},
13-
];
1+
function getRoutes() {
2+
const routes = [
3+
{
4+
path: '/:id',
5+
name: 'workItem',
6+
component: () => import('../pages/work_item_root.vue'),
7+
props: true,
8+
},
9+
];
10+
11+
if (gon.features?.workItemsMvc2) {
12+
routes.unshift({
13+
path: '/new',
14+
name: 'createWorkItem',
15+
component: () => import('../pages/create_work_item.vue'),
16+
});
17+
}
18+
19+
return routes;
20+
}
21+
22+
export const routes = getRoutes;

app/assets/stylesheets/page_bundles/clusters.scss

+4
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@
2020
min-height: 372px;
2121
}
2222
}
23+
24+
.cluster-button-container:focus-within {
25+
@include gl-focus;
26+
}

app/controllers/concerns/integrations/params.rb

+4
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ def integration_params
8888
param_values = return_value[:integration]
8989

9090
if param_values.is_a?(ActionController::Parameters)
91+
if action_name == 'update' && integration.chat? && param_values['webhook'] == BaseChatNotification::SECRET_MASK
92+
param_values.delete('webhook')
93+
end
94+
9195
integration.secret_fields.each do |param|
9296
param_values.delete(param) if param_values[param].blank?
9397
end

app/models/concerns/repository_storage_movable.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ module RepositoryStorageMovable
1919
inclusion: { in: ->(_) { Gitlab.config.repositories.storages.keys } }
2020
validate :container_repository_writable, on: :create
2121

22-
default_value_for(:destination_storage_name, allows_nil: false) do
23-
Repository.pick_storage_shard
24-
end
22+
attribute :destination_storage_name, default: -> { Repository.pick_storage_shard }
2523

2624
state_machine initial: :initial do
2725
event :schedule do

app/models/integration.rb

+4
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,10 @@ def supports_data_fields?
589589
false
590590
end
591591

592+
def chat?
593+
category == :chat
594+
end
595+
592596
private
593597

594598
# Ancestors sorted by hierarchy depth in bottom-top order.

app/models/integrations/base_chat_notification.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class BaseChatNotification < Integration
2222
MATCH_ALL_LABELS = 'match_all'
2323
].freeze
2424

25+
SECRET_MASK = '************'
26+
2527
default_value_for :category, 'chat'
2628

2729
prop_accessor :webhook, :username, :channel, :branches_to_be_notified, :labels_to_be_notified, :labels_to_be_notified_behavior
@@ -71,7 +73,7 @@ def fields
7173

7274
def default_fields
7375
[
74-
{ type: 'text', name: 'webhook', placeholder: "#{webhook_placeholder}", required: true }.freeze,
76+
{ type: 'text', name: 'webhook', help: "#{webhook_help}", required: true }.freeze,
7577
{ type: 'text', name: 'username', placeholder: 'GitLab-integration' }.freeze,
7678
{ type: 'checkbox', name: 'notify_only_broken_pipelines', help: 'Do not send notifications for successful pipelines.' }.freeze,
7779
{
@@ -147,7 +149,7 @@ def default_channel_placeholder
147149
raise NotImplementedError
148150
end
149151

150-
def webhook_placeholder
152+
def webhook_help
151153
raise NotImplementedError
152154
end
153155

app/models/integrations/discord.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ class Discord < BaseChatNotification
1010

1111
field :webhook,
1212
section: SECTION_TYPE_CONNECTION,
13-
placeholder: 'https://discordapp.com/api/webhooks/…',
14-
help: 'URL to the webhook for the Discord channel.',
13+
help: 'e.g. https://discordapp.com/api/webhooks/…',
1514
required: true
1615

1716
field :notify_only_broken_pipelines,

app/models/integrations/hangouts_chat.rb

+1-5
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,14 @@ def help
2222
def default_channel_placeholder
2323
end
2424

25-
def webhook_placeholder
26-
'https://chat.googleapis.com/v1/spaces…'
27-
end
28-
2925
def self.supported_events
3026
%w[push issue confidential_issue merge_request note confidential_note tag_push
3127
pipeline wiki_page]
3228
end
3329

3430
def default_fields
3531
[
36-
{ type: 'text', name: 'webhook', placeholder: "#{webhook_placeholder}" },
32+
{ type: 'text', name: 'webhook', help: 'https://chat.googleapis.com/v1/spaces…' },
3733
{ type: 'checkbox', name: 'notify_only_broken_pipelines' },
3834
{
3935
type: 'select',

app/models/integrations/mattermost.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def default_channel_placeholder
2525
'my-channel'
2626
end
2727

28-
def webhook_placeholder
28+
def webhook_help
2929
'http://mattermost.example.com/hooks/'
3030
end
3131

app/models/integrations/microsoft_teams.rb

+1-5
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ def help
1818
'<p>Use this service to send notifications about events in GitLab projects to your Microsoft Teams channels. <a href="https://docs.gitlab.com/ee/user/project/integrations/microsoft_teams.html" target="_blank" rel="noopener noreferrer">How do I configure this integration?</a></p>'
1919
end
2020

21-
def webhook_placeholder
22-
'https://outlook.office.com/webhook/…'
23-
end
24-
2521
def default_channel_placeholder
2622
end
2723

@@ -32,7 +28,7 @@ def self.supported_events
3228

3329
def default_fields
3430
[
35-
{ type: 'text', section: SECTION_TYPE_CONNECTION, name: 'webhook', required: true, placeholder: "#{webhook_placeholder}" },
31+
{ type: 'text', section: SECTION_TYPE_CONNECTION, name: 'webhook', help: 'https://outlook.office.com/webhook/…', required: true },
3632
{
3733
type: 'checkbox',
3834
section: SECTION_TYPE_CONFIGURATION,

app/models/integrations/pumble.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def self.supported_events
3636

3737
def default_fields
3838
[
39-
{ type: 'text', name: 'webhook', placeholder: "https://api.pumble.com/workspaces/x/...", required: true },
39+
{ type: 'text', name: 'webhook', help: 'https://api.pumble.com/workspaces/x/...', required: true },
4040
{ type: 'checkbox', name: 'notify_only_broken_pipelines' },
4141
{
4242
type: 'select',

app/models/integrations/slack.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def self.to_param
1616
'slack'
1717
end
1818

19-
override :webhook_placeholder
20-
def webhook_placeholder
19+
override :webhook_help
20+
def webhook_help
2121
'https://hooks.slack.com/services/…'
2222
end
2323
end

0 commit comments

Comments
 (0)