Skip to content

Commit 78c64b0

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent f72996e commit 78c64b0

File tree

68 files changed

+26864
-7537
lines changed

Some content is hidden

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

68 files changed

+26864
-7537
lines changed

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

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
<script>
2-
import { GlButton, GlIcon, GlBadge, GlLoadingIcon, GlLink, GlTooltipDirective } from '@gitlab/ui';
2+
import {
3+
GlButton,
4+
GlIcon,
5+
GlBadge,
6+
GlSkeletonLoader,
7+
GlLink,
8+
GlTooltipDirective,
9+
} from '@gitlab/ui';
310
import { __ } from '~/locale';
411
512
export default {
613
components: {
714
GlButton,
815
GlIcon,
916
GlBadge,
10-
GlLoadingIcon,
17+
GlSkeletonLoader,
1118
GlLink,
1219
},
1320
directives: {
@@ -121,7 +128,7 @@ export default {
121128
},
122129
displayedCount() {
123130
if (this.isLoading) {
124-
return '...';
131+
return null;
125132
}
126133
127134
return this.icon && !this.count ? '0' : this.count;
@@ -276,7 +283,8 @@ export default {
276283
:class="[bodyClass, { 'gl-rounded-b-base': !$scopedSlots.footer }]"
277284
data-testid="crud-body"
278285
>
279-
<gl-loading-icon v-if="isLoading" size="sm" data-testid="crud-loading" />
286+
<gl-skeleton-loader v-if="isLoading" :width="400" :lines="3" data-testid="crud-loading" />
287+
280288
<span v-else-if="$scopedSlots.empty" class="gl-text-subtle" data-testid="crud-empty">
281289
<slot name="empty"></slot>
282290
</span>

app/assets/javascripts/webhooks/components/webhook_form_app.vue

+45-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
<script>
2+
import { GlFormGroup, GlFormInput, GlFormTextarea } from '@gitlab/ui';
3+
24
import FormUrlApp from './form_url_app.vue';
35
import FormCustomHeaders from './form_custom_headers.vue';
46
57
export default {
68
components: {
9+
GlFormGroup,
10+
GlFormInput,
11+
GlFormTextarea,
712
FormUrlApp,
813
FormCustomHeaders,
914
},
@@ -16,19 +21,57 @@ export default {
1621
initialUrlVariables: {
1722
type: Array,
1823
required: false,
19-
default: null,
24+
default: () => [],
2025
},
2126
initialCustomHeaders: {
2227
type: Array,
2328
required: false,
24-
default: null,
29+
default: () => [],
30+
},
31+
initialName: {
32+
type: String,
33+
required: false,
34+
default: '',
35+
},
36+
initialDescription: {
37+
type: String,
38+
required: false,
39+
default: '',
2540
},
2641
},
42+
data() {
43+
return {
44+
name: this.initialName,
45+
description: this.initialDescription,
46+
};
47+
},
2748
};
2849
</script>
2950

3051
<template>
3152
<div>
53+
<gl-form-group :label="s__('Webhooks|Name (optional)')" label-for="webhook-name">
54+
<gl-form-input
55+
id="webhook-name"
56+
v-model="name"
57+
name="hook[name]"
58+
class="gl-form-input-xl"
59+
data-testid="webhook-name"
60+
/>
61+
</gl-form-group>
62+
63+
<gl-form-group :label="s__('Webhooks|Description (optional)')" label-for="webhook-description">
64+
<gl-form-textarea
65+
id="webhook-description"
66+
v-model="description"
67+
name="hook[description]"
68+
class="gl-form-input-xl"
69+
rows="4"
70+
maxlength="2048"
71+
data-testid="webhook-description"
72+
/>
73+
</gl-form-group>
74+
3275
<form-url-app :initial-url="initialUrl" :initial-url-variables="initialUrlVariables" />
3376
<form-custom-headers :initial-custom-headers="initialCustomHeaders" />
3477
</div>

app/assets/javascripts/webhooks/index.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,22 @@ export default () => {
99
return null;
1010
}
1111

12-
const { url: initialUrl, urlVariables, customHeaders } = el.dataset;
12+
const {
13+
name: initialName,
14+
description: initialDescription,
15+
url: initialUrl,
16+
urlVariables,
17+
customHeaders,
18+
} = el.dataset;
1319

1420
return new Vue({
1521
el,
1622
name: 'WebhookFormRoot',
1723
render(createElement) {
1824
return createElement(WebhookFormApp, {
1925
props: {
26+
initialName,
27+
initialDescription,
2028
initialUrl,
2129
initialUrlVariables: JSON.parse(urlVariables),
2230
initialCustomHeaders: JSON.parse(customHeaders),

app/helpers/hooks_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
module HooksHelper
44
def webhook_form_data(hook)
55
{
6+
name: hook.name,
7+
description: hook.description,
68
url: hook.url,
79
url_variables: Gitlab::Json.dump(hook.url_variables.keys.map { { key: _1 } }),
810
custom_headers: Gitlab::Json.dump(hook.custom_headers.keys.map { { key: _1, value: WebHook::SECRET_MASK } })

app/models/packages/terraform_module/metadatum.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Metadatum < ApplicationRecord
1515

1616
attribute :fields, default: -> { {} }
1717

18-
ignore_column :semver_patch_convert_to_bigint, remove_with: '18.1', remove_after: '2025-05-20'
18+
ignore_column :semver_patch_convert_to_bigint, remove_with: '18.2', remove_after: '2025-06-20'
1919

2020
validates :package, :project, presence: true
2121
validates :fields, json_schema: { filename: 'terraform_module_metadata', detail_errors: true },

app/views/admin/hooks/_form.html.haml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
= form_errors(hook)
22

3-
.form-group
4-
= form.label :url, _('URL'), class: 'label-bold'
5-
= form.text_field :url, class: 'form-control gl-form-input'
6-
%p.form-text.gl-text-subtle= _('URL must be percent-encoded if necessary.')
73
.form-group
84
= form.label :name, s_('Webhooks|Name (optional)'), class: 'label-bold'
95
= form.text_field :name, value: hook.name, class: 'form-control gl-form-input gl-form-input-xl'
106
.form-group
117
= form.label :description, s_('Webhooks|Description (optional)'), class: 'label-bold'
128
= form.text_area :description, value: hook.description, class: 'form-control gl-form-input gl-form-input-xl', rows: 4, maxlength: 2048
9+
.form-group
10+
= form.label :url, _('URL'), class: 'label-bold'
11+
= form.text_field :url, class: 'form-control gl-form-input'
12+
%p.form-text.gl-text-subtle= _('URL must be percent-encoded if necessary.')
1313
.form-group
1414
= form.label :token, _('Secret token'), class: 'label-bold'
1515
= form.password_field :token, value: hook.masked_token, autocomplete: 'new-password', class: 'form-control gl-form-input gl-max-w-48'

app/views/shared/web_hooks/_form.html.haml

-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
= form_errors(hook)
22

33
.js-vue-webhook-form{ data: webhook_form_data(hook) }
4-
.form-group
5-
= form.label :name, s_('Webhooks|Name (optional)'), class: 'label-bold'
6-
= form.text_field :name, value: hook.name, class: 'form-control gl-form-input gl-form-input-xl'
7-
.form-group
8-
= form.label :description, s_('Webhooks|Description (optional)'), class: 'label-bold'
9-
= form.text_area :description, value: hook.description, class: 'form-control gl-form-input gl-form-input-xl', rows: 4, maxlength: 2048
104
.form-group
115
= form.label :token, s_('Webhooks|Secret token'), class: 'label-bold'
126
= form.password_field :token, value: hook.masked_token, autocomplete: 'new-password', class: 'form-control gl-form-input gl-form-input-xl'

config/routes/dashboard.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
resources :milestones, only: [:index]
1414
resources :labels, only: [:index]
1515

16-
resources :groups, only: [:index]
16+
resources :groups, only: [:index] do
17+
collection do
18+
get :member, :inactive, to: 'groups#index'
19+
end
20+
end
1721
resources :snippets, only: [:index]
1822

1923
resources :todos, only: [:index, :destroy]

db/docs/batched_background_migrations/backfill_organization_id_on_fork_networks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ feature_category: source_code_management
55
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/184051
66
milestone: '17.11'
77
queued_migration_version: 20250310143706
8-
finalized_by: # version of the migration that finalized this BBM
8+
finalized_by: 20250415100300
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# frozen_string_literal: true
2+
3+
class FinalizeBackfillOrganizationIdOnForkNetworks < Gitlab::Database::Migration[2.2]
4+
milestone '18.0'
5+
disable_ddl_transaction!
6+
7+
restrict_gitlab_migration gitlab_schema: :gitlab_main
8+
9+
def up
10+
ensure_batched_background_migration_is_finished(
11+
job_class_name: 'BackfillOrganizationIdOnForkNetworks',
12+
table_name: :fork_networks,
13+
column_name: :id,
14+
job_arguments: [],
15+
finalize: true
16+
)
17+
end
18+
19+
def down; end
20+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# frozen_string_literal: true
2+
3+
class FinalizeTerraformModuleMetadataSemverPatchBigintConversion < Gitlab::Database::Migration[2.2]
4+
disable_ddl_transaction!
5+
milestone '18.0'
6+
7+
restrict_gitlab_migration gitlab_schema: :gitlab_main
8+
9+
def up
10+
ensure_backfill_conversion_of_integer_to_bigint_is_finished(
11+
:packages_terraform_module_metadata,
12+
%i[semver_patch],
13+
primary_key: :package_id
14+
)
15+
end
16+
17+
def down; end
18+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# frozen_string_literal: true
2+
3+
class SwapTerraformModuleMetadataSemverPatchBigintConversion < Gitlab::Database::Migration[2.2]
4+
include Gitlab::Database::MigrationHelpers::Swapping
5+
6+
disable_ddl_transaction!
7+
milestone '18.0'
8+
9+
TABLE_NAME = :packages_terraform_module_metadata
10+
COLUMN_NAME = :semver_patch
11+
BIGINT_COLUMN_NAME = :semver_patch_convert_to_bigint
12+
TRIGGER_NAME = :trigger_dd7cb7bd6c9e
13+
14+
def up
15+
swap
16+
end
17+
18+
def down
19+
swap
20+
end
21+
22+
private
23+
24+
def swap
25+
with_lock_retries(raise_on_exhaustion: true) do
26+
lock_tables(TABLE_NAME)
27+
swap_columns(TABLE_NAME, COLUMN_NAME, BIGINT_COLUMN_NAME)
28+
reset_trigger_function(TRIGGER_NAME)
29+
end
30+
end
31+
end

db/schema_migrations/20250415100300

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d0c3f38c39552dae2b9948174e29b47c6dd3202902924e2533a4553f35833c84

db/schema_migrations/20250415130342

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0e5e1a95cfb7992fb5fb3d51a12953b92889c4448e071a121f4f4a4cc7369178

db/schema_migrations/20250415155913

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
26450b49009494fc34950ea6a75758a8eecbc262448154e75ebaacfca538020d

db/structure.sql

+2-2
Original file line numberDiff line numberDiff line change
@@ -19770,9 +19770,9 @@ CREATE TABLE packages_terraform_module_metadata (
1977019770
fields jsonb NOT NULL,
1977119771
semver_major integer,
1977219772
semver_minor integer,
19773-
semver_patch integer,
19773+
semver_patch_convert_to_bigint integer,
1977419774
semver_prerelease text,
19775-
semver_patch_convert_to_bigint bigint,
19775+
semver_patch bigint,
1977619776
CONSTRAINT check_46aa6c883a CHECK ((char_length(semver_prerelease) <= 255)),
1977719777
CONSTRAINT chk_rails_49f7b485ae CHECK ((char_length((fields)::text) <= 10485760))
1977819778
);

doc/api/openapi/openapi_v2.yaml

+59
Original file line numberDiff line numberDiff line change
@@ -50208,7 +50208,16 @@ definitions:
5020850208
example: '2017-05-19T13:40:17.727Z'
5020950209
owner:
5021050210
"$ref": "#/definitions/API_Entities_UserBasic"
50211+
inputs:
50212+
"$ref": "#/definitions/API_Entities_Ci_Input"
5021150213
description: API_Entities_Ci_PipelineSchedule model
50214+
API_Entities_Ci_Input:
50215+
type: object
50216+
properties:
50217+
name:
50218+
type: string
50219+
value:
50220+
type: string
5021250221
API_Entities_Ci_PipelineScheduleDetails:
5021350222
type: object
5021450223
properties:
@@ -50245,6 +50254,8 @@ definitions:
5024550254
example: '2017-05-19T13:40:17.727Z'
5024650255
owner:
5024750256
"$ref": "#/definitions/API_Entities_UserBasic"
50257+
inputs:
50258+
"$ref": "#/definitions/API_Entities_Ci_Input"
5024850259
last_pipeline:
5024950260
"$ref": "#/definitions/API_Entities_Ci_PipelineBasic"
5025050261
variables:
@@ -50275,6 +50286,30 @@ definitions:
5027550286
description: The activation of pipeline schedule
5027650287
default: true
5027750288
example: true
50289+
inputs:
50290+
type: array
50291+
description: Inputs for the pipeline schedule
50292+
example:
50293+
- name: array_input
50294+
value:
50295+
- 1
50296+
- 2
50297+
- name: boolean_input
50298+
value: true
50299+
items:
50300+
type: object
50301+
properties:
50302+
name:
50303+
type: string
50304+
description: The name of the input
50305+
example: deploy_strategy
50306+
value:
50307+
type: string
50308+
description: The value of the input
50309+
example: blue-green
50310+
required:
50311+
- name
50312+
- value
5027850313
required:
5027950314
- description
5028050315
- ref
@@ -50303,6 +50338,30 @@ definitions:
5030350338
type: boolean
5030450339
description: The activation of pipeline schedule
5030550340
example: true
50341+
inputs:
50342+
type: array
50343+
description: Inputs for the pipeline schedule
50344+
example:
50345+
- name: deploy_strategy
50346+
value: blue-green
50347+
items:
50348+
type: object
50349+
properties:
50350+
name:
50351+
type: string
50352+
description: The name of the input
50353+
example: deploy_strategy
50354+
destroy:
50355+
type: boolean
50356+
description: Whether to delete the input
50357+
default: false
50358+
value:
50359+
type: string
50360+
description: The value of the input
50361+
example: blue-green
50362+
required:
50363+
- name
50364+
- value
5030650365
description: Edit a pipeline schedule
5030750366
postApiV4ProjectsIdPipelineSchedulesPipelineScheduleIdVariables:
5030850367
type: object

0 commit comments

Comments
 (0)