Skip to content

Commit 0985362

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 31f5ca7 commit 0985362

File tree

112 files changed

+5086
-5977
lines changed

Some content is hidden

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

112 files changed

+5086
-5977
lines changed

.eslint_todo/vue-no-unused-properties.mjs

-9
Original file line numberDiff line numberDiff line change
@@ -288,14 +288,6 @@ export default {
288288
'app/assets/javascripts/webhooks/components/form_custom_header_item.vue',
289289
'app/assets/javascripts/work_items/components/create_work_item.vue',
290290
'app/assets/javascripts/work_items/components/design_management/design_notes/design_discussion.vue',
291-
'app/assets/javascripts/work_items/components/notes/system_note.vue',
292-
'app/assets/javascripts/work_items/components/notes/work_item_activity_sort_filter.vue',
293-
'app/assets/javascripts/work_items/components/notes/work_item_add_note.vue',
294-
'app/assets/javascripts/work_items/components/notes/work_item_comment_locked.vue',
295-
'app/assets/javascripts/work_items/components/notes/work_item_note.vue',
296-
'app/assets/javascripts/work_items/components/notes/work_item_note_actions.vue',
297-
'app/assets/javascripts/work_items/components/notes/work_item_note_awards_list.vue',
298-
'app/assets/javascripts/work_items/components/notes/work_item_note_body.vue',
299291
'app/assets/javascripts/work_items/components/shared/work_item_link_child_metadata.vue',
300292
'app/assets/javascripts/work_items/components/shared/work_item_token_input.vue',
301293
'app/assets/javascripts/work_items/components/work_item_assignees.vue',
@@ -318,7 +310,6 @@ export default {
318310
'app/assets/javascripts/work_items/components/work_item_links/work_item_rolled_up_data.vue',
319311
'app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue',
320312
'app/assets/javascripts/work_items/components/work_item_milestone.vue',
321-
'app/assets/javascripts/work_items/components/work_item_notes.vue',
322313
'app/assets/javascripts/work_items/components/work_item_notifications_widget.vue',
323314
'app/assets/javascripts/work_items/components/work_item_relationships/work_item_relationship_list.vue',
324315
'app/assets/javascripts/work_items/components/work_item_state_toggle.vue',

.gitlab/ci/qa-common/main.gitlab-ci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ stages:
8787
- .docker-in-docker
8888
- .qa-install
8989
- .e2e-test-variables
90-
image: "${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/${BUILD_OS}-${OS_VERSION}-ruby-${RUBY_VERSION}-rust-${RUST_VERSION}:git-${GIT_VERSION}-lfs-${LFS_VERSION}-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION}-kubectl-${KUBECTL_VERSION}-helm-${HELM_VERSION}-kind-${KIND_VERSION}"
9190
variables:
9291
# variables related to failure issue reporting
9392
# default values from /ci/qa-report.gitlab-ci.yml will work with gitlab-qa orchestrator but not with cng and gdk tests

.gitlab/ci/test-on-cng/main.gitlab-ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ workflow:
3030
- export QA_GITLAB_URL="http://gitlab.${GITLAB_DOMAIN}"
3131

3232
.cng-test:
33+
image: "${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/ci/${BUILD_OS}-${OS_VERSION}-slim-ruby-${RUBY_VERSION}:rubygems-${RUBYGEMS_VERSION}-git-${GIT_VERSION}-lfs-${LFS_VERSION}-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION}-kubectl-${KUBECTL_VERSION}-helm-${HELM_VERSION}-kind-${KIND_VERSION}"
3334
stage: test
3435
extends:
3536
- .e2e-test-base

.gitlab/ci/test-on-gdk/main.gitlab-ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ workflow:
2828
- mv $CI_BUILDS_DIR/*.log $CI_PROJECT_DIR/
2929

3030
.gdk-qa-base:
31+
image: "${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/ci/${BUILD_OS}-${OS_VERSION}-slim-ruby-${RUBY_VERSION}:rubygems-${RUBYGEMS_VERSION}-git-${GIT_VERSION}-lfs-${LFS_VERSION}-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION}"
3132
extends:
3233
- .e2e-test-base
3334
# ignore runtime data from gdk because it's significantly slower than cng and runtime data for

GITALY_SERVER_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5ddaf4012bca2e5291f21503c5df3ccd7bafe62f
1+
cdfcfafe0ef01938ccb97298d64245e6a5f0fbf1

app/assets/javascripts/ci/common/pipeline_inputs/inputs_adoption_banner.vue

+16-20
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<script>
2-
import { GlAlert, GlSprintf } from '@gitlab/ui';
2+
import { GlAlert, GlButton, GlSprintf } from '@gitlab/ui';
33
import { helpPagePath } from '~/helpers/help_page_helper';
4-
import { __, s__ } from '~/locale';
54
import UserCalloutDismisser from '~/vue_shared/components/user_callout_dismisser.vue';
65
76
export default {
87
name: 'InputsAdoptionBanner',
9-
components: { GlAlert, GlSprintf, UserCalloutDismisser },
8+
components: { GlAlert, GlButton, GlSprintf, UserCalloutDismisser },
109
inputsDocsPath: helpPagePath('ci/yaml/inputs'),
1110
inject: ['canViewPipelineEditor', 'pipelineEditorPath'],
1211
props: {
@@ -19,30 +18,14 @@ export default {
1918
showPipelineEditorButton() {
2019
return this.canViewPipelineEditor && this.pipelineEditorPath;
2120
},
22-
alertProps() {
23-
return {
24-
secondaryButtonText: __('Learn more'),
25-
secondaryButtonLink: this.$options.inputsDocsPath,
26-
...(this.showPipelineEditorButton && {
27-
primaryButtonText: s__('Pipelines|Go to the pipeline editor'),
28-
primaryButtonLink: this.pipelineEditorPath,
29-
}),
30-
};
31-
},
3221
},
3322
};
3423
</script>
3524

3625
<template>
3726
<user-callout-dismisser :feature-name="featureName">
3827
<template #default="{ dismiss, shouldShowCallout }">
39-
<gl-alert
40-
v-if="shouldShowCallout"
41-
variant="tip"
42-
class="gl-my-4"
43-
v-bind="alertProps"
44-
@dismiss="dismiss"
45-
>
28+
<gl-alert v-if="shouldShowCallout" variant="tip" class="gl-my-4" @dismiss="dismiss">
4629
<gl-sprintf
4730
:message="
4831
s__(
@@ -54,6 +37,19 @@ export default {
5437
<code>{{ content }}</code>
5538
</template>
5639
</gl-sprintf>
40+
<div class="gl-mt-4 gl-flex gl-gap-3">
41+
<gl-button
42+
v-if="showPipelineEditorButton"
43+
:href="pipelineEditorPath"
44+
category="secondary"
45+
variant="confirm"
46+
>
47+
{{ __('Go to the pipeline editor') }}
48+
</gl-button>
49+
<gl-button :href="$options.inputsDocsPath" category="secondary" target="_blank">
50+
{{ __('Learn more') }}
51+
</gl-button>
52+
</div>
5753
</gl-alert>
5854
</template>
5955
</user-callout-dismisser>

app/assets/javascripts/ci/common/pipeline_inputs/pipeline_inputs_form.vue

+17-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import InputsTableSkeletonLoader from './pipeline_inputs_table/inputs_table_skel
77
import PipelineInputsTable from './pipeline_inputs_table/pipeline_inputs_table.vue';
88
import getPipelineInputsQuery from './graphql/queries/pipeline_creation_inputs.query.graphql';
99
10+
const ARRAY_TYPE = 'ARRAY';
11+
1012
export default {
1113
name: 'PipelineInputsForm',
1214
components: {
@@ -78,10 +80,21 @@ export default {
7880
input.name === updatedInput.name ? updatedInput : input,
7981
);
8082
81-
const nameValuePairs = this.inputs.map((input) => ({
82-
name: input.name,
83-
value: input.default,
84-
}));
83+
const nameValuePairs = this.inputs.map((input) => {
84+
let value = input.default;
85+
86+
// Convert string to array for ARRAY type inputs
87+
if (input.type === ARRAY_TYPE && typeof value === 'string' && value) {
88+
try {
89+
value = JSON.parse(value);
90+
if (!Array.isArray(value)) value = [value];
91+
} catch (e) {
92+
value = value.split(',').map((item) => item.trim());
93+
}
94+
}
95+
96+
return { name: input.name, value };
97+
});
8598
8699
this.$emit('update-inputs', nameValuePairs);
87100
},

app/assets/javascripts/ci/common/pipeline_inputs/pipeline_inputs_table/dynamic_value_renderer.vue

+35-11
Original file line numberDiff line numberDiff line change
@@ -24,37 +24,54 @@ const INPUT_TYPES = {
2424
STRING: 'STRING',
2525
};
2626
27+
const VALIDATION_MESSAGES = {
28+
ARRAY_FORMAT_MISMATCH: __(
29+
'The value must be a valid JSON array format: [1,2,3] or [{"key": "value"}]',
30+
),
31+
GENERAL_FORMAT_MISMATCH: __('Please match the requested format.'),
32+
NUMBER_TYPE_MISMATCH: __('The value must contain only numbers.'),
33+
REGEX_MISMATCH: __('The value must match the defined regular expression.'),
34+
VALUE_MISSING: __('This is required and must be defined.'),
35+
};
36+
2737
const feedbackMap = {
2838
arrayFormatMismatch: {
2939
isInvalid: (el) => {
3040
if (el.dataset.jsonArray !== 'true' || !el.value) return false;
3141
3242
try {
33-
const parsed = JSON.parse(el.value);
34-
return !Array.isArray(parsed);
43+
const isValid = Array.isArray(JSON.parse(el.value));
44+
// we use setCustomValidity to set the message that appears when the user clicks submit
45+
el.setCustomValidity(isValid ? '' : VALIDATION_MESSAGES.GENERAL_FORMAT_MISMATCH);
46+
return !isValid;
3547
} catch {
48+
el.setCustomValidity(VALIDATION_MESSAGES.GENERAL_FORMAT_MISMATCH);
3649
return true;
3750
}
3851
},
3952
message: __('The value must be a valid JSON array format: [1,2,3] or [{"key": "value"}]'),
4053
},
4154
numberTypeMismatch: {
4255
isInvalid: (el) => {
43-
return (
56+
const isInvalid =
4457
el.dataset.fieldType === INPUT_TYPES.NUMBER &&
4558
el.value &&
46-
!Number.isFinite(Number(el.value))
47-
);
59+
!Number.isFinite(Number(el.value));
60+
61+
// we use setCustomValidity to set the message that appears when the user clicks submit
62+
el.setCustomValidity(isInvalid ? VALIDATION_MESSAGES.GENERAL_FORMAT_MISMATCH : '');
63+
64+
return isInvalid;
4865
},
49-
message: __('The value must contain only numbers.'),
66+
message: VALIDATION_MESSAGES.NUMBER_TYPE_MISMATCH,
5067
},
5168
regexMismatch: {
5269
isInvalid: (el) => el.validity?.patternMismatch,
53-
message: __('The value must match the defined regular expression.'),
70+
message: VALIDATION_MESSAGES.REGEX_MISMATCH,
5471
},
5572
valueMissing: {
5673
isInvalid: (el) => el.validity?.valueMissing,
57-
message: __('This is required and must be defined.'),
74+
message: VALIDATION_MESSAGES.VALUE_MISSING,
5875
},
5976
};
6077
@@ -116,6 +133,13 @@ export default {
116133
const field = this.form.fields[this.item.name];
117134
return this.isArrayType && field?.feedback === feedbackMap.arrayFormatMismatch.message;
118135
},
136+
hasNumberTypeError() {
137+
const field = this.form.fields[this.item.name];
138+
return (
139+
this.item.type === INPUT_TYPES.NUMBER &&
140+
field?.feedback === feedbackMap.numberTypeMismatch.message
141+
);
142+
},
119143
hasValidationFeedback() {
120144
return Boolean(this.validationFeedback);
121145
},
@@ -137,9 +161,9 @@ export default {
137161
: feedback;
138162
},
139163
validationState() {
140-
// Override validation state for array format errors
141-
// This handles cases where checkValidity() returns true but our custom array validation fails
142-
if (this.hasArrayFormatError) {
164+
// Override validation state for array format errors and number type errors for our custom validation
165+
// This is also responsible for turning the border red when the input is invalid
166+
if (this.hasArrayFormatError || this.hasNumberTypeError) {
143167
return false;
144168
}
145169

app/assets/javascripts/ci/pipeline_mini_graph/pipeline_stage_dropdown.vue

+23-18
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import {
33
GlButton,
44
GlDisclosureDropdown,
5-
GlDropdownDivider,
5+
GlDisclosureDropdownGroup,
66
GlLoadingIcon,
77
GlTooltipDirective,
88
} from '@gitlab/ui';
@@ -23,7 +23,7 @@ export default {
2323
CiIcon,
2424
GlButton,
2525
GlDisclosureDropdown,
26-
GlDropdownDivider,
26+
GlDisclosureDropdownGroup,
2727
GlLoadingIcon,
2828
JobDropdownItem,
2929
},
@@ -161,22 +161,27 @@ export default {
161161
data-testid="pipeline-mini-graph-dropdown-menu-list"
162162
@click.stop
163163
>
164-
<span v-if="hasFailedJobs" class="gl-flex gl-px-4 gl-py-3 gl-text-sm gl-font-bold">
165-
{{ s__('Pipelines|Failed jobs') }}
166-
</span>
167-
<job-dropdown-item
168-
v-for="job in failedJobs"
169-
:key="job.id"
170-
:job="job"
171-
@jobActionExecuted="$emit('jobActionExecuted')"
172-
/>
173-
<gl-dropdown-divider v-if="hasPassedJobs && hasFailedJobs" />
174-
<job-dropdown-item
175-
v-for="job in passedJobs"
176-
:key="job.id"
177-
:job="job"
178-
@jobActionExecuted="$emit('jobActionExecuted')"
179-
/>
164+
<gl-disclosure-dropdown-group v-if="hasFailedJobs">
165+
<template #group-label>{{ s__('Pipelines|Failed jobs') }}</template>
166+
<job-dropdown-item
167+
v-for="job in failedJobs"
168+
:key="job.id"
169+
:job="job"
170+
@jobActionExecuted="$emit('jobActionExecuted')"
171+
/>
172+
</gl-disclosure-dropdown-group>
173+
<gl-disclosure-dropdown-group
174+
v-if="hasPassedJobs"
175+
:bordered="hasFailedJobs"
176+
data-testid="passed-jobs"
177+
>
178+
<job-dropdown-item
179+
v-for="job in passedJobs"
180+
:key="job.id"
181+
:job="job"
182+
@jobActionExecuted="$emit('jobActionExecuted')"
183+
/>
184+
</gl-disclosure-dropdown-group>
180185
</ul>
181186
182187
<template #footer>

app/assets/javascripts/ci/pipeline_new/components/pipeline_variables_form.vue

+7-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
1818
import { reportToSentry } from '~/ci/utils';
1919
import InputsAdoptionBanner from '~/ci/common/pipeline_inputs/inputs_adoption_banner.vue';
2020
import { fetchPolicies } from '~/lib/graphql';
21+
import Markdown from '~/vue_shared/components/markdown/non_gfm_markdown.vue';
2122
import filterVariables from '../utils/filter_variables';
2223
import {
2324
CI_VARIABLE_TYPE_FILE,
@@ -46,6 +47,7 @@ export default {
4647
GlLoadingIcon,
4748
GlSprintf,
4849
InputsAdoptionBanner,
50+
Markdown,
4951
VariableValuesListbox,
5052
},
5153
mixins: [glFeatureFlagsMixin()],
@@ -361,9 +363,11 @@ export default {
361363
/>
362364
</template>
363365
</div>
364-
<div v-if="descriptions[variable.key]" class="gl-text-subtle">
365-
{{ descriptions[variable.key] }}
366-
</div>
366+
<markdown
367+
v-if="descriptions[variable.key]"
368+
class="gl-text-subtle"
369+
:markdown="descriptions[variable.key]"
370+
/>
367371
</div>
368372
<template #description>
369373
<gl-sprintf

app/assets/javascripts/ci/pipeline_schedules/components/pipeline_schedules_form.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ export default {
277277
<template>
278278
<div class="col-lg-8 gl-pl-0">
279279
<gl-loading-icon v-if="loading && editing" size="lg" />
280-
<gl-form v-else>
280+
<gl-form v-else @submit.prevent="scheduleHandler">
281281
<!--Description-->
282282
<gl-form-group :label="$options.i18n.description" label-for="schedule-description">
283283
<gl-form-input
@@ -344,10 +344,10 @@ export default {
344344
</gl-form-checkbox>
345345
<div class="gl-flex gl-flex-wrap gl-gap-3">
346346
<gl-button
347+
type="submit"
347348
variant="confirm"
348349
data-testid="schedule-submit-button"
349350
class="gl-w-full sm:gl-w-auto"
350-
@click="scheduleHandler"
351351
>
352352
{{ buttonText }}
353353
</gl-button>

app/assets/javascripts/diffs/components/diffs_file_tree.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script>
2-
// eslint-disable-next-line no-restricted-imports
3-
import { mapMutations } from 'vuex';
42
import { debounce } from 'lodash';
3+
import { mapActions } from 'pinia';
54
import PanelResizer from '~/vue_shared/components/panel_resizer.vue';
65
import { getCookie, setCookie } from '~/lib/utils/common_utils';
76
import * as types from '~/diffs/store/mutation_types';
7+
import { useLegacyDiffs } from '~/diffs/stores/legacy_diffs';
88
import {
99
INITIAL_TREE_WIDTH,
1010
MIN_TREE_WIDTH,
@@ -65,7 +65,7 @@ export default {
6565
},
6666
},
6767
methods: {
68-
...mapMutations('diffs', {
68+
...mapActions(useLegacyDiffs, {
6969
setCurrentDiffFile: types.SET_CURRENT_DIFF_FILE,
7070
}),
7171
onFileClick(file) {

0 commit comments

Comments
 (0)