Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot
2023-08-12 00:10:38 +00:00
parent 23790cda2b
commit e57da6ba89
121 changed files with 450 additions and 1166 deletions

7
.gitignore vendored
View File

@ -106,10 +106,3 @@ tags.lock
tags.temp
.stylelintcache
.solargraph.yml
# Vite Ruby
/public/vite*
# Vite uses dotenv and suggests to ignore local-only env files. See
# https://vitejs.dev/guide/env-and-mode.html#env-files
*.local

View File

@ -11,7 +11,6 @@
# https://github.com/browserslist/browserslist/blob/a287ec6/node.js#L367-L384
BROWSERSLIST_IGNORE_OLD_DATA: "true"
WEBPACK_COMPILE_LOG_PATH: "tmp/webpack-output.log"
VITE_RUBY_SKIP_ASSETS_PRECOMPILE_EXTENSION: "true"
stage: prepare
needs: []
script:

View File

@ -19,8 +19,6 @@ gem 'rails', '~> 7.0.6'
gem 'activerecord-gitlab', path: 'gems/activerecord-gitlab'
gem 'vite_rails'
gem 'bootsnap', '~> 1.16.0', require: false
gem 'openssl', '~> 3.0'

View File

@ -125,7 +125,6 @@
{"name":"doorkeeper","version":"5.6.6","platform":"ruby","checksum":"2344e86c77770526efcda893b5217aa13d1c7eb1b40de840b58b19eb1ff757e0"},
{"name":"doorkeeper-openid_connect","version":"1.8.7","platform":"ruby","checksum":"71edaf33118deefe25674ba3f8280c32835f057351f70e9beb222c0fd6b8e786"},
{"name":"dotenv","version":"2.7.6","platform":"ruby","checksum":"2451ed5e8e43776d7a787e51d6f8903b98e446146c7ad143d5678cc2c409d547"},
{"name":"dry-cli","version":"1.0.0","platform":"ruby","checksum":"28ead169f872954dd08910eb8ead59cf86cd18b4aab321e8eeefe945749569f0"},
{"name":"dry-core","version":"1.0.0","platform":"ruby","checksum":"7a92099870967f0d2c9997950608cb8bb622dafeea20b2fe1dd49e9ba1d0f305"},
{"name":"dry-inflector","version":"1.0.0","platform":"ruby","checksum":"6ad22361ca2d6f3f001ae3037ffcfea01163f644280d13a9195d3c3a94dd1626"},
{"name":"dry-logic","version":"1.5.0","platform":"ruby","checksum":"99ed2180f1970c3d8247004f277a01dffbe8e82cf6680de9c7209312d86cd416"},
@ -676,8 +675,6 @@
{"name":"version_sorter","version":"2.3.0","platform":"ruby","checksum":"2147f2a1a3804fbb8f60d268b7d7c1ec717e6dd727ffe2c165b4e05e82efe1da"},
{"name":"view_component","version":"3.2.0","platform":"ruby","checksum":"1dfaa85e13b5393f30b60bd3a03348b5298240a13137985d71eb2b8cc94c4c22"},
{"name":"virtus","version":"2.0.0","platform":"ruby","checksum":"8841dae4eb7fcc097320ba5ea516bf1839e5d056c61ee27138aa4bddd6e3d1c2"},
{"name":"vite_rails","version":"3.0.15","platform":"ruby","checksum":"b8ec528aedf7e24b54f222b449cd9250810ea2456d5f8dd4ef87f06b475cf860"},
{"name":"vite_ruby","version":"3.3.4","platform":"ruby","checksum":"025e438385a6dc2320c8c148dff453f5bb1d4f056ce69c3386f47d4c388ad80c"},
{"name":"vmstat","version":"2.3.0","platform":"ruby","checksum":"ab5446a3e3bd0a9cdb9d9ac69a0bbd119c4f161d945a0846a519dd7018af656d"},
{"name":"warden","version":"1.2.9","platform":"ruby","checksum":"46684f885d35a69dbb883deabf85a222c8e427a957804719e143005df7a1efd0"},
{"name":"warning","version":"1.3.0","platform":"ruby","checksum":"23695a5d8e50bd5c46068931b529bee0b28e4982cbcefbe77d867800dde8069e"},

View File

@ -459,7 +459,6 @@ GEM
doorkeeper (>= 5.5, < 5.7)
jwt (>= 2.5)
dotenv (2.7.6)
dry-cli (1.0.0)
dry-core (1.0.0)
concurrent-ruby (~> 1.0)
zeitwerk (~> 2.6)
@ -1673,13 +1672,6 @@ GEM
axiom-types (~> 0.1)
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
vite_rails (3.0.15)
railties (>= 5.1, < 8)
vite_ruby (~> 3.0, >= 3.2.2)
vite_ruby (3.3.4)
dry-cli (>= 0.7, < 2)
rack-proxy (~> 0.6, >= 0.6.1)
zeitwerk (~> 2.2)
vmstat (2.3.0)
warden (1.2.9)
rack (>= 2.0.9)
@ -2037,7 +2029,6 @@ DEPENDENCIES
validates_hostname (~> 1.0.11)
version_sorter (~> 2.3)
view_component (~> 3.2.0)
vite_rails
vmstat (~> 2.3.0)
warning (~> 1.3.0)
webauthn (~> 3.0)

View File

@ -68,11 +68,7 @@ export default {
</gl-link>
</template>
<template #left-secondary>
<abuse-category
:category="report.category"
class="gl-mt-2 gl-mb-3"
data-testid="abuse-report-category"
/>
<abuse-category :category="report.category" class="gl-mt-2 gl-mb-3" />
</template>
<template #right-secondary>

View File

@ -550,7 +550,6 @@ export default {
variant="confirm"
category="secondary"
class="gl-ml-3 js-no-auto-disable"
data-testid="integration-form-test-and-submit"
data-qa-selector="save_and_create_alert_button"
@click="submit(true)"
>

View File

@ -396,7 +396,7 @@ export default {
/>
</gl-tab>
<gl-tab :title="$options.i18n.settingsTabs.integrationSettings">
<alerts-form class="gl-pt-3" data-testid="alert-integration-settings-tab" />
<alerts-form class="gl-pt-3" />
</gl-tab>
</gl-tabs>
</template>

View File

@ -218,11 +218,11 @@ export default {
<span data-testid="vsa-stage-header-duration">{{ data.label }}</span>
</template>
<template #head(end_event)="data">
<span data-testid="vsa-stage-header-last-event">{{ data.label }}</span>
<span>{{ data.label }}</span>
</template>
<template #cell(title)="{ item }">
<div data-testid="vsa-stage-event">
<div v-if="item.id" data-testid="vsa-stage-content">
<div v-if="item.id">
<p class="gl-m-0">
<gl-link
data-testid="vsa-stage-event-link"
@ -240,15 +240,10 @@ export default {
<span class="icon-branch gl-text-gray-400">
<gl-icon name="commit" :size="14" />
</span>
<gl-link
class="commit-sha"
:href="item.commitUrl"
data-testid="vsa-stage-event-build-sha"
>{{ item.shortSha }}</gl-link
>
<gl-link class="commit-sha" :href="item.commitUrl">{{ item.shortSha }}</gl-link>
</p>
<p class="gl-m-0">
<span data-testid="vsa-stage-event-build-author-and-date">
<span>
<gl-link class="gl-text-black-normal" :href="item.url">{{ item.date }}</gl-link>
{{ s__('ByAuthor|by') }}
<gl-link
@ -259,7 +254,7 @@ export default {
</span>
</p>
</div>
<div v-else data-testid="vsa-stage-content">
<div v-else>
<h5 class="gl-font-weight-bold gl-my-1" data-testid="vsa-stage-event-title">
<gl-link class="gl-text-black-normal" :href="item.url">{{ itemTitle(item) }}</gl-link>
</h5>

View File

@ -9,7 +9,7 @@ const GROUP_ALL_MEMBERS_PATH = '/api/:version/groups/:id/members/all';
const DESCENDANT_GROUPS_PATH = '/api/:version/groups/:id/descendant_groups';
const GROUP_TRANSFER_LOCATIONS_PATH = 'api/:version/groups/:id/transfer_locations';
const axiosGet = (url, query, options, callback) => {
const axiosGet = (url, query, options, callback, axiosOptions = {}) => {
return axios
.get(url, {
params: {
@ -17,6 +17,7 @@ const axiosGet = (url, query, options, callback) => {
per_page: DEFAULT_PER_PAGE,
...options,
},
...axiosOptions,
})
.then(({ data, headers }) => {
callback(data);
@ -25,14 +26,20 @@ const axiosGet = (url, query, options, callback) => {
});
};
export function getGroups(query, options, callback = () => {}) {
export function getGroups(query, options, callback = () => {}, axiosOptions = {}) {
const url = buildApiUrl(GROUPS_PATH);
return axiosGet(url, query, options, callback);
return axiosGet(url, query, options, callback, axiosOptions);
}
export function getDescendentGroups(parentGroupId, query, options, callback = () => {}) {
export function getDescendentGroups(
parentGroupId,
query,
options,
callback = () => {},
axiosOptions = {},
) {
const url = buildApiUrl(DESCENDANT_GROUPS_PATH.replace(':id', parentGroupId));
return axiosGet(url, query, options, callback);
return axiosGet(url, query, options, callback, axiosOptions);
}
export function updateGroup(groupId, data = {}) {

View File

@ -110,11 +110,7 @@ export default {
<div v-if="addFormVisible" class="gl-new-card-add-form gl-m-5">
<h4 class="gl-mt-0">{{ $options.i18n.addFormTitle }}</h4>
<badge-form
:is-editing="false"
data-testid="add-new-badge"
@close-add-form="closeAddForm"
/>
<badge-form :is-editing="false" @close-add-form="closeAddForm" />
</div>
<badge-list />

View File

@ -306,7 +306,7 @@ export default {
</span>
<span class="board-info-items gl-mt-3 gl-display-inline-block">
<span v-if="shouldRenderEpicCountables" data-testid="epic-countables">
<gl-tooltip :target="() => $refs.countBadge" data-testid="epic-countables-tooltip">
<gl-tooltip :target="() => $refs.countBadge">
<p v-if="allowSubEpics" class="gl-font-weight-bold gl-m-0">
{{ __('Epics') }} &#8226;
<span class="gl-font-weight-normal">

View File

@ -107,7 +107,6 @@ export default {
v-if="glFeatures.ciJobAssistantDrawer"
icon="bulb"
size="small"
data-testid="job-assistant-drawer-toggle"
data-qa-selector="job_assistant_drawer_toggle"
@click="toggleJobAssistantDrawer"
>

View File

@ -201,7 +201,6 @@ export default {
:title="$options.i18n.pipelineSourceTooltip"
:toggle-text="$options.i18n.pipelineSourceDefault"
disabled
data-testid="pipeline-source"
/>
<validate-pipeline-popover />
<gl-icon

View File

@ -476,7 +476,6 @@ export default {
<gl-dropdown-item
v-for="option in configVariablesWithDescription.options[variable.key]"
:key="option"
data-testid="pipeline-form-ci-variable-value-dropdown-items"
data-qa-selector="ci_variable_value_dropdown_item"
@click="setVariableAttribute(variable.key, 'value', option)"
>

View File

@ -185,10 +185,7 @@ export default {
<div class="media">
<status-icon :status="statusIconName" :size="24" class="align-self-center" />
<div class="media-body gl-display-flex gl-align-items-flex-start gl-flex-direction-row!">
<div
data-testid="report-section-code-text"
class="js-code-text code-text gl-align-self-center gl-flex-grow-1"
>
<div class="js-code-text code-text gl-align-self-center gl-flex-grow-1">
<div class="gl-display-flex gl-align-items-center">
<p class="gl-line-height-normal gl-m-0">{{ headerText }}</p>
<slot :name="slotName"></slot>

View File

@ -48,7 +48,6 @@ export default {
category="secondary"
icon="doc-text"
:aria-label="$options.i18n.metadataLabel"
data-testid="metadata-button"
@click="selectSecureFile()"
/>
</template>

View File

@ -147,7 +147,6 @@ export default {
<template v-if="confirmCleanup">
<gl-button
:disabled="!canSubmit"
data-testid="remove-integration-and-resources-modal-button"
variant="danger"
category="primary"
@click="handleSubmit(true)"

View File

@ -51,11 +51,11 @@ export default {
class="gl-border-0 gl-outline-0! gl-p-0 gl-bg-transparent"
:aria-label="statusConfig.label"
>
<gl-badge :variant="statusConfig.variant" size="md" data-testid="signature-status">
<gl-badge :variant="statusConfig.variant" size="md">
{{ statusConfig.label }}
</gl-badge>
</button>
<gl-popover target="signature" triggers="focus" data-testid="signature-info">
<gl-popover target="signature" triggers="focus">
<template #title>
{{ statusConfig.title }}
</template>

View File

@ -231,7 +231,6 @@ export default {
<gl-button
v-if="canAdminCrmContact"
v-gl-tooltip.hover.bottom="$options.i18n.editButtonLabel"
data-testid="edit-contact-button"
icon="pencil"
:aria-label="$options.i18n.editButtonLabel"
/>

View File

@ -226,7 +226,6 @@ export default {
<gl-button
v-if="canAdminCrmOrganization"
v-gl-tooltip.hover.bottom="$options.i18n.editButtonLabel"
data-testid="edit-organization-button"
icon="pencil"
:aria-label="$options.i18n.editButtonLabel"
/>

View File

@ -125,7 +125,7 @@ export default {
<dt>
{{ __('MD5') }}
</dt>
<dd class="fingerprint" data-testid="key-md5-fingerprint-content">
<dd class="fingerprint">
{{ deployKey.fingerprint }}
</dd>
</template>

View File

@ -312,7 +312,6 @@ export default {
icon="ellipsis_v"
category="tertiary"
data-qa-selector="design_discussion_actions_ellipsis_dropdown"
data-testid="more-actions-dropdown"
text-sr-only
:title="$options.i18n.moreActionsLabel"
:aria-label="$options.i18n.moreActionsLabel"

View File

@ -1 +0,0 @@
import '../jira_connect/subscriptions';

View File

@ -1,6 +0,0 @@
import '../main';
import { runModules } from '~/run_modules';
const modules = import.meta.glob('../pages/**/index.js');
runModules(modules, '../pages/');

View File

@ -1,5 +0,0 @@
import { runModules } from '~/run_modules';
const modules = import.meta.glob('../../../../ee/app/assets/javascripts/pages/**/index.js');
runModules(modules, '../../../../ee/app/assets/javascripts/pages/');

View File

@ -1,5 +0,0 @@
import { runModules } from '~/run_modules';
const modules = import.meta.glob('../../../../jh/app/assets/javascripts/pages/**/index.js');
runModules(modules, '../../../../jh/app/assets/javascripts/pages/');

View File

@ -1 +0,0 @@
import '../performance_bar';

View File

@ -1 +0,0 @@
import './behaviors/redirect_listbox';

View File

@ -1 +0,0 @@
import '../lib/mermaid';

View File

@ -1 +0,0 @@
import '../sentry/index';

View File

@ -250,7 +250,6 @@ export default {
v-if="canSetupReviewApp"
v-model="isReviewAppModalVisible"
:modal-id="$options.modalId"
data-testid="enable-review-app-modal"
/>
<stop-stale-environments-modal
v-if="canCleanUpEnvs"

View File

@ -107,7 +107,6 @@ export default {
v-if="isRollbackAvailable"
v-gl-modal.confirm-rollback-modal
v-gl-tooltip
data-testid="rollback-button"
:title="rollbackButtonTitle"
:icon="rollbackIcon"
:aria-label="rollbackButtonTitle"

View File

@ -154,7 +154,6 @@ export default {
variant="confirm"
category="tertiary"
class="gl-mb-3"
data-testid="ff-new-list-button"
>
{{ s__('FeatureFlags|View user lists') }}
</gl-button>
@ -183,10 +182,7 @@ export default {
class="gl-display-flex gl-align-items-baseline gl-flex-direction-row gl-justify-content-space-between gl-mt-6"
>
<div class="gl-display-flex gl-align-items-center">
<h2
data-testid="feature-flags-tab-title"
class="page-title gl-font-size-h-display gl-my-0"
>
<h2 class="page-title gl-font-size-h-display gl-my-0">
{{ s__('FeatureFlags|Feature flags') }}
</h2>
<gl-badge v-if="count" class="gl-ml-4">{{ count }}</gl-badge>
@ -240,7 +236,6 @@ export default {
'FeatureFlags|Feature flags allow you to configure your code into different flavors by dynamically toggling certain functionality.',
)
"
data-testid="feature-flags-tab"
@dismissAlert="clearAlert"
>
<feature-flags-table :feature-flags="featureFlags" @toggle-flag="toggleFeatureFlag" />

View File

@ -181,7 +181,6 @@ export default {
<gl-dropdown-item
v-for="group in groups"
:key="`${group.id}${group.name}`"
data-testid="group-dropdown-item"
:avatar-url="group.avatar_url"
is-check-item
:is-checked="isSelected(group)"

View File

@ -447,7 +447,6 @@ export default {
:issue-iid="item.iid"
:project-path="projectPath"
:sla-due-at="item.slaDueAt"
data-testid="incident-sla"
class="gl-display-block gl-max-w-full gl-text-truncate"
/>
</template>

View File

@ -1,5 +1,6 @@
<script>
import { GlAvatarLabeled, GlCollapsibleListbox } from '@gitlab/ui';
import axios from 'axios';
import { debounce } from 'lodash';
import { s__ } from '~/locale';
import { getGroups, getDescendentGroups } from '~/rest_api';
@ -42,6 +43,7 @@ export default {
searchTerm: '',
pagination: {},
infiniteScrollLoading: false,
activeApiRequestAbortController: null,
};
},
computed: {
@ -61,15 +63,13 @@ export default {
methods: {
retrieveGroups: debounce(async function debouncedRetrieveGroups() {
this.isFetching = true;
try {
const response = await this.fetchGroups();
this.pagination = this.processPagination(response);
this.groups = this.processGroups(response);
} catch {
this.onApiError();
} finally {
this.isFetching = false;
} catch (e) {
this.onApiError(e);
}
}, SEARCH_DELAY),
processGroups({ data }) {
@ -98,16 +98,32 @@ export default {
this.retrieveGroups();
},
fetchGroups(options = {}) {
if (this.activeApiRequestAbortController !== null) {
this.activeApiRequestAbortController.abort();
}
this.activeApiRequestAbortController = new AbortController();
const combinedOptions = {
...this.$options.defaultFetchOptions,
...options,
};
const axiosConfig = {
signal: this.activeApiRequestAbortController.signal,
};
switch (this.groupsFilter) {
case GROUP_FILTERS.DESCENDANT_GROUPS:
return getDescendentGroups(this.parentGroupId, this.searchTerm, combinedOptions);
return getDescendentGroups(
this.parentGroupId,
this.searchTerm,
combinedOptions,
undefined,
axiosConfig,
);
default:
return getGroups(this.searchTerm, combinedOptions);
return getGroups(this.searchTerm, combinedOptions, undefined, axiosConfig);
}
},
async onBottomReached() {
@ -117,13 +133,15 @@ export default {
const response = await this.fetchGroups({ page: this.pagination.page + 1 });
this.pagination = this.processPagination(response);
this.groups.push(...this.processGroups(response));
} catch {
this.onApiError();
} finally {
this.infiniteScrollLoading = false;
} catch (e) {
this.onApiError(e);
}
},
onApiError() {
onApiError(error) {
if (axios.isCancel(error)) return;
this.isFetching = false;
this.infiniteScrollLoading = false;
this.$emit('error', this.$options.i18n.errorMessage);
},
},

View File

@ -270,7 +270,6 @@ export default {
v-if="showSaveAndAdd"
variant="confirm"
category="secondary"
data-testid="save-and-add-button"
:disabled="!isTimelineTextValid"
:loading="isEventProcessed"
@click="handleSave(true)"

View File

@ -76,7 +76,7 @@ export default {
>
<gl-icon :name="getEventIcon(action)" class="note-icon" />
</div>
<div class="timeline-event-note timeline-event-border" data-testid="event-text-container">
<div class="timeline-event-note timeline-event-border">
<div class="gl-display-flex gl-flex-wrap gl-align-items-center gl-gap-3 gl-mb-2">
<h3
class="timeline-event-note-date gl-font-weight-bold gl-font-sm gl-my-0"

View File

@ -203,7 +203,7 @@ export default {
<template>
<gl-loading-icon v-if="$apollo.queries.variables.loading" class="gl-mt-9" size="lg" />
<div v-else class="row gl-justify-content-center">
<div class="col-10" data-testid="manual-vars-form">
<div class="col-10">
<label>{{ $options.i18n.header }}</label>
<div

View File

@ -5,11 +5,10 @@ import { joinPaths } from '~/lib/utils/url_utility';
* See https://gitlab.com/gitlab-org/gitlab/-/issues/321656 for a fix
*/
export function resetServiceWorkersPublicPath() {
// No-op if we're running Vite instead of Webpack
if (typeof __webpack_public_path__ === 'undefined') return; // eslint-disable-line camelcase
// __webpack_public_path__ is a global variable that can be used to adjust
// the webpack publicPath setting at runtime.
// see: https://webpack.js.org/guides/public-path/
const relativeRootPath = (gon && gon.relative_url_root) || '';
__webpack_public_path__ = joinPaths(relativeRootPath, '/assets/webpack/'); // eslint-disable-line camelcase
const webpackAssetPath = joinPaths(relativeRootPath, '/assets/webpack/');
__webpack_public_path__ = webpackAssetPath; // eslint-disable-line camelcase
}

View File

@ -103,7 +103,6 @@ export default {
:title="actionText"
:visible="removeMemberModalVisible"
data-qa-selector="remove_member_modal"
data-testid="remove-member-modal-content"
@primary="submitForm"
@hide="hideRemoveMemberModal"
>

View File

@ -71,12 +71,7 @@ export default {
class="gl-new-dropdown-item-text-wrapper gl-display-flex! gl-justify-content-space-between gl-align-items-center gl-py-2!"
>
{{ $options.i18n.toggleMenuItemLabel }}
<gl-toggle
:value="isEnabled"
:label="$options.i18n.toggleLabel"
label-position="hidden"
data-testid="new-navigation-toggle"
/>
<gl-toggle :value="isEnabled" :label="$options.i18n.toggleLabel" label-position="hidden" />
</div>
</div>
</gl-disclosure-dropdown-item>

View File

@ -12,7 +12,7 @@ export default {
</script>
<template>
<div class="issuable-note-warning" data-testid="attachment-warning">
<div class="issuable-note-warning">
{{ message }}
</div>
</template>

View File

@ -55,7 +55,7 @@ export default {
</script>
<template>
<div class="issuable-note-warning" data-testid="email-participants-warning">
<div class="issuable-note-warning">
<gl-sprintf :message="message">
<template #andMore>
<button type="button" class="gl-button btn-link" @click="showMoreParticipants">

View File

@ -37,7 +37,6 @@ export default {
is-check-item
:is-checked="isActive"
:class="{ 'is-active': isActive }"
data-testid="notification-item"
@click="$emit('item-selected', level)"
>
<div class="gl-display-flex gl-flex-direction-column">

View File

@ -160,11 +160,7 @@ export default {
<template>
<div>
<gl-alert
v-if="showDeleteCacheAlert"
data-testid="delete-cache-alert"
@dismiss="showDeleteCacheAlert = false"
>
<gl-alert v-if="showDeleteCacheAlert" @dismiss="showDeleteCacheAlert = false">
{{ deleteCacheAlertMessage }}
</gl-alert>
<title-area :title="$options.i18n.pageTitle">

View File

@ -344,7 +344,7 @@ export default {
</div>
</div>
<div class="row" data-testid="wiki-form-content-fieldset">
<div class="row">
<div class="col-sm-12 row-sm-5">
<gl-form-group>
<markdown-editor

View File

@ -171,7 +171,7 @@ export default {
sprintf(__('%{duration}ms'), { duration: item.duration })
}}</span>
</td>
<td data-testid="performance-item-content">
<td>
<div>
<div
v-for="(key, keyIndex) in keys"

View File

@ -177,7 +177,6 @@ export default {
<gl-form-group
:invalid-feedback="$options.i18n.fieldRequiredFeedback"
:label="$options.i18n.commitMessageLabel"
data-testid="commit_message_group"
label-for="commit_message"
>
<gl-form-textarea
@ -192,7 +191,6 @@ export default {
<gl-form-group
:invalid-feedback="$options.i18n.fieldRequiredFeedback"
:label="$options.i18n.branchSelectorLabel"
data-testid="branch_selector_group"
label-for="branch"
>
<ref-selector id="branch" v-model="branch" :project-id="projectPath" data-testid="branch" />

View File

@ -105,7 +105,7 @@ export default {
</script>
<template>
<div data-testid="text-widget">
<div>
<gl-form-group
:description="description"
:invalid-feedback="invalidFeedbackMessage"

View File

@ -80,7 +80,6 @@ export default {
:is-merge-train="isMergeTrain"
:stages="stages"
:update-dropdown="updateDropdown"
data-testid="pipeline-stages"
@miniGraphStageClick="$emit('miniGraphStageClick')"
/>
<gl-icon

View File

@ -38,7 +38,7 @@ export default {
};
</script>
<template>
<div data-testid="pipeline-stages" class="gl-display-inline gl-vertical-align-middle">
<div class="gl-display-inline gl-vertical-align-middle">
<div
v-for="stage in stages"
:key="stage.name"

View File

@ -97,10 +97,7 @@ export default {
{{ $options.i18n.uploadNewAvatar }}
</h5>
<div class="gl-display-flex gl-align-items-center gl-my-3">
<gl-button
class="js-choose-user-avatar-button"
data-testid="select-avatar-trigger-button"
>
<gl-button class="js-choose-user-avatar-button">
{{ $options.i18n.chooseFile }}
</gl-button>
<span class="gl-ml-3 js-avatar-filename">{{ $options.i18n.noFileChosen }}</span>

View File

@ -100,10 +100,10 @@ export default {
<template #modal-title>{{ $options.i18n.title }}</template>
<div>
<gl-alert class="gl-mb-5" variant="danger" :dismissible="false">
<h4 v-if="isFork" data-testid="delete-alert-title" class="gl-alert-title">
<h4 v-if="isFork" class="gl-alert-title">
{{ $options.i18n.isForkAlertTitle }}
</h4>
<h4 v-else data-testid="delete-alert-title" class="gl-alert-title">
<h4 v-else class="gl-alert-title">
{{ $options.i18n.isNotForkAlertTitle }}
</h4>
<ul>
@ -130,16 +130,8 @@ export default {
</gl-sprintf>
</li>
</ul>
<gl-sprintf
v-if="isFork"
data-testid="delete-alert-body"
:message="$options.i18n.isForkAlertBody"
/>
<gl-sprintf
v-else
data-testid="delete-alert-body"
:message="$options.i18n.isNotForkAlertBody"
>
<gl-sprintf v-if="isFork" :message="$options.i18n.isForkAlertBody" />
<gl-sprintf v-else :message="$options.i18n.isNotForkAlertBody">
<template #strong="{ content }">
<strong>{{ content }}</strong>
</template>

View File

@ -95,7 +95,6 @@ export default {
:state="!showTagNameValidationError"
:invalid-feedback="tagFeedback"
optional
data-testid="tag-name-field"
>
<gl-dropdown
:id="id"

View File

@ -225,7 +225,6 @@ export default {
<gl-modal
:ref="modalId"
v-bind="$attrs"
data-testid="modal-delete"
:modal-id="modalId"
:title="title"
:action-primary="primaryOptions"

View File

@ -1,9 +0,0 @@
export const runModules = (modules, prefix) => {
document
.querySelector('meta[name="controller-path"]')
.content.split('/')
.forEach((part, index, arr) => {
const path = `${prefix}${[...arr.slice(0, index), part].join('/')}/index.js`;
modules[path]?.();
});
};

View File

@ -247,15 +247,10 @@ export default {
<gl-form-checkbox-group v-model="selectedFilters">
<label-dropdown-items
v-if="hasSelectedLabels"
data-testid="selected-lavel-items"
:labels="filteredAppliedSelectedLabels"
/>
<gl-dropdown-divider v-if="hasSelectedLabels && hasUnselectedLabels" />
<label-dropdown-items
v-if="hasUnselectedLabels"
data-testid="unselected-lavel-items"
:labels="filteredUnselectedLabels"
/>
<label-dropdown-items v-if="hasUnselectedLabels" :labels="filteredUnselectedLabels" />
</gl-form-checkbox-group>
</gl-dropdown-form>
</div>

View File

@ -182,7 +182,7 @@ export default {
<section-layout class="gl-border-b-0" :heading="$options.i18n.securityTesting">
<template #description>
<p>
<span data-testid="latest-pipeline-info-security">
<span>
<gl-sprintf
v-if="latestPipelinePath"
:message="$options.i18n.latestPipelineDescription"

View File

@ -49,7 +49,7 @@ export default {
<div>
<collapsed-assignee-list :users="sortedAssigness" :issuable-type="issuableType" />
<div data-testid="expanded-assignee" class="value hide-collapsed">
<div class="value hide-collapsed">
<span v-if="hasNoUsers" class="no-value" data-testid="no-value">
{{ __('None') }}
<template v-if="editable">

View File

@ -262,7 +262,6 @@ export default {
type="submit"
variant="confirm"
data-qa-selector="submit_button"
data-testid="snippet-submit-btn"
:disabled="isUpdating"
>{{ saveButtonLabel }}</gl-button
>

View File

@ -295,7 +295,6 @@ export default {
role="search"
:aria-label="searchPlaceholder"
class="gl-relative gl-rounded-base gl-w-full gl-pb-0"
data-testid="global-search-form"
>
<div class="gl-relative gl-bg-white gl-border-b gl-mb-n1 gl-p-3">
<gl-search-box-by-type
@ -350,7 +349,6 @@ export default {
</span>
<div
ref="resultsList"
data-testid="global-search-results"
class="global-search-results gl-overflow-y-auto gl-w-full gl-pb-3"
@keydown="onKeydown"
>

View File

@ -60,7 +60,6 @@ export default {
v-model="searchTerm"
:placeholder="$options.i18n.searchPlaceholder"
class="gl-pr-3"
data-testid="tag-search"
@submit="visitUrlFromOption(selectedKey)"
/>
<gl-collapsible-listbox

View File

@ -83,7 +83,6 @@ terraform init \\
:title="$options.i18n.copyToClipboardText"
:text="getModalInfoCopyStr()"
:modal-id="$options.modalId"
data-testid="init-command-copy-clipboard"
css-classes="gl-align-self-start gl-ml-2"
/>
</div>

View File

@ -133,7 +133,6 @@ export default {
:href="$options.usageQuotasHelpPaths.usageQuotas"
target="_blank"
:aria-label="helpLinkAriaLabel($options.USAGE_QUOTAS_LABEL)"
data-testid="usage-quotas-help-link"
>{{ $options.LEARN_MORE_LABEL }}</gl-link
>
</p>

View File

@ -55,7 +55,6 @@ export default {
<gl-modal
v-bind="$options.modalOptions"
:visible="visible"
data-testid="add-users-modal"
@primary="submitUsers"
@canceled="clearInput"
>

View File

@ -49,11 +49,7 @@ export default {
};
</script>
<template>
<mr-collapsible-extension
v-if="showCollapsedDeployments"
:title="__('View all environments.')"
data-testid="mr-collapsed-deployments"
>
<mr-collapsible-extension v-if="showCollapsedDeployments" :title="__('View all environments.')">
<template #header>
<div class="gl-mr-3 gl-line-height-normal">
<gl-sprintf :message="multipleDeploymentsTitle">

View File

@ -149,7 +149,6 @@ export default {
:has-error="hasError"
:content="expandedData"
:loading-text="$options.i18n.loading"
data-testid="new-cq-widget"
:summary="summary"
:widget-name="$options.name"
:status-icon-name="statusIcon"

View File

@ -545,7 +545,6 @@ export default {
</header>
<mr-widget-suggest-pipeline
v-if="shouldSuggestPipelines"
data-testid="mr-suggest-pipeline"
class="mr-widget-workflow"
:pipeline-path="mr.mergeRequestAddCiConfigPath"
:pipeline-svg-path="mr.pipelinesEmptySvgPath"

View File

@ -283,7 +283,6 @@ export default {
<gl-disclosure-dropdown-item
v-if="isOpen && canUpdateMergeRequest"
data-testid="close-merge-request"
@action="stateAction('close')"
>
<template #list-item>

View File

@ -69,7 +69,7 @@ export default {
};
</script>
<template>
<div class="issuable-note-warning" data-testid="confidential-warning">
<div class="issuable-note-warning">
<gl-icon v-if="!isLockedAndConfidential" :name="warningIcon" :size="16" class="icon inline" />
<span v-if="isLockedAndConfidential" ref="lockedAndConfidential">

View File

@ -41,6 +41,9 @@ export default {
created() {
this.recalculateMetadataSlots();
},
updated() {
this.recalculateMetadataSlots();
},
methods: {
recalculateMetadataSlots() {
const METADATA_PREFIX = 'metadata-';

View File

@ -107,7 +107,6 @@ export default {
<template>
<gl-button
v-if="!feature.configured"
data-testid="configure-via-mr-button"
:loading="isLoading"
:variant="variant"
:category="category"

View File

@ -7,7 +7,6 @@
* e.g. the `window` scope, because it needs to be executed in the scope of webpack.
*/
// eslint-disable-next-line camelcase
if (gon && gon.webpack_public_path && typeof __webpack_public_path__ !== 'undefined') {
if (gon && gon.webpack_public_path) {
__webpack_public_path__ = gon.webpack_public_path; // eslint-disable-line camelcase
}

View File

@ -219,7 +219,6 @@ export default {
ref="startDatePicker"
v-model="dirtyStartDate"
container="body"
data-testid="work-item-start-date-picker"
:disabled="isDatepickerDisabled"
:input-id="$options.startDateInputId"
show-clear-button
@ -250,7 +249,6 @@ export default {
ref="dueDatePicker"
v-model="dirtyDueDate"
container="body"
data-testid="work-item-due-date-picker"
:disabled="isDatepickerDisabled"
:input-id="$options.dueDateInputId"
:min-date="dirtyStartDate"

View File

@ -91,12 +91,10 @@
.prioritized-labels:not(.is-not-draggable) & {
cursor: grab;
border: 1px solid transparent;
&:hover,
&:focus-within {
background-color: $white;
border-color: $gray-50;
background-color: $blue-50;
}
&:active {

View File

@ -115,24 +115,6 @@ class ApplicationController < ActionController::Base
content_security_policy do |p|
next if p.directives.blank?
if Rails.env.development? && Feature.enabled?(:vite)
vite_host = ViteRuby.instance.config.host
vite_port = ViteRuby.instance.config.port
vite_origin = "#{vite_host}:#{vite_port}"
http_origin = "http://#{vite_origin}"
ws_origin = "ws://#{vite_origin}"
wss_origin = "wss://#{vite_origin}"
gitlab_ws_origin = Gitlab::Utils.append_path(Gitlab.config.gitlab.url, 'vite-dev/')
http_path = Gitlab::Utils.append_path(http_origin, 'vite-dev/')
connect_sources = p.directives['connect-src']
p.connect_src(*(Array.wrap(connect_sources) | [ws_origin, wss_origin, http_path]))
worker_sources = p.directives['worker-src']
p.worker_src(*(Array.wrap(worker_sources) | [gitlab_ws_origin, http_path]))
end
next unless Gitlab::CurrentSettings.snowplow_enabled? && !Gitlab::CurrentSettings.snowplow_collector_hostname.blank?
default_connect_src = p.directives['connect-src'] || p.directives['default-src']

View File

@ -485,15 +485,6 @@ module ApplicationHelper
end
end
def controller_full_path
action = case controller.action_name
when 'create' then 'new'
when 'update' then 'edit'
else controller.action_name
end
"#{controller.controller_path}/#{action}"
end
private
def browser_id

View File

@ -1,29 +0,0 @@
# frozen_string_literal: true
module ViteHelper
def universal_javascript_include_tag(*args)
if vite_enabled
vite_javascript_tag(*args)
else
javascript_include_tag(*args)
end
end
def universal_asset_path(*args)
if vite_enabled
vite_asset_path(*args)
else
asset_path(*args)
end
end
private
def vite_enabled
Feature.enabled?(:vite) && !Rails.env.test? && vite_running
end
def vite_running
ViteRuby.instance.dev_server_running?
end
end

View File

@ -1,8 +1,6 @@
# frozen_string_literal: true
module WebpackHelper
include ViteHelper
def prefetch_link_tag(source)
href = asset_path(source)
@ -16,12 +14,8 @@ module WebpackHelper
end
def webpack_bundle_tag(bundle)
if vite_running
vite_javascript_tag bundle
else
javascript_include_tag(*webpack_entrypoint_paths(bundle))
end
end
def webpack_preload_asset_tag(asset, options = {})
path = Gitlab::Webpack::Manifest.asset_paths(asset).first
@ -38,8 +32,6 @@ module WebpackHelper
end
def webpack_controller_bundle_tags
return if Feature.enabled?(:vite) && !Rails.env.test?
chunks = []
action = case controller.action_name

View File

@ -67,7 +67,7 @@ module Ci
.for_ref(pipeline.ref)
.where_not_sha(project.commit(pipeline.ref).try(:id))
.where("created_at < ?", pipeline.created_at)
.for_status(CommitStatus::AVAILABLE_STATUSES)
.for_status(CommitStatus::AVAILABLE_STATUSES) # Force usage of project_id_and_status_and_created_at_index
.ci_sources
scope = scope.id_in(ids) if ids.present?

View File

@ -48,16 +48,6 @@
= webpack_bundle_tag 'legacy_sentry'
= webpack_bundle_tag 'performance_bar' if performance_bar_enabled?
- if vite_enabled
%meta{ name: 'controller-path', content: controller_full_path }
- if Rails.env.development?
= vite_client_tag
= vite_javascript_tag "main"
- if Gitlab.ee?
= vite_javascript_tag "main_ee"
- if Gitlab.jh?
= vite_javascript_tag "main_jh"
= yield :page_specific_javascripts
= webpack_bundle_tag 'super_sidebar' if show_super_sidebar?

View File

@ -4,7 +4,7 @@
- mr_status = merge_request_status(related_merge_request)
- is_default_branch = branch.name == @repository.root_ref
%li{ class: "branch-item gl-display-flex! gl-align-items-center! js-branch-item js-branch-#{branch.name} gl-pl-3!", data: { name: branch.name, qa_selector: 'branch_container', qa_name: branch.name } }
%li{ class: "branch-item gl-display-flex! gl-align-items-center! js-branch-item js-branch-#{branch.name} gl-pl-5! gl-pr-2!", data: { name: branch.name, qa_selector: 'branch_container', qa_name: branch.name } }
.branch-info
.gl-display-flex.gl-align-items-center
= link_to project_tree_path(@project, branch.name, ref_type: 'heads'), class: 'item-title str-truncated-100 ref-name', data: { qa_selector: 'branch_link' } do

View File

@ -7,7 +7,7 @@
- return unless branches.any?
= render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card' }, header_options: { class: 'gl-new-card-header' }, body_options: { class: 'gl-new-card-body' }, footer_options: { class: 'gl-new-card-footer' }) do |c|
= render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card' }, header_options: { class: 'gl-new-card-header' }, body_options: { class: 'gl-new-card-body gl-px-0' }, footer_options: { class: 'gl-new-card-footer' }) do |c|
- c.with_header do
%h3.gl-new-card-title.h5
= panel_title

View File

@ -23,7 +23,7 @@
= _('Prioritized labels')
.gl-new-card-description
= _('Drag to reorder prioritized labels and change their relative priority.')
.js-prioritized-labels.gl-px-3.gl-rounded-base.manage-labels-list{ data: { url: set_priorities_project_labels_path(@project), sortable: can_admin_label } }
.js-prioritized-labels.gl-rounded-base.manage-labels-list{ data: { url: set_priorities_project_labels_path(@project), sortable: can_admin_label } }
#js-priority-labels-empty-state.priority-labels-empty-state{ class: "#{'hidden' unless @prioritized_labels.empty? && search.blank?}" }
= render 'shared/empty_states/priority_labels'
- if @prioritized_labels.any?
@ -37,8 +37,8 @@
.gl-new-card-header
.gl-new-card-title-wrapper
%h3.gl-new-card-title{ class: ('hide' if hide) }= _('Other labels')
.gl-new-card-body
.js-other-labels.manage-labels-list.gl-new-card-content
.gl-new-card-body.gl-px-0
.js-other-labels.manage-labels-list
= render partial: 'shared/label', collection: @labels, as: :label, locals: { subject: @project }
= paginate @labels, theme: 'gitlab'

View File

@ -6,8 +6,8 @@
- toggle_subscription_path = toggle_subscription_label_path(label, @project) if current_user
- tooltip_title = label_status_tooltip(label, status) if status
%li.label-list-item.gl-list-style-none.gl-py-3{ id: label_css_id, data: { id: label.id } }
.label-content.gl-px-3.gl-py-2.gl-rounded-base{ class: "#{ 'gl-py-3' if force_priority }" }
%li.label-list-item.gl-list-style-none{ id: label_css_id, data: { id: label.id } }
.label-content.gl-pl-5.gl-pr-3.gl-py-4.gl-rounded-base{ class: "#{ 'gl-py-3' if force_priority }" }
= render "shared/label_row", label: label, force_priority: force_priority
%ul.label-actions-list
- if can?(current_user, :admin_label, @project)

View File

@ -2,8 +2,8 @@
- sslBadgeText = _('SSL Verification:') + ' ' + sslStatus
%li.label-list-item
.gl-display-flex.lgl-align-items-center.row.gl-mx-n1
.col-md-8.col-lg-7.gl-px-3
.gl-display-flex.lgl-align-items-center.row.gl-mx-0
.col-md-8.col-lg-7.gl-px-5
.light-header.gl-mb-2
= hook.url
- if hook.rate_limited?
@ -19,7 +19,7 @@
= gl_badge_tag(integration_webhook_event_human_name(trigger), size: :sm)
= gl_badge_tag(sslBadgeText, size: :sm)
.col-md-4.col-lg-5.gl-mt-2.gl-px-3.gl-gap-3.gl-display-flex.gl-md-justify-content-end.gl-align-items-baseline
.col-md-4.col-lg-5.gl-mt-2.gl-px-5.gl-gap-3.gl-display-flex.gl-md-justify-content-end.gl-align-items-baseline
= render 'shared/web_hooks/test_button', hook: hook, size: 'small'
= render Pajamas::ButtonComponent.new(href: edit_hook_path(hook), size: :small) do
= _('Edit')

View File

@ -1,4 +1,4 @@
= render Pajamas::CardComponent.new(card_options: { id: 'webhooks-index', class: 'gl-new-card js-toggle-container' }, header_options: { class: 'gl-new-card-header'}, body_options: { class: 'gl-new-card-body'}) do |c|
= render Pajamas::CardComponent.new(card_options: { id: 'webhooks-index', 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|
- c.with_header do
.gl-new-card-title-wrapper
%h3.gl-new-card-title
@ -9,14 +9,13 @@
= render Pajamas::ButtonComponent.new(size: :small, button_options: { class: 'js-toggle-button js-toggle-content' }) do
= _('Add new webhook')
- c.with_body do
.gl-new-card-content
= gitlab_ui_form_for @hook, as: :hook, url: url, html: { class: 'js-webhook-form gl-new-card-add-form gl-mb-3 gl-display-none js-toggle-content' } do |f|
= gitlab_ui_form_for @hook, as: :hook, url: url, html: { class: 'js-webhook-form gl-new-card-add-form gl-m-3 gl-display-none js-toggle-content' } do |f|
= render partial: partial, locals: { form: f, hook: @hook }
= f.submit _('Add webhook'), pajamas_button: true, data: { qa_selector: "create_webhook_button" }
= render Pajamas::ButtonComponent.new(button_options: { type: 'reset', class: 'js-webhook-edit-close gl-ml-2 js-toggle-button' }) do
= _('Cancel')
- if hooks.any?
%ul.content-list{ class: 'gl-my-n3!' }
%ul.content-list
- hooks.each do |hook|
= render 'shared/web_hooks/hook', hook: hook
- else

View File

@ -1,27 +0,0 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
#
# This file was generated by Bundler.
#
# The application 'vite' is installed as part of a gem, and
# this file is here to facilitate running it.
#
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
bundle_binstub = File.expand_path("bundle", __dir__)
if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end
require "rubygems"
require "bundler/setup"
load Gem.bin_path("vite_ruby", "vite")

View File

@ -1,8 +0,0 @@
---
name: vite
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/94685
rollout_issue_url:
milestone: '16.0'
type: development
group: group::foundations
default_enabled: false

View File

@ -1,18 +0,0 @@
{
"all": {
"sourceCodeDir": "app/assets",
"entrypointsDir": "javascripts/entrypoints",
"devServerConnectTimeout": 3
},
"development": {
"autoBuild": true,
"publicOutputDir": "vite-dev",
"host": "localhost",
"port": 3038
},
"test": {
"autoBuild": true,
"publicOutputDir": "vite-test",
"port": 3037
}
}

View File

@ -18,6 +18,8 @@ const fs = require('fs');
const path = require('path');
const BABEL_VERSION = require('@babel/core/package.json').version;
const SOURCEGRAPH_VERSION = require('@sourcegraph/code-host-integration/package.json').version;
const GITLAB_WEB_IDE_VERSION = require('@gitlab/web-ide/package.json').version;
const BABEL_LOADER_VERSION = require('babel-loader/package.json').version;
const CompressionPlugin = require('compression-webpack-plugin');
@ -35,23 +37,14 @@ const { StatsWriterPlugin } = require('webpack-stats-plugin');
const WEBPACK_VERSION = require('webpack/package.json').version;
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const {
IS_EE,
IS_JH,
ROOT_PATH,
WEBPACK_OUTPUT_PATH,
WEBPACK_PUBLIC_PATH,
SOURCEGRAPH_PUBLIC_PATH,
SOURCEGRAPH_OUTPUT_PATH,
GITLAB_WEB_IDE_OUTPUT_PATH,
GITLAB_WEB_IDE_PUBLIC_PATH,
} = require('./webpack.constants');
const createIncrementalWebpackCompiler = require('./helpers/incremental_webpack_compiler');
const IS_EE = require('./helpers/is_ee_env');
const IS_JH = require('./helpers/is_jh_env');
const vendorDllHash = require('./helpers/vendor_dll_hash');
const GraphqlKnownOperationsPlugin = require('./plugins/graphql_known_operations_plugin');
const ROOT_PATH = path.resolve(__dirname, '..');
const SUPPORTED_BROWSERS = fs.readFileSync(path.join(ROOT_PATH, '.browserslistrc'), 'utf-8');
const SUPPORTED_BROWSERS_HASH = crypto
.createHash('sha256')
@ -89,9 +82,19 @@ if (WEBPACK_REPORT) {
NO_HASHED_CHUNKS = true;
}
const WEBPACK_OUTPUT_PATH = path.join(ROOT_PATH, 'public/assets/webpack');
const WEBPACK_PUBLIC_PATH = '/assets/webpack/';
const SOURCEGRAPH_PACKAGE = '@sourcegraph/code-host-integration';
const GITLAB_WEB_IDE_PACKAGE = '@gitlab/web-ide';
const SOURCEGRAPH_PATH = path.join('sourcegraph', SOURCEGRAPH_VERSION, '/');
const SOURCEGRAPH_OUTPUT_PATH = path.join(WEBPACK_OUTPUT_PATH, SOURCEGRAPH_PATH);
const SOURCEGRAPH_PUBLIC_PATH = path.join(WEBPACK_PUBLIC_PATH, SOURCEGRAPH_PATH);
const GITLAB_WEB_IDE_PATH = path.join('gitlab-vscode', GITLAB_WEB_IDE_VERSION, '/');
const GITLAB_WEB_IDE_OUTPUT_PATH = path.join(WEBPACK_OUTPUT_PATH, GITLAB_WEB_IDE_PATH);
const GITLAB_WEB_IDE_PUBLIC_PATH = path.join(WEBPACK_PUBLIC_PATH, GITLAB_WEB_IDE_PATH);
const devtool = IS_PRODUCTION ? 'source-map' : 'cheap-module-eval-source-map';
let autoEntriesCount = 0;

View File

@ -1,31 +0,0 @@
const path = require('path');
const ROOT_PATH = path.resolve(__dirname, '..');
const WEBPACK_OUTPUT_PATH = path.join(ROOT_PATH, 'public/assets/webpack');
const WEBPACK_PUBLIC_PATH = '/assets/webpack/';
const SOURCEGRAPH_VERSION = require('@sourcegraph/code-host-integration/package.json').version;
const SOURCEGRAPH_PATH = path.join('sourcegraph', SOURCEGRAPH_VERSION, '/');
const SOURCEGRAPH_OUTPUT_PATH = path.join(WEBPACK_OUTPUT_PATH, SOURCEGRAPH_PATH);
const SOURCEGRAPH_PUBLIC_PATH = path.join(WEBPACK_PUBLIC_PATH, SOURCEGRAPH_PATH);
const GITLAB_WEB_IDE_VERSION = require('@gitlab/web-ide/package.json').version;
const GITLAB_WEB_IDE_PATH = path.join('gitlab-vscode', GITLAB_WEB_IDE_VERSION, '/');
const GITLAB_WEB_IDE_OUTPUT_PATH = path.join(WEBPACK_OUTPUT_PATH, GITLAB_WEB_IDE_PATH);
const GITLAB_WEB_IDE_PUBLIC_PATH = path.join(WEBPACK_PUBLIC_PATH, GITLAB_WEB_IDE_PATH);
const IS_EE = require('./helpers/is_ee_env');
const IS_JH = require('./helpers/is_jh_env');
module.exports = {
IS_EE,
IS_JH,
ROOT_PATH,
WEBPACK_OUTPUT_PATH,
WEBPACK_PUBLIC_PATH,
SOURCEGRAPH_OUTPUT_PATH,
SOURCEGRAPH_PUBLIC_PATH,
GITLAB_WEB_IDE_OUTPUT_PATH,
GITLAB_WEB_IDE_PUBLIC_PATH,
};

View File

@ -2,17 +2,17 @@
return if helper.stable_branch?
data_qa_selectors = /qa_selector|data-qa-selector/
data_testids = /testid|data-testid/
deprecated_qa_selectors = /(?!.*\bdata-qa-)(?=class=.*qa-.*|class: .*qa-.*)/
deprecated_qa_selectors = /(?=qa_selector|data-qa-selector)|(?!.*\bdata-qa-)(?=class=.*qa-.*|class: .*qa-.*)/
def filter_changed_lines(files, pattern)
lines = []
files.each do |file|
qa_selector_changed_lines = helper.changed_lines(file).select { |line| line =~ pattern }
next unless qa_selector_changed_lines.any?
testid_changed_lines = helper.changed_lines(file).select { |line| line =~ pattern }
next unless testid_changed_lines.any?
lines += ["file `#{file}`:", qa_selector_changed_lines]
lines += ["file `#{file}`:", testid_changed_lines]
end
lines
end
@ -21,22 +21,22 @@ changed_code_files = helper.changed_files(/\.(vue|haml|js|rb)$/)
return if changed_code_files.empty?
lines_with_qa_selectors = filter_changed_lines(changed_code_files, data_qa_selectors)
lines_with_testids = filter_changed_lines(changed_code_files, data_testids)
deprecated_qa_class = filter_changed_lines(changed_code_files, deprecated_qa_selectors)
return if (lines_with_qa_selectors + deprecated_qa_class).empty?
return if (lines_with_testids + deprecated_qa_class).empty?
markdown(<<~MARKDOWN)
## QA Selectors
## Testid Selectors
MARKDOWN
if lines_with_qa_selectors.any?
if lines_with_testids.any?
markdown(<<~MARKDOWN)
The following changed lines in this MR contain QA selectors:
The following changed lines in this MR contain testid selectors:
* #{lines_with_qa_selectors.join("\n* ")}
* #{lines_with_testids.join("\n* ")}
If the `e2e:package-and-test` job in the `qa` stage has run automatically, please ensure the tests are passing.
If the job has not run, please start the `trigger-omnibus-and-follow-up-e2e` job in the `qa` stage and ensure the tests in `follow-up-e2e:package-and-test-ee` pipeline are passing.
@ -47,20 +47,20 @@ if lines_with_qa_selectors.any?
MARKDOWN
warn "This merge request contains lines with QA selectors. Please ensure `e2e:package-and-test` job is run."
warn "This merge request contains lines with testid selectors. Please ensure `e2e:package-and-test` job is run."
end
if deprecated_qa_class.any?
markdown(<<~MARKDOWN)
### Deprecated .qa-selector class
### Deprecated data-qa-selector
The following lines in this MR contain deprecated qa class selectors:
The following lines in this MR contain deprecated data-qa-selector selectors:
* #{deprecated_qa_class.join("\n* ")}
Please ensure all deprecated qa class selectors are replaced with data-qa-selectors in accordance with our [Testing Guide](https://docs.gitlab.com/ee/development/testing_guide/end_to_end/page_objects.html#data-qa-selector-vs-qa-selector).
Please ensure all deprecated data-qa-selector attributes are replaced with data-testid attributes in accordance with our [Testing Guide](https://docs.gitlab.com/ee/development/testing_guide/end_to_end/page_objects.html#data-testid-vs-data-qa-selector).
MARKDOWN
warn "This merge request contains deprecated .qa-selector CSS class. Please use data-qa-selector attribute instead."
warn "This merge request contains deprecated data-qa-selector attribute. Please use data-testid attribute instead."
end

View File

@ -19,10 +19,6 @@ To add a storage limit:
1. Select **Admin Area**.
1. Select **Settings > Preferences**.
1. Expand **Terraform limits**.
1. Adjust the size limit.
1. Enter a size limit in bytes. Set to `0` to allow files of unlimited size.
## Available settings
| Setting | Default | Description |
|------------------------------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
| Terraform state size limit (bytes) | 0 | Terraform state files that exceed this size are not saved, and associated Terraform operations are rejected. Set to 0 to allow files of unlimited size. |
When Terraform state files exceed this limit, they are not saved, and associated Terraform operations are rejected.

View File

@ -234,11 +234,8 @@
"@gitlab/eslint-plugin": "19.0.0",
"@gitlab/stylelint-config": "4.1.0",
"@graphql-eslint/eslint-plugin": "3.20.1",
"@originjs/vite-plugin-commonjs": "^1.0.3",
"@rollup/plugin-graphql": "^2.0.3",
"@testing-library/dom": "^7.16.2",
"@types/jest": "^28.1.3",
"@vitejs/plugin-vue2": "^1.1.2",
"@vue/compat": "^3.2.47",
"@vue/compiler-sfc": "^3.2.47",
"@vue/test-utils": "1.3.6",
@ -247,7 +244,6 @@
"@vue/vue3-jest": "^29.2.3",
"ajv": "^8.10.0",
"ajv-formats": "^2.1.1",
"autoprefixer": "^10.4.8",
"axios-mock-adapter": "^1.15.0",
"babel-jest": "^28.1.3",
"chalk": "^2.4.1",
@ -287,9 +283,6 @@
"stylelint": "^14.9.1",
"swagger-cli": "^4.0.4",
"timezone-mock": "^1.0.8",
"vite": "^4.4.9",
"vite-plugin-ruby": "^3.2.2",
"vite-svg-loader": "^3.4.0",
"vue-loader-vue3": "npm:vue-loader@17",
"vue-test-utils-compat": "0.0.13",
"vuex-mock-store": "^0.1.0",

View File

@ -1,5 +0,0 @@
module.exports = {
plugins: {
autoprefixer: {},
},
};

View File

@ -40,7 +40,7 @@ gem 'chemlab', '~> 0.11', '>= 0.11.1'
gem 'chemlab-library-www-gitlab-com', '~> 0.1', '>= 0.1.1'
# dependencies for jenkins client
gem 'nokogiri', '~> 1.15', '>= 1.15.3'
gem 'nokogiri', '~> 1.15', '>= 1.15.4'
gem 'deprecation_toolkit', '~> 2.0.3', require: false

View File

@ -212,7 +212,7 @@ GEM
multi_json (1.15.0)
multi_xml (0.6.0)
netrc (0.11.0)
nokogiri (1.15.3)
nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
octokit (7.0.0)
@ -356,7 +356,7 @@ DEPENDENCIES
gitlab_quality-test_tooling (~> 0.9.3)
influxdb-client (~> 2.9)
knapsack (~> 4.0)
nokogiri (~> 1.15, >= 1.15.3)
nokogiri (~> 1.15, >= 1.15.4)
octokit (~> 7.0.0)
parallel (~> 1.23)
parallel_tests (~> 4.2, >= 4.2.1)
@ -377,4 +377,4 @@ DEPENDENCIES
zeitwerk (~> 2.6, >= 2.6.8)
BUNDLED WITH
2.4.17
2.4.18

Some files were not shown because too many files have changed in this diff Show More