diff options
71 files changed, 684 insertions, 675 deletions
diff --git a/app/assets/javascripts/boards/issue_board_filters.js b/app/assets/javascripts/boards/issue_board_filters.js index 27efb3f775c..aa9dc0fc158 100644 --- a/app/assets/javascripts/boards/issue_board_filters.js +++ b/app/assets/javascripts/boards/issue_board_filters.js @@ -1,5 +1,7 @@ +import { BoardType } from 'ee_else_ce/boards/constants'; import groupBoardMembers from '~/boards/graphql/group_board_members.query.graphql'; import projectBoardMembers from '~/boards/graphql/project_board_members.query.graphql'; +import usersAutocompleteQuery from '~/graphql_shared/queries/users_autocomplete.query.graphql'; import groupBoardMilestonesQuery from './graphql/group_board_milestones.query.graphql'; import projectBoardMilestonesQuery from './graphql/project_board_milestones.query.graphql'; import boardLabels from './graphql/board_labels.query.graphql'; @@ -14,6 +16,17 @@ export default function issueBoardFilters(apollo, fullPath, isGroupBoard) { }; const fetchUsers = (usersSearchTerm) => { + if (gon.features?.newGraphqlUsersAutocomplete) { + const namespace = isGroupBoard ? BoardType.group : BoardType.project; + + return apollo + .query({ + query: usersAutocompleteQuery, + variables: { fullPath, search: usersSearchTerm, isProject: !isGroupBoard }, + }) + .then(({ data }) => data[namespace]?.autocompleteUsers); + } + return apollo .query({ query: boardAssigneesQuery(), diff --git a/app/assets/javascripts/jobs/components/job/sidebar/sidebar.vue b/app/assets/javascripts/jobs/components/job/sidebar/sidebar.vue index 92e1557ada2..530109f9dfd 100644 --- a/app/assets/javascripts/jobs/components/job/sidebar/sidebar.vue +++ b/app/assets/javascripts/jobs/components/job/sidebar/sidebar.vue @@ -1,5 +1,4 @@ <script> -import { GlButton, GlIcon } from '@gitlab/ui'; import { isEmpty } from 'lodash'; // eslint-disable-next-line no-restricted-imports import { mapActions, mapGetters, mapState } from 'vuex'; @@ -23,8 +22,6 @@ export default { components: { ArtifactsBlock, CommitBlock, - GlButton, - GlIcon, JobsContainer, JobRetryForwardDeploymentModal, JobSidebarDetailsContainer, @@ -83,36 +80,12 @@ export default { :job-id="job.id" @updateVariables="$emit('updateVariables')" /> - <div - v-if="job.terminal_path || job.new_issue_path" - class="gl-py-5" - :class="$options.borderTopClass" - > - <gl-button - v-if="job.new_issue_path" - :href="job.new_issue_path" - category="secondary" - variant="confirm" - data-testid="job-new-issue" - > - {{ $options.i18n.newIssue }} - </gl-button> - <gl-button - v-if="job.terminal_path" - :href="job.terminal_path" - target="_blank" - data-testid="terminal-link" - > - {{ $options.i18n.debug }} - <gl-icon name="external-link" /> - </gl-button> - </div> - <job-sidebar-details-container class="gl-py-5" :class="$options.borderTopClass" /> + <job-sidebar-details-container class="gl-py-4" :class="$options.borderTopClass" /> <artifacts-block v-if="hasArtifact" - class="gl-py-5" + class="gl-py-4" :class="$options.borderTopClass" :artifact="job.artifact" :help-url="artifactHelpUrl" @@ -120,21 +93,21 @@ export default { <trigger-block v-if="hasTriggers" - class="gl-py-5" + class="gl-py-4" :class="$options.borderTopClass" :trigger="job.trigger" /> <commit-block :commit="commit" - class="gl-py-5" + class="gl-py-4" :class="$options.borderTopClass" :merge-request="job.merge_request" /> <stages-dropdown v-if="job.pipeline" - class="gl-py-5" + class="gl-py-4" :class="$options.borderTopClass" :pipeline="job.pipeline" :selected-stage="selectedStage" diff --git a/app/assets/javascripts/jobs/components/job/sidebar/sidebar_header.vue b/app/assets/javascripts/jobs/components/job/sidebar/sidebar_header.vue index 56fcd8738d7..778c0cd6d65 100644 --- a/app/assets/javascripts/jobs/components/job/sidebar/sidebar_header.vue +++ b/app/assets/javascripts/jobs/components/job/sidebar/sidebar_header.vue @@ -90,27 +90,47 @@ export default { </script> <template> - <div class="gl-py-5 gl-display-flex gl-align-items-center"> + <div class="gl-py-4"> <tooltip-on-truncate :title="job.name" truncate-target="child" - ><h4 class="gl-my-0 gl-mr-3 gl-text-truncate" data-testid="job-name">{{ job.name }}</h4> + ><h4 class="gl-mt-0 gl-mb-3 gl-text-truncate" data-testid="job-name">{{ job.name }}</h4> </tooltip-on-truncate> - <div class="gl-flex-grow-1 gl-flex-shrink-0 gl-text-right"> + <div class="gl-display-flex gl-gap-3"> <gl-button v-if="restJob.erase_path" - v-gl-tooltip.left + v-gl-tooltip.bottom :title="$options.i18n.eraseLogButtonLabel" :aria-label="$options.i18n.eraseLogButtonLabel" :href="restJob.erase_path" :data-confirm="$options.i18n.eraseLogConfirmText" - class="gl-mr-2" data-testid="job-log-erase-link" data-confirm-btn-variant="danger" data-method="post" icon="remove" /> + <gl-button + v-if="restJob.new_issue_path" + v-gl-tooltip.bottom + :href="restJob.new_issue_path" + :title="$options.i18n.newIssue" + :aria-label="$options.i18n.newIssue" + category="secondary" + variant="confirm" + data-testid="job-new-issue" + icon="issue-new" + /> + <gl-button + v-if="restJob.terminal_path" + v-gl-tooltip.bottom + :href="restJob.terminal_path" + :title="$options.i18n.debug" + :aria-label="$options.i18n.debug" + target="_blank" + icon="external-link" + data-testid="terminal-link" + /> <job-sidebar-retry-button v-if="canShowJobRetryButton" - v-gl-tooltip.left + v-gl-tooltip.bottom :title="buttonTitle" :aria-label="buttonTitle" :is-manual-job="isManualJob" @@ -124,7 +144,7 @@ export default { /> <gl-button v-if="restJob.cancel_path" - v-gl-tooltip.left + v-gl-tooltip.bottom :title="$options.i18n.cancelJobButtonLabel" :aria-label="$options.i18n.cancelJobButtonLabel" :href="restJob.cancel_path" diff --git a/app/assets/javascripts/notes/components/sidebar_subscription.vue b/app/assets/javascripts/notes/components/sidebar_subscription.vue index f60a17eb36b..c02c7a57dfa 100644 --- a/app/assets/javascripts/notes/components/sidebar_subscription.vue +++ b/app/assets/javascripts/notes/components/sidebar_subscription.vue @@ -3,7 +3,7 @@ import { mapActions } from 'vuex'; import { TYPE_EPIC, TYPE_ISSUE } from '~/issues/constants'; import { fetchPolicies } from '~/lib/graphql'; -import { confidentialityQueries } from '~/sidebar/constants'; +import { confidentialityQueries } from '~/sidebar/queries/constants'; import { defaultClient as gqlClient } from '~/graphql_shared/issuable_client'; export default { diff --git a/app/assets/javascripts/sentry/init_sentry.js b/app/assets/javascripts/sentry/init_sentry.js index 6075c960668..d3b75a4aa8c 100644 --- a/app/assets/javascripts/sentry/init_sentry.js +++ b/app/assets/javascripts/sentry/init_sentry.js @@ -1,4 +1,4 @@ -import * as Sentry from 'sentrybrowser7'; +import * as Sentry from 'sentrybrowser'; const initSentry = function index() { if (!gon?.sentry_dsn) { diff --git a/app/assets/javascripts/sidebar/components/assignees/assignees_realtime.vue b/app/assets/javascripts/sidebar/components/assignees/assignees_realtime.vue index 319699b88f3..cf77a5ca82c 100644 --- a/app/assets/javascripts/sidebar/components/assignees/assignees_realtime.vue +++ b/app/assets/javascripts/sidebar/components/assignees/assignees_realtime.vue @@ -1,6 +1,6 @@ <script> import { getIdFromGraphQLId } from '~/graphql_shared/utils'; -import { assigneesQueries } from '../../constants'; +import { assigneesQueries } from '../../queries/constants'; export default { subscription: null, diff --git a/app/assets/javascripts/sidebar/components/assignees/sidebar_assignees_widget.vue b/app/assets/javascripts/sidebar/components/assignees/sidebar_assignees_widget.vue index ae81dcb95de..4ff12824008 100644 --- a/app/assets/javascripts/sidebar/components/assignees/sidebar_assignees_widget.vue +++ b/app/assets/javascripts/sidebar/components/assignees/sidebar_assignees_widget.vue @@ -6,7 +6,7 @@ import { TYPE_ALERT, TYPE_ISSUE, TYPE_MERGE_REQUEST } from '~/issues/constants'; import { __, n__ } from '~/locale'; import UserSelect from '~/vue_shared/components/user_select/user_select.vue'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; -import { assigneesQueries } from '../../constants'; +import { assigneesQueries } from '../../queries/constants'; import SidebarEditableItem from '../sidebar_editable_item.vue'; import SidebarAssigneesRealtime from './assignees_realtime.vue'; import IssuableAssignees from './issuable_assignees.vue'; diff --git a/app/assets/javascripts/sidebar/components/confidential/sidebar_confidentiality_form.vue b/app/assets/javascripts/sidebar/components/confidential/sidebar_confidentiality_form.vue index 3038cec03eb..96d72e9545e 100644 --- a/app/assets/javascripts/sidebar/components/confidential/sidebar_confidentiality_form.vue +++ b/app/assets/javascripts/sidebar/components/confidential/sidebar_confidentiality_form.vue @@ -3,7 +3,7 @@ import { GlSprintf, GlButton } from '@gitlab/ui'; import { createAlert } from '~/alert'; import { TYPE_ISSUE } from '~/issues/constants'; import { __, sprintf } from '~/locale'; -import { confidentialityQueries } from '../../constants'; +import { confidentialityQueries } from '../../queries/constants'; export default { i18n: { diff --git a/app/assets/javascripts/sidebar/components/confidential/sidebar_confidentiality_widget.vue b/app/assets/javascripts/sidebar/components/confidential/sidebar_confidentiality_widget.vue index 9177baec246..295d37671cc 100644 --- a/app/assets/javascripts/sidebar/components/confidential/sidebar_confidentiality_widget.vue +++ b/app/assets/javascripts/sidebar/components/confidential/sidebar_confidentiality_widget.vue @@ -3,7 +3,8 @@ import produce from 'immer'; import Vue from 'vue'; import { createAlert } from '~/alert'; import { __, sprintf } from '~/locale'; -import { confidentialityQueries, Tracking } from '../../constants'; +import { Tracking } from '../../constants'; +import { confidentialityQueries } from '../../queries/constants'; import SidebarEditableItem from '../sidebar_editable_item.vue'; import SidebarConfidentialityContent from './sidebar_confidentiality_content.vue'; import SidebarConfidentialityForm from './sidebar_confidentiality_form.vue'; diff --git a/app/assets/javascripts/sidebar/components/copy/sidebar_reference_widget.vue b/app/assets/javascripts/sidebar/components/copy/sidebar_reference_widget.vue index 3287539e502..7a488bb379f 100644 --- a/app/assets/javascripts/sidebar/components/copy/sidebar_reference_widget.vue +++ b/app/assets/javascripts/sidebar/components/copy/sidebar_reference_widget.vue @@ -1,6 +1,6 @@ <script> import { __ } from '~/locale'; -import { referenceQueries } from '../../constants'; +import { referenceQueries } from '../../queries/constants'; import CopyableField from './copyable_field.vue'; export default { diff --git a/app/assets/javascripts/sidebar/components/date/sidebar_date_widget.vue b/app/assets/javascripts/sidebar/components/date/sidebar_date_widget.vue index 5a9545f3460..89bc4b126d6 100644 --- a/app/assets/javascripts/sidebar/components/date/sidebar_date_widget.vue +++ b/app/assets/javascripts/sidebar/components/date/sidebar_date_widget.vue @@ -4,7 +4,8 @@ import { createAlert } from '~/alert'; import { TYPE_ISSUE } from '~/issues/constants'; import { dateInWords, formatDate, parsePikadayDate } from '~/lib/utils/datetime_utility'; import { __, sprintf } from '~/locale'; -import { dateFields, dateTypes, dueDateQueries, startDateQueries, Tracking } from '../../constants'; +import { dateFields, dateTypes, Tracking } from '../../constants'; +import { dueDateQueries, startDateQueries } from '../../queries/constants'; import SidebarEditableItem from '../sidebar_editable_item.vue'; import SidebarFormattedDate from './sidebar_formatted_date.vue'; import SidebarInheritDate from './sidebar_inherit_date.vue'; diff --git a/app/assets/javascripts/sidebar/components/incidents/sidebar_escalation_status.vue b/app/assets/javascripts/sidebar/components/incidents/sidebar_escalation_status.vue index 6db332a82da..576043963de 100644 --- a/app/assets/javascripts/sidebar/components/incidents/sidebar_escalation_status.vue +++ b/app/assets/javascripts/sidebar/components/incidents/sidebar_escalation_status.vue @@ -3,11 +3,8 @@ import { GlIcon, GlTooltipDirective } from '@gitlab/ui'; import { createAlert } from '~/alert'; import { logError } from '~/lib/logger'; import EscalationStatus from 'ee_else_ce/sidebar/components/incidents/escalation_status.vue'; -import { - escalationStatusQuery, - escalationStatusMutation, - INCIDENTS_I18N as i18n, -} from '../../constants'; +import { INCIDENTS_I18N as i18n } from '../../constants'; +import { escalationStatusQuery, escalationStatusMutation } from '../../queries/constants'; import { getStatusLabel } from '../../utils'; import SidebarEditableItem from '../sidebar_editable_item.vue'; diff --git a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view.vue index 45778640957..8bbec6794ca 100644 --- a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view.vue +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view.vue @@ -11,7 +11,7 @@ import produce from 'immer'; import { createAlert } from '~/alert'; import { WORKSPACE_GROUP } from '~/issues/constants'; import { __ } from '~/locale'; -import { workspaceLabelsQueries } from '../../../constants'; +import { workspaceLabelsQueries } from '../../../queries/constants'; import createLabelMutation from './graphql/create_label.mutation.graphql'; import { DEFAULT_LABEL_COLOR } from './constants'; diff --git a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/dropdown_contents_labels_view.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/dropdown_contents_labels_view.vue index d8d07b4b221..fc8834a97d4 100644 --- a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/dropdown_contents_labels_view.vue +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/dropdown_contents_labels_view.vue @@ -4,7 +4,7 @@ import fuzzaldrinPlus from 'fuzzaldrin-plus'; import { createAlert } from '~/alert'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; import { __ } from '~/locale'; -import { workspaceLabelsQueries } from '../../../constants'; +import { workspaceLabelsQueries } from '../../../queries/constants'; import LabelItem from './label_item.vue'; export default { diff --git a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/labels_select_root.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/labels_select_root.vue index 74c3f08a47b..f9a9cc316c1 100644 --- a/app/assets/javascripts/sidebar/components/labels/labels_select_widget/labels_select_root.vue +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_widget/labels_select_root.vue @@ -7,7 +7,7 @@ import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { TYPE_EPIC, TYPE_ISSUE, TYPE_MERGE_REQUEST, TYPE_TEST_CASE } from '~/issues/constants'; import { __ } from '~/locale'; -import { issuableLabelsQueries } from '../../../constants'; +import { issuableLabelsQueries } from '../../../queries/constants'; import SidebarEditableItem from '../../sidebar_editable_item.vue'; import { DEBOUNCE_DROPDOWN_DELAY, VARIANT_SIDEBAR } from './constants'; import DropdownContents from './dropdown_contents.vue'; diff --git a/app/assets/javascripts/sidebar/components/participants/sidebar_participants_widget.vue b/app/assets/javascripts/sidebar/components/participants/sidebar_participants_widget.vue index b0556e22a8d..b764d660d63 100644 --- a/app/assets/javascripts/sidebar/components/participants/sidebar_participants_widget.vue +++ b/app/assets/javascripts/sidebar/components/participants/sidebar_participants_widget.vue @@ -1,6 +1,6 @@ <script> import { __ } from '~/locale'; -import { participantsQueries } from '../../constants'; +import { participantsQueries } from '../../queries/constants'; import Participants from './participants.vue'; export default { diff --git a/app/assets/javascripts/sidebar/components/sidebar_dropdown.vue b/app/assets/javascripts/sidebar/components/sidebar_dropdown.vue index 50b4284cde0..c9450244b40 100644 --- a/app/assets/javascripts/sidebar/components/sidebar_dropdown.vue +++ b/app/assets/javascripts/sidebar/components/sidebar_dropdown.vue @@ -20,13 +20,13 @@ import { defaultEpicSort, dropdowni18nText, epicIidPattern, - issuableAttributesQueries, IssuableAttributeState, IssuableAttributeType, IssuableAttributeTypeKeyMap, LocalizedIssuableAttributeType, noAttributeId, } from 'ee_else_ce/sidebar/constants'; +import { issuableAttributesQueries } from 'ee_else_ce/sidebar/queries/constants'; import { createAlert } from '~/alert'; import { PathIdSeparator } from '~/related_issues/constants'; diff --git a/app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue b/app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue index 4721c6fee61..7fde43a360d 100644 --- a/app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue +++ b/app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue @@ -11,10 +11,10 @@ import { dropdowni18nText, LocalizedIssuableAttributeType, IssuableAttributeTypeKeyMap, - issuableAttributesQueries, IssuableAttributeType, Tracking, } from 'ee_else_ce/sidebar/constants'; +import { issuableAttributesQueries } from 'ee_else_ce/sidebar/queries/constants'; import SidebarDropdown from './sidebar_dropdown.vue'; import SidebarEditableItem from './sidebar_editable_item.vue'; diff --git a/app/assets/javascripts/sidebar/components/subscriptions/sidebar_subscriptions_widget.vue b/app/assets/javascripts/sidebar/components/subscriptions/sidebar_subscriptions_widget.vue index d6e1847aecb..568962cddc7 100644 --- a/app/assets/javascripts/sidebar/components/subscriptions/sidebar_subscriptions_widget.vue +++ b/app/assets/javascripts/sidebar/components/subscriptions/sidebar_subscriptions_widget.vue @@ -13,7 +13,8 @@ import { isLoggedIn } from '~/lib/utils/common_utils'; import { __, sprintf } from '~/locale'; import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import toast from '~/vue_shared/plugins/global_toast'; -import { subscribedQueries, Tracking } from '../../constants'; +import { Tracking } from '../../constants'; +import { subscribedQueries } from '../../queries/constants'; import SidebarEditableItem from '../sidebar_editable_item.vue'; const ICON_ON = 'notifications'; diff --git a/app/assets/javascripts/sidebar/components/time_tracking/report.vue b/app/assets/javascripts/sidebar/components/time_tracking/report.vue index 70d8024f46a..9bd4c7f5c68 100644 --- a/app/assets/javascripts/sidebar/components/time_tracking/report.vue +++ b/app/assets/javascripts/sidebar/components/time_tracking/report.vue @@ -7,7 +7,7 @@ import { convertToGraphQLId } from '~/graphql_shared/utils'; import { TYPE_ISSUE } from '~/issues/constants'; import { formatDate, parseSeconds, stringifyTime } from '~/lib/utils/datetime_utility'; import { __, s__ } from '~/locale'; -import { timelogQueries } from '../../constants'; +import { timelogQueries } from '../../queries/constants'; import deleteTimelogMutation from '../../queries/delete_timelog.mutation.graphql'; const TIME_DATE_FORMAT = 'mmmm d, yyyy, HH:MM ("UTC:" o)'; diff --git a/app/assets/javascripts/sidebar/components/time_tracking/time_tracker.vue b/app/assets/javascripts/sidebar/components/time_tracking/time_tracker.vue index 1d427a871e1..91b23689f0d 100644 --- a/app/assets/javascripts/sidebar/components/time_tracking/time_tracker.vue +++ b/app/assets/javascripts/sidebar/components/time_tracking/time_tracker.vue @@ -12,7 +12,8 @@ import { TYPE_ISSUE, TYPE_MERGE_REQUEST } from '~/issues/constants'; import { BV_SHOW_MODAL } from '~/lib/utils/constants'; import { s__, __ } from '~/locale'; -import { HOW_TO_TRACK_TIME, timeTrackingQueries } from '../../constants'; +import { HOW_TO_TRACK_TIME } from '../../constants'; +import { timeTrackingQueries } from '../../queries/constants'; import eventHub from '../../event_hub'; import TimeTrackingCollapsedState from './collapsed_state.vue'; import TimeTrackingComparisonPane from './comparison_pane.vue'; diff --git a/app/assets/javascripts/sidebar/components/todo_toggle/sidebar_todo_widget.vue b/app/assets/javascripts/sidebar/components/todo_toggle/sidebar_todo_widget.vue index 551d306a9c4..1099dcb832f 100644 --- a/app/assets/javascripts/sidebar/components/todo_toggle/sidebar_todo_widget.vue +++ b/app/assets/javascripts/sidebar/components/todo_toggle/sidebar_todo_widget.vue @@ -6,7 +6,8 @@ import { TYPE_MERGE_REQUEST } from '~/issues/constants'; import { __, sprintf } from '~/locale'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import Tracking from '~/tracking'; -import { todoQueries, TodoMutationTypes, todoMutations } from '../../constants'; +import { TodoMutationTypes } from '../../constants'; +import { todoQueries, todoMutations } from '../../queries/constants'; import { todoLabel } from '../../utils'; import TodoButton from './todo_button.vue'; diff --git a/app/assets/javascripts/sidebar/constants.js b/app/assets/javascripts/sidebar/constants.js index 752d0315227..f13f613733b 100644 --- a/app/assets/javascripts/sidebar/constants.js +++ b/app/assets/javascripts/sidebar/constants.js @@ -1,173 +1,10 @@ import { invert } from 'lodash'; import { s__, __, sprintf } from '~/locale'; -import updateIssueLabelsMutation from '~/boards/graphql/issue_set_labels.mutation.graphql'; -import userAutocompleteQuery from '~/graphql_shared/queries/project_autocomplete_users.query.graphql'; -import userAutocompleteWithMRPermissionsQuery from '~/graphql_shared/queries/project_autocomplete_users_with_mr_permissions.query.graphql'; -import { - TYPE_ALERT, - TYPE_EPIC, - TYPE_ISSUE, - TYPE_MERGE_REQUEST, - TYPE_TEST_CASE, - WORKSPACE_GROUP, - WORKSPACE_PROJECT, -} from '~/issues/constants'; -import updateAlertAssigneesMutation from '~/vue_shared/alert_details/graphql/mutations/alert_set_assignees.mutation.graphql'; -import issuableDatesUpdatedSubscription from '../graphql_shared/subscriptions/work_item_dates.subscription.graphql'; -import updateTestCaseLabelsMutation from './components/labels/labels_select_widget/graphql/update_test_case_labels.mutation.graphql'; -import epicLabelsQuery from './components/labels/labels_select_widget/graphql/epic_labels.query.graphql'; -import updateEpicLabelsMutation from './components/labels/labels_select_widget/graphql/epic_update_labels.mutation.graphql'; -import groupLabelsQuery from './components/labels/labels_select_widget/graphql/group_labels.query.graphql'; -import issueLabelsQuery from './components/labels/labels_select_widget/graphql/issue_labels.query.graphql'; -import mergeRequestLabelsQuery from './components/labels/labels_select_widget/graphql/merge_request_labels.query.graphql'; -import projectLabelsQuery from './components/labels/labels_select_widget/graphql/project_labels.query.graphql'; -import epicConfidentialQuery from './queries/epic_confidential.query.graphql'; -import epicDueDateQuery from './queries/epic_due_date.query.graphql'; -import epicParticipantsQuery from './queries/epic_participants.query.graphql'; -import epicReferenceQuery from './queries/epic_reference.query.graphql'; -import epicStartDateQuery from './queries/epic_start_date.query.graphql'; -import epicSubscribedQuery from './queries/epic_subscribed.query.graphql'; -import epicTodoQuery from './queries/epic_todo.query.graphql'; -import issuableAssigneesSubscription from './queries/issuable_assignees.subscription.graphql'; -import issueConfidentialQuery from './queries/issue_confidential.query.graphql'; -import issueDueDateQuery from './queries/issue_due_date.query.graphql'; -import issueReferenceQuery from './queries/issue_reference.query.graphql'; -import issueSubscribedQuery from './queries/issue_subscribed.query.graphql'; -import issueTimeTrackingQuery from './queries/issue_time_tracking.query.graphql'; -import issueTodoQuery from './queries/issue_todo.query.graphql'; -import mergeRequestMilestone from './queries/merge_request_milestone.query.graphql'; -import mergeRequestReferenceQuery from './queries/merge_request_reference.query.graphql'; -import mergeRequestSubscribed from './queries/merge_request_subscribed.query.graphql'; -import mergeRequestTimeTrackingQuery from './queries/merge_request_time_tracking.query.graphql'; -import mergeRequestTodoQuery from './queries/merge_request_todo.query.graphql'; -import todoCreateMutation from './queries/todo_create.mutation.graphql'; -import todoMarkDoneMutation from './queries/todo_mark_done.mutation.graphql'; -import updateEpicConfidentialMutation from './queries/update_epic_confidential.mutation.graphql'; -import updateEpicDueDateMutation from './queries/update_epic_due_date.mutation.graphql'; -import updateEpicStartDateMutation from './queries/update_epic_start_date.mutation.graphql'; -import updateEpicSubscriptionMutation from './queries/update_epic_subscription.mutation.graphql'; -import updateIssueConfidentialMutation from './queries/update_issue_confidential.mutation.graphql'; -import updateIssueDueDateMutation from './queries/update_issue_due_date.mutation.graphql'; -import updateIssueSubscriptionMutation from './queries/update_issue_subscription.mutation.graphql'; -import mergeRequestMilestoneMutation from './queries/update_merge_request_milestone.mutation.graphql'; -import updateMergeRequestLabelsMutation from './queries/update_merge_request_labels.mutation.graphql'; -import updateMergeRequestSubscriptionMutation from './queries/update_merge_request_subscription.mutation.graphql'; -import getAlertAssignees from './queries/get_alert_assignees.query.graphql'; -import getIssueAssignees from './queries/get_issue_assignees.query.graphql'; -import issueParticipantsQuery from './queries/get_issue_participants.query.graphql'; -import getIssueTimelogsQuery from './queries/get_issue_timelogs.query.graphql'; -import getMergeRequestAssignees from './queries/get_mr_assignees.query.graphql'; -import getMergeRequestParticipants from './queries/get_mr_participants.query.graphql'; -import getMrTimelogsQuery from './queries/get_mr_timelogs.query.graphql'; -import updateIssueAssigneesMutation from './queries/update_issue_assignees.mutation.graphql'; -import updateMergeRequestAssigneesMutation from './queries/update_mr_assignees.mutation.graphql'; -import getEscalationStatusQuery from './queries/escalation_status.query.graphql'; -import updateEscalationStatusMutation from './queries/update_escalation_status.mutation.graphql'; -import groupMilestonesQuery from './queries/group_milestones.query.graphql'; -import projectIssueMilestoneMutation from './queries/project_issue_milestone.mutation.graphql'; -import projectIssueMilestoneQuery from './queries/project_issue_milestone.query.graphql'; -import projectMilestonesQuery from './queries/project_milestones.query.graphql'; export const defaultEpicSort = 'TITLE_ASC'; export const epicIidPattern = /^&(?<iid>\d+)$/; -export const assigneesQueries = { - [TYPE_ISSUE]: { - query: getIssueAssignees, - subscription: issuableAssigneesSubscription, - mutation: updateIssueAssigneesMutation, - }, - [TYPE_MERGE_REQUEST]: { - query: getMergeRequestAssignees, - mutation: updateMergeRequestAssigneesMutation, - }, - [TYPE_ALERT]: { - query: getAlertAssignees, - mutation: updateAlertAssigneesMutation, - }, -}; - -export const participantsQueries = { - [TYPE_ISSUE]: { - query: issueParticipantsQuery, - }, - [TYPE_MERGE_REQUEST]: { - query: getMergeRequestParticipants, - }, - [TYPE_EPIC]: { - query: epicParticipantsQuery, - }, - [TYPE_ALERT]: { - query: '', - skipQuery: true, - }, -}; - -export const userSearchQueries = { - [TYPE_ISSUE]: { - query: userAutocompleteQuery, - }, - [TYPE_MERGE_REQUEST]: { - query: userAutocompleteWithMRPermissionsQuery, - }, -}; - -export const confidentialityQueries = { - [TYPE_ISSUE]: { - query: issueConfidentialQuery, - mutation: updateIssueConfidentialMutation, - }, - [TYPE_EPIC]: { - query: epicConfidentialQuery, - mutation: updateEpicConfidentialMutation, - }, -}; - -export const referenceQueries = { - [TYPE_ISSUE]: { - query: issueReferenceQuery, - }, - [TYPE_MERGE_REQUEST]: { - query: mergeRequestReferenceQuery, - }, - [TYPE_EPIC]: { - query: epicReferenceQuery, - }, -}; - -export const workspaceLabelsQueries = { - [WORKSPACE_PROJECT]: { - query: projectLabelsQuery, - }, - [WORKSPACE_GROUP]: { - query: groupLabelsQuery, - }, -}; - -export const issuableLabelsQueries = { - [TYPE_ISSUE]: { - issuableQuery: issueLabelsQuery, - mutation: updateIssueLabelsMutation, - mutationName: 'updateIssue', - }, - [TYPE_MERGE_REQUEST]: { - issuableQuery: mergeRequestLabelsQuery, - mutation: updateMergeRequestLabelsMutation, - mutationName: 'mergeRequestSetLabels', - }, - [TYPE_EPIC]: { - issuableQuery: epicLabelsQuery, - mutation: updateEpicLabelsMutation, - mutationName: 'updateEpic', - }, - [TYPE_TEST_CASE]: { - issuableQuery: issueLabelsQuery, - mutation: updateTestCaseLabelsMutation, - mutationName: 'updateTestCaseLabels', - }, -}; - export const dateTypes = { start: 'startDate', due: 'dueDate', @@ -186,91 +23,13 @@ export const dateFields = { }, }; -export const subscribedQueries = { - [TYPE_ISSUE]: { - query: issueSubscribedQuery, - mutation: updateIssueSubscriptionMutation, - }, - [TYPE_EPIC]: { - query: epicSubscribedQuery, - mutation: updateEpicSubscriptionMutation, - }, - [TYPE_MERGE_REQUEST]: { - query: mergeRequestSubscribed, - mutation: updateMergeRequestSubscriptionMutation, - }, -}; - export const Tracking = { editEvent: 'click_edit_button', rightSidebarLabel: 'right_sidebar', }; -export const timeTrackingQueries = { - [TYPE_ISSUE]: { - query: issueTimeTrackingQuery, - }, - [TYPE_MERGE_REQUEST]: { - query: mergeRequestTimeTrackingQuery, - }, -}; - -export const dueDateQueries = { - [TYPE_ISSUE]: { - query: issueDueDateQuery, - mutation: updateIssueDueDateMutation, - subscription: issuableDatesUpdatedSubscription, - }, - [TYPE_EPIC]: { - query: epicDueDateQuery, - mutation: updateEpicDueDateMutation, - }, -}; - -export const startDateQueries = { - [TYPE_EPIC]: { - query: epicStartDateQuery, - mutation: updateEpicStartDateMutation, - }, -}; - -export const timelogQueries = { - [TYPE_ISSUE]: { - query: getIssueTimelogsQuery, - }, - [TYPE_MERGE_REQUEST]: { - query: getMrTimelogsQuery, - }, -}; - export const noAttributeId = null; -export const issuableMilestoneQueries = { - [TYPE_ISSUE]: { - query: projectIssueMilestoneQuery, - mutation: projectIssueMilestoneMutation, - }, - [TYPE_MERGE_REQUEST]: { - query: mergeRequestMilestone, - mutation: mergeRequestMilestoneMutation, - }, -}; - -export const milestonesQueries = { - [TYPE_ISSUE]: { - query: { - [WORKSPACE_GROUP]: groupMilestonesQuery, - [WORKSPACE_PROJECT]: projectMilestonesQuery, - }, - }, - [TYPE_MERGE_REQUEST]: { - query: { - [WORKSPACE_GROUP]: groupMilestonesQuery, - [WORKSPACE_PROJECT]: projectMilestonesQuery, - }, - }, -}; - export const IssuableAttributeType = { Milestone: 'milestone', }; @@ -285,35 +44,11 @@ export const IssuableAttributeState = { [IssuableAttributeType.Milestone]: 'active', }; -export const issuableAttributesQueries = { - [IssuableAttributeType.Milestone]: { - current: issuableMilestoneQueries, - list: milestonesQueries, - }, -}; - -export const todoQueries = { - [TYPE_EPIC]: { - query: epicTodoQuery, - }, - [TYPE_ISSUE]: { - query: issueTodoQuery, - }, - [TYPE_MERGE_REQUEST]: { - query: mergeRequestTodoQuery, - }, -}; - export const TodoMutationTypes = { Create: 'create', MarkDone: 'mark-done', }; -export const todoMutations = { - [TodoMutationTypes.Create]: todoCreateMutation, - [TodoMutationTypes.MarkDone]: todoMarkDoneMutation, -}; - export function dropdowni18nText(issuableAttribute, issuableType) { return { noAttribute: sprintf(s__('DropdownWidget|No %{issuableAttribute}'), { @@ -362,9 +97,6 @@ export function dropdowni18nText(issuableAttribute, issuableType) { }; } -export const escalationStatusQuery = getEscalationStatusQuery; -export const escalationStatusMutation = updateEscalationStatusMutation; - export const HOW_TO_TRACK_TIME = __('How to track time'); export const statusDropdownOptions = [ diff --git a/app/assets/javascripts/sidebar/queries/constants.js b/app/assets/javascripts/sidebar/queries/constants.js new file mode 100644 index 00000000000..9f71091b8fc --- /dev/null +++ b/app/assets/javascripts/sidebar/queries/constants.js @@ -0,0 +1,270 @@ +import updateIssueLabelsMutation from '~/boards/graphql/issue_set_labels.mutation.graphql'; +import userAutocompleteQuery from '~/graphql_shared/queries/project_autocomplete_users.query.graphql'; +import userAutocompleteWithMRPermissionsQuery from '~/graphql_shared/queries/project_autocomplete_users_with_mr_permissions.query.graphql'; +import issuableDatesUpdatedSubscription from '~/graphql_shared/subscriptions/work_item_dates.subscription.graphql'; +import { + TYPE_ALERT, + TYPE_EPIC, + TYPE_ISSUE, + TYPE_MERGE_REQUEST, + TYPE_TEST_CASE, + WORKSPACE_GROUP, + WORKSPACE_PROJECT, +} from '~/issues/constants'; +import updateAlertAssigneesMutation from '~/vue_shared/alert_details/graphql/mutations/alert_set_assignees.mutation.graphql'; +import updateTestCaseLabelsMutation from '../components/labels/labels_select_widget/graphql/update_test_case_labels.mutation.graphql'; +import epicLabelsQuery from '../components/labels/labels_select_widget/graphql/epic_labels.query.graphql'; +import updateEpicLabelsMutation from '../components/labels/labels_select_widget/graphql/epic_update_labels.mutation.graphql'; +import groupLabelsQuery from '../components/labels/labels_select_widget/graphql/group_labels.query.graphql'; +import issueLabelsQuery from '../components/labels/labels_select_widget/graphql/issue_labels.query.graphql'; +import mergeRequestLabelsQuery from '../components/labels/labels_select_widget/graphql/merge_request_labels.query.graphql'; +import projectLabelsQuery from '../components/labels/labels_select_widget/graphql/project_labels.query.graphql'; +import { IssuableAttributeType, TodoMutationTypes } from '../constants'; +import epicConfidentialQuery from './epic_confidential.query.graphql'; +import epicDueDateQuery from './epic_due_date.query.graphql'; +import epicParticipantsQuery from './epic_participants.query.graphql'; +import epicReferenceQuery from './epic_reference.query.graphql'; +import epicStartDateQuery from './epic_start_date.query.graphql'; +import epicSubscribedQuery from './epic_subscribed.query.graphql'; +import epicTodoQuery from './epic_todo.query.graphql'; +import issuableAssigneesSubscription from './issuable_assignees.subscription.graphql'; +import issueConfidentialQuery from './issue_confidential.query.graphql'; +import issueDueDateQuery from './issue_due_date.query.graphql'; +import issueReferenceQuery from './issue_reference.query.graphql'; +import issueSubscribedQuery from './issue_subscribed.query.graphql'; +import issueTimeTrackingQuery from './issue_time_tracking.query.graphql'; +import issueTodoQuery from './issue_todo.query.graphql'; +import mergeRequestMilestone from './merge_request_milestone.query.graphql'; +import mergeRequestReferenceQuery from './merge_request_reference.query.graphql'; +import mergeRequestSubscribed from './merge_request_subscribed.query.graphql'; +import mergeRequestTimeTrackingQuery from './merge_request_time_tracking.query.graphql'; +import mergeRequestTodoQuery from './merge_request_todo.query.graphql'; +import todoCreateMutation from './todo_create.mutation.graphql'; +import todoMarkDoneMutation from './todo_mark_done.mutation.graphql'; +import updateEpicConfidentialMutation from './update_epic_confidential.mutation.graphql'; +import updateEpicDueDateMutation from './update_epic_due_date.mutation.graphql'; +import updateEpicStartDateMutation from './update_epic_start_date.mutation.graphql'; +import updateEpicSubscriptionMutation from './update_epic_subscription.mutation.graphql'; +import updateIssueConfidentialMutation from './update_issue_confidential.mutation.graphql'; +import updateIssueDueDateMutation from './update_issue_due_date.mutation.graphql'; +import updateIssueSubscriptionMutation from './update_issue_subscription.mutation.graphql'; +import mergeRequestMilestoneMutation from './update_merge_request_milestone.mutation.graphql'; +import updateMergeRequestLabelsMutation from './update_merge_request_labels.mutation.graphql'; +import updateMergeRequestSubscriptionMutation from './update_merge_request_subscription.mutation.graphql'; +import getAlertAssignees from './get_alert_assignees.query.graphql'; +import getIssueAssignees from './get_issue_assignees.query.graphql'; +import issueParticipantsQuery from './get_issue_participants.query.graphql'; +import getIssueTimelogsQuery from './get_issue_timelogs.query.graphql'; +import getMergeRequestAssignees from './get_mr_assignees.query.graphql'; +import getMergeRequestParticipants from './get_mr_participants.query.graphql'; +import getMrTimelogsQuery from './get_mr_timelogs.query.graphql'; +import updateIssueAssigneesMutation from './update_issue_assignees.mutation.graphql'; +import updateMergeRequestAssigneesMutation from './update_mr_assignees.mutation.graphql'; +import getEscalationStatusQuery from './escalation_status.query.graphql'; +import updateEscalationStatusMutation from './update_escalation_status.mutation.graphql'; +import groupMilestonesQuery from './group_milestones.query.graphql'; +import projectIssueMilestoneMutation from './project_issue_milestone.mutation.graphql'; +import projectIssueMilestoneQuery from './project_issue_milestone.query.graphql'; +import projectMilestonesQuery from './project_milestones.query.graphql'; + +export const assigneesQueries = { + [TYPE_ISSUE]: { + query: getIssueAssignees, + subscription: issuableAssigneesSubscription, + mutation: updateIssueAssigneesMutation, + }, + [TYPE_MERGE_REQUEST]: { + query: getMergeRequestAssignees, + mutation: updateMergeRequestAssigneesMutation, + }, + [TYPE_ALERT]: { + query: getAlertAssignees, + mutation: updateAlertAssigneesMutation, + }, +}; + +export const participantsQueries = { + [TYPE_ISSUE]: { + query: issueParticipantsQuery, + }, + [TYPE_MERGE_REQUEST]: { + query: getMergeRequestParticipants, + }, + [TYPE_EPIC]: { + query: epicParticipantsQuery, + }, + [TYPE_ALERT]: { + query: '', + skipQuery: true, + }, +}; + +export const userSearchQueries = { + [TYPE_ISSUE]: { + query: userAutocompleteQuery, + }, + [TYPE_MERGE_REQUEST]: { + query: userAutocompleteWithMRPermissionsQuery, + }, +}; + +export const confidentialityQueries = { + [TYPE_ISSUE]: { + query: issueConfidentialQuery, + mutation: updateIssueConfidentialMutation, + }, + [TYPE_EPIC]: { + query: epicConfidentialQuery, + mutation: updateEpicConfidentialMutation, + }, +}; + +export const referenceQueries = { + [TYPE_ISSUE]: { + query: issueReferenceQuery, + }, + [TYPE_MERGE_REQUEST]: { + query: mergeRequestReferenceQuery, + }, + [TYPE_EPIC]: { + query: epicReferenceQuery, + }, +}; + +export const workspaceLabelsQueries = { + [WORKSPACE_PROJECT]: { + query: projectLabelsQuery, + }, + [WORKSPACE_GROUP]: { + query: groupLabelsQuery, + }, +}; + +export const issuableLabelsQueries = { + [TYPE_ISSUE]: { + issuableQuery: issueLabelsQuery, + mutation: updateIssueLabelsMutation, + mutationName: 'updateIssue', + }, + [TYPE_MERGE_REQUEST]: { + issuableQuery: mergeRequestLabelsQuery, + mutation: updateMergeRequestLabelsMutation, + mutationName: 'mergeRequestSetLabels', + }, + [TYPE_EPIC]: { + issuableQuery: epicLabelsQuery, + mutation: updateEpicLabelsMutation, + mutationName: 'updateEpic', + }, + [TYPE_TEST_CASE]: { + issuableQuery: issueLabelsQuery, + mutation: updateTestCaseLabelsMutation, + mutationName: 'updateTestCaseLabels', + }, +}; + +export const subscribedQueries = { + [TYPE_ISSUE]: { + query: issueSubscribedQuery, + mutation: updateIssueSubscriptionMutation, + }, + [TYPE_EPIC]: { + query: epicSubscribedQuery, + mutation: updateEpicSubscriptionMutation, + }, + [TYPE_MERGE_REQUEST]: { + query: mergeRequestSubscribed, + mutation: updateMergeRequestSubscriptionMutation, + }, +}; + +export const timeTrackingQueries = { + [TYPE_ISSUE]: { + query: issueTimeTrackingQuery, + }, + [TYPE_MERGE_REQUEST]: { + query: mergeRequestTimeTrackingQuery, + }, +}; + +export const dueDateQueries = { + [TYPE_ISSUE]: { + query: issueDueDateQuery, + mutation: updateIssueDueDateMutation, + subscription: issuableDatesUpdatedSubscription, + }, + [TYPE_EPIC]: { + query: epicDueDateQuery, + mutation: updateEpicDueDateMutation, + }, +}; + +export const startDateQueries = { + [TYPE_EPIC]: { + query: epicStartDateQuery, + mutation: updateEpicStartDateMutation, + }, +}; + +export const timelogQueries = { + [TYPE_ISSUE]: { + query: getIssueTimelogsQuery, + }, + [TYPE_MERGE_REQUEST]: { + query: getMrTimelogsQuery, + }, +}; + +export const issuableMilestoneQueries = { + [TYPE_ISSUE]: { + query: projectIssueMilestoneQuery, + mutation: projectIssueMilestoneMutation, + }, + [TYPE_MERGE_REQUEST]: { + query: mergeRequestMilestone, + mutation: mergeRequestMilestoneMutation, + }, +}; + +export const milestonesQueries = { + [TYPE_ISSUE]: { + query: { + [WORKSPACE_GROUP]: groupMilestonesQuery, + [WORKSPACE_PROJECT]: projectMilestonesQuery, + }, + }, + [TYPE_MERGE_REQUEST]: { + query: { + [WORKSPACE_GROUP]: groupMilestonesQuery, + [WORKSPACE_PROJECT]: projectMilestonesQuery, + }, + }, +}; + +export const issuableAttributesQueries = { + [IssuableAttributeType.Milestone]: { + current: issuableMilestoneQueries, + list: milestonesQueries, + }, +}; + +export const todoQueries = { + [TYPE_EPIC]: { + query: epicTodoQuery, + }, + [TYPE_ISSUE]: { + query: issueTodoQuery, + }, + [TYPE_MERGE_REQUEST]: { + query: mergeRequestTodoQuery, + }, +}; + +export const todoMutations = { + [TodoMutationTypes.Create]: todoCreateMutation, + [TodoMutationTypes.MarkDone]: todoMarkDoneMutation, +}; + +export const escalationStatusQuery = getEscalationStatusQuery; + +export const escalationStatusMutation = updateEscalationStatusMutation; diff --git a/app/assets/javascripts/vue_shared/components/user_select/user_select.vue b/app/assets/javascripts/vue_shared/components/user_select/user_select.vue index 1e79d2cdcd7..863c43b0e55 100644 --- a/app/assets/javascripts/vue_shared/components/user_select/user_select.vue +++ b/app/assets/javascripts/vue_shared/components/user_select/user_select.vue @@ -13,7 +13,7 @@ import { __ } from '~/locale'; import SidebarParticipant from '~/sidebar/components/assignees/sidebar_participant.vue'; import { TYPE_ISSUE, TYPE_MERGE_REQUEST } from '~/issues/constants'; import { DEFAULT_DEBOUNCE_AND_THROTTLE_MS } from '~/lib/utils/constants'; -import { participantsQueries, userSearchQueries } from '~/sidebar/constants'; +import { participantsQueries, userSearchQueries } from '~/sidebar/queries/constants'; import { TYPENAME_MERGE_REQUEST } from '~/graphql_shared/constants'; import { convertToGraphQLId } from '~/graphql_shared/utils'; diff --git a/app/controllers/groups/boards_controller.rb b/app/controllers/groups/boards_controller.rb index 6bb807be1c4..cf0b6cd815a 100644 --- a/app/controllers/groups/boards_controller.rb +++ b/app/controllers/groups/boards_controller.rb @@ -8,6 +8,7 @@ class Groups::BoardsController < Groups::ApplicationController before_action do push_frontend_feature_flag(:board_multi_select, group) push_frontend_feature_flag(:apollo_boards, group) + push_frontend_feature_flag(:new_graphql_users_autocomplete, group) experiment(:prominent_create_board_btn, subject: current_user) do |e| e.control {} e.candidate {} diff --git a/app/controllers/projects/boards_controller.rb b/app/controllers/projects/boards_controller.rb index 84872d1e978..1c3463fb70c 100644 --- a/app/controllers/projects/boards_controller.rb +++ b/app/controllers/projects/boards_controller.rb @@ -8,6 +8,7 @@ class Projects::BoardsController < Projects::ApplicationController before_action do push_frontend_feature_flag(:board_multi_select, project) push_frontend_feature_flag(:apollo_boards, project) + push_frontend_feature_flag(:new_graphql_users_autocomplete, project) experiment(:prominent_create_board_btn, subject: current_user) do |e| e.control {} e.candidate {} diff --git a/app/services/ci/create_pipeline_service.rb b/app/services/ci/create_pipeline_service.rb index fe0e842f542..2231b1dd6bd 100644 --- a/app/services/ci/create_pipeline_service.rb +++ b/app/services/ci/create_pipeline_service.rb @@ -154,13 +154,6 @@ module Ci duration >= LOG_MAX_CREATION_THRESHOLD end - - l.log_when do |observations| - pipeline_includes_count = observations['pipeline_includes_count'] - next false unless pipeline_includes_count - - pipeline_includes_count.to_i > Gitlab::Ci::Config::External::Context::TEMP_MAX_INCLUDES - end end end end diff --git a/app/services/merge_requests/create_ref_service.rb b/app/services/merge_requests/create_ref_service.rb index b0039cfbf69..e0f10183bac 100644 --- a/app/services/merge_requests/create_ref_service.rb +++ b/app/services/merge_requests/create_ref_service.rb @@ -25,7 +25,9 @@ module MergeRequests source_sha = initial_source_sha # the SHA to be the merged result of the source (minus the merge commit) expected_old_oid = "" # the SHA we expect target_ref to be at prior to an update (an optimistic lock) - return ServiceResponse.error(message: 'Invalid merge source') unless first_parent_sha.present? + # TODO: Update this message with the removal of FF merge_trains_create_ref_service and update tests + # This is for compatibility with MergeToRefService during the rollout. + return ServiceResponse.error(message: '3:Invalid merge source') unless first_parent_sha.present? commit_sha, source_sha, expected_old_oid = maybe_squash!(commit_sha, source_sha, expected_old_oid) commit_sha, source_sha, expected_old_oid = maybe_rebase!(commit_sha, source_sha, expected_old_oid) diff --git a/config/feature_flags/development/merge_trains_create_ref_service.yml b/config/feature_flags/development/merge_trains_create_ref_service.yml new file mode 100644 index 00000000000..cd649589a93 --- /dev/null +++ b/config/feature_flags/development/merge_trains_create_ref_service.yml @@ -0,0 +1,8 @@ +--- +name: merge_trains_create_ref_service +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127531 +rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/420161 +milestone: '16.3' +type: development +group: group::pipeline execution +default_enabled: false diff --git a/doc/api/project_import_export.md b/doc/api/project_import_export.md index 113504aba8a..69bb19fc5d8 100644 --- a/doc/api/project_import_export.md +++ b/doc/api/project_import_export.md @@ -205,7 +205,7 @@ NOTE: The maximum import file size can be set by the Administrator. It defaults to `0` (unlimited). As an administrator, you can modify the maximum import file size. To do so, use the `max_import_size` option in the [Application settings API](settings.md#change-application-settings) or the [Admin Area](../administration/settings/account_and_limit_settings.md). Default [modified](https://gitlab.com/gitlab-org/gitlab/-/issues/251106) from 50 MB to 0 in GitLab 13.8. -## Import a file from a remote object storage (Beta) +## Import a file from a remote object storage **(BETA)** > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/282503) in GitLab 13.12 in [Beta](../policy/experiment-beta-support.md#beta) [with a flag](../administration/feature_flags.md) named `import_project_from_remote_file`. Enabled by default. diff --git a/doc/ci/environments/kubernetes_dashboard.md b/doc/ci/environments/kubernetes_dashboard.md index 998d221aa75..91d0117aee0 100644 --- a/doc/ci/environments/kubernetes_dashboard.md +++ b/doc/ci/environments/kubernetes_dashboard.md @@ -5,7 +5,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w type: reference --- -# Dashboard for Kubernetes (Beta) **(FREE ALL)** +# Dashboard for Kubernetes **(FREE ALL BETA)** > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/390769) in GitLab 16.1, with [flags](../../administration/feature_flags.md) named `environment_settings_to_graphql`, `kas_user_access`, `kas_user_access_project`, and `expose_authorized_cluster_agents`. This feature is in [Beta](../../policy/experiment-beta-support.md#beta). > - Feature flag `environment_settings_to_graphql` [removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124177) in GitLab 16.2. diff --git a/doc/ci/runners/saas/macos_saas_runner.md b/doc/ci/runners/saas/macos_saas_runner.md index 982db707525..1445ae58bd4 100644 --- a/doc/ci/runners/saas/macos_saas_runner.md +++ b/doc/ci/runners/saas/macos_saas_runner.md @@ -4,7 +4,7 @@ group: Runner info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# SaaS runners on macOS (Beta) **(PREMIUM SAAS)** +# SaaS runners on macOS **(PREMIUM SAAS BETA)** SaaS runners on macOS are in [Beta](../../../policy/experiment-beta-support.md#beta) for open source programs and customers in Premium and Ultimate plans. diff --git a/doc/ci/runners/saas/windows_saas_runner.md b/doc/ci/runners/saas/windows_saas_runner.md index d9f58b9113c..108388f22c8 100644 --- a/doc/ci/runners/saas/windows_saas_runner.md +++ b/doc/ci/runners/saas/windows_saas_runner.md @@ -4,7 +4,7 @@ group: Runner info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# SaaS runners on Windows (Beta) **(FREE SAAS)** +# SaaS runners on Windows **(FREE SAAS BETA)** SaaS runner on Windows autoscale by launching virtual machines on the Google Cloud Platform. This solution uses an diff --git a/doc/ci/yaml/includes.md b/doc/ci/yaml/includes.md index 9f4b30b313d..3703ae70b09 100644 --- a/doc/ci/yaml/includes.md +++ b/doc/ci/yaml/includes.md @@ -566,7 +566,7 @@ When the pipeline runs, GitLab: include: 'configs/**/*.yml' ``` -## Define inputs for configuration added with `include` (Beta) +## Define inputs for configuration added with `include` **(BETA)** > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/391331) in GitLab 15.11 as a Beta feature. diff --git a/doc/development/documentation/alpha_beta.md b/doc/development/documentation/alpha_beta.md index 61f07e79e12..4579c57b448 100644 --- a/doc/development/documentation/alpha_beta.md +++ b/doc/development/documentation/alpha_beta.md @@ -1,49 +1,11 @@ --- -info: For assistance with this Style Guide page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-other-projects-and-subjects -stage: none -group: unassigned +redirect_to: 'experiment_beta.md' +remove_date: '2023-11-29' --- -# Documenting Experiment and Beta features +This document was moved to [another location](experiment_beta.md). -Some features are not generally available and are instead considered -[Experiment or Beta](../../policy/experiment-beta-support.md). - -When you document a feature in one of these three statuses: - -- Add `(Experiment)` or `(Beta)` in parentheses after the page or topic title. -- Do not include `(Experiment)` or `(Beta)` in the left nav. -- Ensure the version history lists the feature's status. - -These features are usually behind a feature flag, which follow [these documentation guidelines](feature_flags.md). - -If you add details of how users should enroll, or how to contact the team with issues, -the `FLAG:` note should be above these details. - -For example: - -```markdown -## Great new feature (Experiment) - -> [Introduced](link) in GitLab 15.10. This feature is an [Experiment](<link_to>/policy/experiment-beta-support.md). - -FLAG: -On self-managed GitLab, by default this feature is not available. -To make it available, an administrator can enable the feature flag named `example_flag`. -On GitLab.com, this feature is not available. This feature is not ready for production use. - -Use this great new feature when you need to do this new thing. - -This feature is an [Experiment](<link_to>/policy/experiment-beta-support.md). To join -the list of users testing this feature, do this thing. If you find a bug, -[open an issue](link). -``` - -When the feature is ready for production, remove: - -- The text in parentheses. -- Any language about the feature not being ready for production in the body - description. -- The feature flag information if available. - -Ensure the version history is up-to-date by adding a note about the production release. +<!-- This redirect file can be deleted after <2023-11-29>. --> +<!-- Redirects that point to other docs in the same project expire in three months. --> +<!-- Redirects that point to docs in a different project or site (for example, link is not relative and starts with `https:`) expire in one year. --> +<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/redirects.html --> diff --git a/doc/development/documentation/experiment_beta.md b/doc/development/documentation/experiment_beta.md new file mode 100644 index 00000000000..fab78082cb5 --- /dev/null +++ b/doc/development/documentation/experiment_beta.md @@ -0,0 +1,49 @@ +--- +info: For assistance with this Style Guide page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-other-projects-and-subjects +stage: none +group: unassigned +--- + +# Documenting Experiment and Beta features + +Some features are not generally available and are instead considered +[Experiment or Beta](../../policy/experiment-beta-support.md). + +When you document a feature in one of these three statuses: + +- Add the tier badge after the page or topic title. +- Do not include `(Experiment)` or `(Beta)` in the left nav. +- Ensure the version history lists the feature's status. + +These features are usually behind a feature flag, which follow [these documentation guidelines](feature_flags.md). + +If you add details of how users should enroll, or how to contact the team with issues, +the `FLAG:` note should be above these details. + +For example: + +```markdown +## Great new feature **(EXPERIMENT)** + +> [Introduced](link) in GitLab 15.10. This feature is an [Experiment](<link_to>/policy/experiment-beta-support.md). + +FLAG: +On self-managed GitLab, by default this feature is not available. +To make it available, an administrator can enable the feature flag named `example_flag`. +On GitLab.com, this feature is not available. This feature is not ready for production use. + +Use this great new feature when you need to do this new thing. + +This feature is an [Experiment](<link_to>/policy/experiment-beta-support.md). To join +the list of users testing this feature, do this thing. If you find a bug, +[open an issue](link). +``` + +When the feature is ready for production, remove: + +- The text in parentheses. +- Any language about the feature not being ready for production in the body + description. +- The feature flag information if available. + +Ensure the version history is up-to-date by adding a note about the production release. diff --git a/doc/operations/incident_management/slack.md b/doc/operations/incident_management/slack.md index 82d5d8b3150..100aaa0d9bc 100644 --- a/doc/operations/incident_management/slack.md +++ b/doc/operations/incident_management/slack.md @@ -4,7 +4,7 @@ group: Respond info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# Incident management for Slack (Beta) **(FREE SAAS)** +# Incident management for Slack **(FREE SAAS BETA)** > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/344856) in GitLab 15.7 [with a flag](../../administration/feature_flags.md) named `incident_declare_slash_command`. Disabled by default. > - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/378072) in GitLab 15.10 in [Beta](../../policy/experiment-beta-support.md#beta). diff --git a/doc/user/ai_features.md b/doc/user/ai_features.md index 484d43000d9..ff4163ca7e6 100644 --- a/doc/user/ai_features.md +++ b/doc/user/ai_features.md @@ -43,7 +43,7 @@ The following feature is Generally Available: The following features are in Beta: - [Code Suggestions](project/repository/code_suggestions.md) -- [Explain this vulnerability](application_security/vulnerabilities/index.md#explaining-a-vulnerability-beta) +- [Explain this vulnerability](application_security/vulnerabilities/index.md#explaining-a-vulnerability) ## Experiment AI features diff --git a/doc/user/application_security/vulnerabilities/index.md b/doc/user/application_security/vulnerabilities/index.md index c35879609a1..359f1db481f 100644 --- a/doc/user/application_security/vulnerabilities/index.md +++ b/doc/user/application_security/vulnerabilities/index.md @@ -24,7 +24,7 @@ change its status to **Resolved**. This ensures that if it is accidentally reint merge, it is reported again as a new record. To change the status of multiple vulnerabilities, use the Vulnerability Report's [Activity filter](../vulnerability_report/index.md#activity-filter). -## Explaining a vulnerability (Beta) **(ULTIMATE SAAS)** +## Explaining a vulnerability **(ULTIMATE SAAS BETA)** > - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10368) in GitLab 16.0 as an [Experiment](../../../policy/experiment-beta-support.md#experiment) on GitLab.com. > - Promoted to [Beta](../../../policy/experiment-beta-support.md#beta) status in 16.2. diff --git a/doc/user/clusters/agent/user_access.md b/doc/user/clusters/agent/user_access.md index a5989d823f6..7d6060fb44e 100644 --- a/doc/user/clusters/agent/user_access.md +++ b/doc/user/clusters/agent/user_access.md @@ -4,7 +4,7 @@ group: Environments info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# Grant users Kubernetes access (Beta) **(FREE ALL)** +# Grant users Kubernetes access **(FREE ALL BETA)** > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/390769) in GitLab 16.1, with [flags](../../../administration/feature_flags.md) named `environment_settings_to_graphql`, `kas_user_access`, `kas_user_access_project`, and `expose_authorized_cluster_agents`. This feature is in [Beta](../../../policy/experiment-beta-support.md#beta). > - Feature flag `environment_settings_to_graphql` [removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124177) in GitLab 16.2. diff --git a/doc/user/group/import/index.md b/doc/user/group/import/index.md index 131b2d56269..7d9b63b5c49 100644 --- a/doc/user/group/import/index.md +++ b/doc/user/group/import/index.md @@ -47,7 +47,7 @@ Migrating groups by direct transfer copies the groups from one place to another. Not all group and project resources are copied. See list of copied resources below: - [Migrated group items](#migrated-group-items). -- [Migrated project items](#migrated-project-items-beta). +- [Migrated project items](#migrated-project-items). WARNING: Importing groups with projects is in [Beta](../../../policy/experiment-beta-support.md#beta). This feature is not @@ -287,7 +287,7 @@ Some group items are excluded from migration because they either: - May contain sensitive information: CI/CD variables, webhooks, and deploy tokens. - Are not supported: push rules. -### Migrated project items (Beta) +### Migrated project items **(BETA)** > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/267945) in GitLab 14.4 [with a flag](../../feature_flags.md) named `bulk_import_projects`. Disabled by default. > - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/339941) in GitLab 15.6. diff --git a/doc/user/group/saml_sso/scim_setup.md b/doc/user/group/saml_sso/scim_setup.md index f8862a8bde2..d793fc13a79 100644 --- a/doc/user/group/saml_sso/scim_setup.md +++ b/doc/user/group/saml_sso/scim_setup.md @@ -166,7 +166,8 @@ To configure Okta for SCIM: During the synchronization process, all new users: - Receive GitLab accounts. -- Are welcomed to their groups with an invitation email. You may want to warn your employees to expect this email. +- Are welcomed to their groups with an invitation email. + You can [bypass email confirmation with a verified domain](index.md#bypass-user-email-confirmation-with-verified-domains). The following diagram describes what happens when you add users to your SCIM app: diff --git a/doc/user/profile/preferences.md b/doc/user/profile/preferences.md index 6cbf4132621..7d721f72275 100644 --- a/doc/user/profile/preferences.md +++ b/doc/user/profile/preferences.md @@ -275,24 +275,54 @@ To use relative times on the GitLab UI: You can select to include the list of your external identities in the JSON Web Token information that is generated for a CI job. For more information and examples, see [Token Payload](../../ci/secrets/id_token_authentication.md#token-payload). -## Integrations +### Control follower engagement -Configure your preferences with third-party services which provide enhancements to your GitLab experience. +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/325558) in GitLab 16.0. -### Sourcegraph +Turn off the ability to follow or be followed by other GitLab users. By default, your user profile, including your name and profile photo, is public in the **Following** tabs of other users. When you deactivate this setting: -NOTE: -This setting is only visible if Sourcegraph has been enabled by a GitLab administrator. +- GitLab deletes all of your followers and followed connections. +- GitLab automatically removes your user profile from the pages of each connection. -Manage the availability of integrated code intelligence features powered by -Sourcegraph. View [the Sourcegraph feature documentation](../../integration/sourcegraph.md#enable-sourcegraph-in-user-preferences) -for more information. +To remove the ability to be followed by and follow other users: -### Gitpod +1. On the left sidebar, select your avatar. +1. Select **Preferences**. +1. Clear the **Enable follow users** checkbox. +1. Select **Save changes**. + +To access your **Followers** and **Following** tabs: + +- On the left sidebar, select your avatar > select your name or username. +- Select **Followers** or **Following**. + +## Integrate your GitLab instance with third-party services + +### Integrate your GitLab instance with Gitpod + +Configure your GitLab instance with Gitpod when you want to launch and manage code directly from your GitLab browser. Gitpod automatically prepares and builds development environments for your projects. + +To integrate with Gitpod: + +1. On the left sidebar, select your avatar. +1. Select **Preferences**. +1. Find the **Integrations** section. +1. Select the **Enable Gitpod integration** checkbox. +1. Select **Save changes**. + +### Integrate your GitLab instance with Sourcegraph + +GitLab supports Sourcegraph integration for all public projects on GitLab. + +To integrate with Sourcegraph: + +1. On the left sidebar, select your avatar. +1. Select **Preferences**. +1. Find the **Integrations** section. +1. Select the **Enable integrated code intelligence on code views** checkbox. +1. Select **Save changes**. -Enable and disable the [GitLab-Gitpod integration](../../integration/gitpod.md). This is only -visible after the integration is configured by a GitLab administrator. View -[the Gitpod feature documentation](../../integration/gitpod.md) for more information. +You must be the administrator of the GitLab instance to configure GitLab with Sourcegraph. <!-- ## Troubleshooting diff --git a/doc/user/project/remote_development/connect_machine.md b/doc/user/project/remote_development/connect_machine.md index ec3d63462f3..6bbc0b8123a 100644 --- a/doc/user/project/remote_development/connect_machine.md +++ b/doc/user/project/remote_development/connect_machine.md @@ -4,7 +4,7 @@ group: IDE info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# Tutorial: Connect a remote machine to the Web IDE (Beta) **(FREE ALL)** +# Tutorial: Connect a remote machine to the Web IDE **(FREE ALL BETA)** > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/95169) in GitLab 15.4 [with a flag](../../../administration/feature_flags.md) named `vscode_web_ide`. Disabled by default. > - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/371084) in GitLab 15.7. diff --git a/doc/user/project/remote_development/index.md b/doc/user/project/remote_development/index.md index 16110af984a..8ca505be500 100644 --- a/doc/user/project/remote_development/index.md +++ b/doc/user/project/remote_development/index.md @@ -4,7 +4,7 @@ group: IDE info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# Remote development (Beta) **(FREE ALL)** +# Remote development **(FREE ALL BETA)** > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/95169) in GitLab 15.4 [with a flag](../../../administration/feature_flags.md) named `vscode_web_ide`. Disabled by default. > - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/371084) in GitLab 15.7. diff --git a/doc/user/project/repository/code_suggestions/index.md b/doc/user/project/repository/code_suggestions/index.md index 7e0fbea59c8..628e6ac2296 100644 --- a/doc/user/project/repository/code_suggestions/index.md +++ b/doc/user/project/repository/code_suggestions/index.md @@ -5,7 +5,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w type: index, reference --- -# Code Suggestions (Beta) **(FREE ALL)** +# Code Suggestions **(FREE ALL BETA)** > - [Introduced support for Google Vertex AI Codey APIs](https://gitlab.com/groups/gitlab-org/-/epics/10562) in GitLab 16.1. > - [Removed support for GitLab native model](https://gitlab.com/groups/gitlab-org/-/epics/10752) in GitLab 16.2. diff --git a/doc/user/project/repository/code_suggestions/self_managed.md b/doc/user/project/repository/code_suggestions/self_managed.md index b3aa0434e8a..7c88937dac9 100644 --- a/doc/user/project/repository/code_suggestions/self_managed.md +++ b/doc/user/project/repository/code_suggestions/self_managed.md @@ -5,7 +5,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w type: index, reference --- -# Code Suggestions on self-managed GitLab (Beta) **(PREMIUM SELF)** +# Code Suggestions on self-managed GitLab **(PREMIUM SELF BETA)** > - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10653) in GitLab 16.1 as [Beta](../../../../policy/experiment-beta-support.md#beta) on self-managed GitLab. > - [Introduced support for Google Vertex AI Codey APIs](https://gitlab.com/groups/gitlab-org/-/epics/10562) in GitLab 16.1. diff --git a/doc/user/project/repository/code_suggestions/troubleshooting.md b/doc/user/project/repository/code_suggestions/troubleshooting.md index b4764c7ad75..69cca42e877 100644 --- a/doc/user/project/repository/code_suggestions/troubleshooting.md +++ b/doc/user/project/repository/code_suggestions/troubleshooting.md @@ -5,7 +5,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w type: index, reference --- -# Troubleshooting Code Suggestions (Beta) **(FREE ALL)** +# Troubleshooting Code Suggestions **(FREE ALL BETA)** When working with Code Suggestions, you might encounter the following issues. diff --git a/doc/user/project/service_desk/configure.md b/doc/user/project/service_desk/configure.md index 3dc4fd7f481..5231bcd62a2 100644 --- a/doc/user/project/service_desk/configure.md +++ b/doc/user/project/service_desk/configure.md @@ -155,7 +155,7 @@ To edit the custom email display name: 1. Below **Email display name**, enter a new name. 1. Select **Save changes**. -## Custom email address (Beta) +## Custom email address **(BETA)** > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/329990) in GitLab 16.3 [with a flag](../../../administration/feature_flags.md) named `service_desk_custom_email`. Disabled by default. diff --git a/doc/user/project/service_desk/index.md b/doc/user/project/service_desk/index.md index 6f3fb3751d7..ab807553436 100644 --- a/doc/user/project/service_desk/index.md +++ b/doc/user/project/service_desk/index.md @@ -46,7 +46,7 @@ Meanwhile: - [Customize emails sent to the requester](configure.md#customize-emails-sent-to-the-requester) - [Use a custom template for Service Desk tickets](configure.md#use-a-custom-template-for-service-desk-tickets) - [Support Bot user](configure.md#support-bot-user) - - [Custom email address (Beta)](configure.md#custom-email-address-beta) + - [Custom email address (Beta)](configure.md#custom-email-address) - [Use an additional Service Desk alias email](configure.md#use-an-additional-service-desk-alias-email) - [Configure email ingestion in multi-node environments](configure.md#configure-email-ingestion-in-multi-node-environments) - [Use Service Desk](using_service_desk.md#use-service-desk) diff --git a/doc/user/project/web_ide/index.md b/doc/user/project/web_ide/index.md index 762878b65f6..9ded182e683 100644 --- a/doc/user/project/web_ide/index.md +++ b/doc/user/project/web_ide/index.md @@ -203,7 +203,7 @@ To protect your privacy and data: - Carefully review the permissions requested by an extension before you install the extension. - Keep your extensions up to date to ensure that any security or privacy vulnerabilities are addressed promptly. --> -## Interactive web terminals for the Web IDE (Beta) +## Interactive web terminals for the Web IDE **(BETA)** WARNING: This feature is in [Beta](../../../policy/experiment-beta-support.md#beta) and subject to change without notice. diff --git a/doc/user/workspace/configuration.md b/doc/user/workspace/configuration.md index ba507b1159c..63ea9955f0c 100644 --- a/doc/user/workspace/configuration.md +++ b/doc/user/workspace/configuration.md @@ -4,7 +4,7 @@ group: IDE info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# Workspace configuration (Beta) **(PREMIUM ALL)** +# Workspace configuration **(PREMIUM ALL BETA)** > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/112397) in GitLab 15.11 [with a flag](../../administration/feature_flags.md) named `remote_development_feature_flag`. Disabled by default. > - [Enabled on GitLab.com and self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/391543) in GitLab 16.0. diff --git a/doc/user/workspace/create_image.md b/doc/user/workspace/create_image.md index 43140a622e0..df70ff31194 100644 --- a/doc/user/workspace/create_image.md +++ b/doc/user/workspace/create_image.md @@ -4,7 +4,7 @@ group: IDE info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# Tutorial: Create a custom workspace image that supports arbitrary user IDs (Beta) **(PREMIUM ALL)** +# Tutorial: Create a custom workspace image that supports arbitrary user IDs **(PREMIUM ALL BETA)** > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/112397) in GitLab 15.11 [with a flag](../../administration/feature_flags.md) named `remote_development_feature_flag`. Disabled by default. > - [Enabled on GitLab.com and self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/391543) in GitLab 16.0. diff --git a/doc/user/workspace/index.md b/doc/user/workspace/index.md index 1059bc5cc94..723d68f428f 100644 --- a/doc/user/workspace/index.md +++ b/doc/user/workspace/index.md @@ -4,7 +4,7 @@ group: IDE info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# Workspaces (Beta) **(PREMIUM ALL)** +# Workspaces **(PREMIUM ALL BETA)** > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/112397) in GitLab 15.11 [with a flag](../../administration/feature_flags.md) named `remote_development_feature_flag`. Disabled by default. > - [Enabled on GitLab.com and self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/391543) in GitLab 16.0. diff --git a/lib/gitlab/ci/config/external/context.rb b/lib/gitlab/ci/config/external/context.rb index 57506aaf37b..0a524fdba66 100644 --- a/lib/gitlab/ci/config/external/context.rb +++ b/lib/gitlab/ci/config/external/context.rb @@ -9,8 +9,6 @@ module Gitlab TimeoutError = Class.new(StandardError) - TEMP_MAX_INCLUDES = 100 # For logging; to be removed in https://gitlab.com/gitlab-org/gitlab/-/issues/396776 - include ::Gitlab::Utils::StrongMemoize attr_reader :project, :sha, :user, :parent_pipeline, :variables, :pipeline_config diff --git a/lib/gitlab/ci/pipeline/chain/command.rb b/lib/gitlab/ci/pipeline/chain/command.rb index 4bc2f6c7be7..cc3aa33e93b 100644 --- a/lib/gitlab/ci/pipeline/chain/command.rb +++ b/lib/gitlab/ci/pipeline/chain/command.rb @@ -128,10 +128,6 @@ module Gitlab .observe({ plan: project.actual_plan_name }, jobs_count) end - def observe_pipeline_includes_count(pipeline) - logger.observe(:pipeline_includes_count, pipeline.config_metadata&.[](:includes)&.count, once: true) - end - def increment_pipeline_failure_reason_counter(reason) metrics.pipeline_failure_reason_counter .increment(reason: (reason || :unknown_failure).to_s) diff --git a/lib/gitlab/ci/pipeline/chain/sequence.rb b/lib/gitlab/ci/pipeline/chain/sequence.rb index dd097187955..de147914850 100644 --- a/lib/gitlab/ci/pipeline/chain/sequence.rb +++ b/lib/gitlab/ci/pipeline/chain/sequence.rb @@ -30,7 +30,6 @@ module Gitlab @command.observe_creation_duration(current_monotonic_time - @start) @command.observe_pipeline_size(@pipeline) @command.observe_jobs_count_in_alive_pipelines - @command.observe_pipeline_includes_count(@pipeline) @pipeline end diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb index 27c4ec2f7be..a294dcfb1c9 100644 --- a/lib/gitlab/gon_helper.rb +++ b/lib/gitlab/gon_helper.rb @@ -28,6 +28,7 @@ module Gitlab current_user) && Gitlab::CurrentSettings.sentry_enabled gon.sentry_dsn = Gitlab::CurrentSettings.sentry_clientside_dsn gon.sentry_environment = Gitlab::CurrentSettings.sentry_environment + gon.sentry_clientside_traces_sample_rate = Gitlab::CurrentSettings.sentry_clientside_traces_sample_rate end gon.recaptcha_api_server_url = ::Recaptcha.configuration.api_server_url diff --git a/package.json b/package.json index 637bb99f021..c22445b66d2 100644 --- a/package.json +++ b/package.json @@ -192,7 +192,7 @@ "scrollparent": "^2.0.1", "semver": "^7.3.4", "sentrybrowser5": "npm:@sentry/browser@5.30.0", - "sentrybrowser7": "npm:@sentry/browser@^7.21.1", + "sentrybrowser": "npm:@sentry/browser@^7.21.1", "sortablejs": "^1.10.2", "string-hash": "1.1.3", "style-loader": "^2.0.0", diff --git a/qa/qa/specs/features/api/1_manage/user_access_termination_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/user/user_access_termination_spec.rb index 9d44cd88bb7..b67143276e8 100644 --- a/qa/qa/specs/features/api/1_manage/user_access_termination_spec.rb +++ b/qa/qa/specs/features/browser_ui/1_manage/user/user_access_termination_spec.rb @@ -4,6 +4,7 @@ module QA RSpec.describe 'Manage' do # TODO: `:reliable` should be added back once https://gitlab.com/gitlab-org/gitlab/-/issues/359278 is resolved describe 'User', :requires_admin, product_group: :authentication_and_authorization do + # rubocop:disable RSpec/InstanceVariable before(:all) do admin_api_client = Runtime::API::Client.as_admin @@ -11,21 +12,30 @@ module QA @user_api_client = Runtime::API::Client.new(:gitlab, user: @user) - @sandbox = create(:sandbox, path: "sandbox-for-access-termination-#{SecureRandom.hex(4)}", api_client: admin_api_client) + # Use UI to create the top-level group as the `top_level_group_creation_enabled` feature flag + # could be disabled on live environments + @sandbox = Resource::Sandbox.fabricate! do |sandbox_group| + sandbox_group.path = "sandbox-for-access-termination-#{SecureRandom.hex(4)}" + end - group = create(:group, path: "group-to-test-access-termination-#{SecureRandom.hex(8)}", sandbox: @sandbox, api_client: admin_api_client) + group = create(:group, path: "group-to-test-access-termination-#{SecureRandom.hex(8)}", sandbox: @sandbox) @sandbox.add_member(@user) - @project = create(:project, :with_readme, name: 'project-for-user-group-access-termination', group: group, api_client: admin_api_client) + @project = create(:project, :with_readme, name: 'project-for-user-group-access-termination', group: group) + end + + after(:all) do + @sandbox.remove_via_api! end - context 'after parent group membership termination' do + context 'when parent group membership is terminated' do before do @sandbox.remove_member(@user) end - it 'is not allowed to push code via the CLI', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347863' do + it 'is not allowed to push code via the CLI', + testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347863' do QA::Support::Retrier.retry_on_exception(max_attempts: 5, sleep_interval: 2) do expect do Resource::Repository::Push.fabricate! do |push| @@ -40,7 +50,8 @@ module QA end end - it 'is not allowed to create a file via the API', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347864' do + it 'is not allowed to create a file via the API', + testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347864' do QA::Support::Retrier.retry_on_exception(max_attempts: 5, sleep_interval: 2) do expect do create(:file, @@ -51,7 +62,8 @@ module QA end end - it 'is not allowed to commit via the API', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347865' do + it 'is not allowed to commit via the API', + testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347865' do QA::Support::Retrier.retry_on_exception(max_attempts: 5, sleep_interval: 2) do expect do Resource::Repository::Commit.fabricate_via_api! do |commit| @@ -62,14 +74,12 @@ module QA commit.commit_message = 'Add new file' commit.add_files([{ file_path: 'test.txt', content: 'new file' }]) end - end.to raise_error(Resource::ApiFabricator::ResourceFabricationFailedError, /403 Forbidden - You are not allowed to push into this branch/) + end.to raise_error(Resource::ApiFabricator::ResourceFabricationFailedError, + /403 Forbidden - You are not allowed to push into this branch/) end end end - - after(:all) do - @sandbox.remove_via_api! - end + # rubocop:enable RSpec/InstanceVariable end end end diff --git a/spec/features/boards/board_filters_spec.rb b/spec/features/boards/board_filters_spec.rb index 006b7ce45d4..bfed6e338ae 100644 --- a/spec/features/boards/board_filters_spec.rb +++ b/spec/features/boards/board_filters_spec.rb @@ -3,9 +3,9 @@ require 'spec_helper' RSpec.describe 'Issue board filters', :js, feature_category: :team_planning do - let_it_be(:project) { create(:project, :repository) } + let_it_be(:group) { create(:group) } + let_it_be(:project) { create(:project, :repository, group: group) } let_it_be(:user) { create(:user) } - let_it_be(:board) { create(:board, project: project) } let_it_be(:project_label) { create(:label, project: project, title: 'Label') } let_it_be(:milestone_1) { create(:milestone, project: project, due_date: 3.days.from_now) } let_it_be(:milestone_2) { create(:milestone, project: project, due_date: Date.tomorrow) } @@ -21,166 +21,210 @@ RSpec.describe 'Issue board filters', :js, feature_category: :team_planning do let(:filter_first_suggestion) { find('.gl-filtered-search-suggestion-list').first('.gl-filtered-search-suggestion') } let(:filter_submit) { find('.gl-search-box-by-click-search-button') } - before do - stub_feature_flags(apollo_boards: false) - project.add_maintainer(user) - sign_in(user) + context 'for a project board' do + let_it_be(:board) { create(:board, project: project) } - visit_project_board - end - - shared_examples 'loads all the users when opened' do - it 'and submit one as filter', :aggregate_failures do - expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 2) + before do + stub_feature_flags(apollo_boards: false) + project.add_maintainer(user) + sign_in(user) + visit project_board_path(project, board) wait_for_requests + end - expect_filtered_search_dropdown_results(filter_dropdown, 4) + shared_examples 'loads all the users when opened' do + it 'and submit one as filter', :aggregate_failures do + expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 2) - click_on user.username - filter_submit.click + wait_for_requests - expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 1) - expect(find('.board-card')).to have_content(issue.title) - end - end + expect_filtered_search_dropdown_results(filter_dropdown, 3) - describe 'filters by assignee' do - before do - set_filter('assignee') - end + click_on user.username + filter_submit.click - it_behaves_like 'loads all the users when opened', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/351426' do - let(:issue) { issue_2 } + expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 1) + expect(find('.board-card')).to have_content(issue.title) + end end - end - describe 'filters by author' do - before do - set_filter('author') - end + describe 'filters by assignee' do + before do + set_filter('assignee') + end - it_behaves_like 'loads all the users when opened' do - let(:issue) { issue_1 } + it_behaves_like 'loads all the users when opened', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/351426' do + let(:issue) { issue_2 } + end end - end - describe 'filters by label' do - before do - set_filter('label') + describe 'filters by author' do + before do + set_filter('author') + end + + it_behaves_like 'loads all the users when opened' do + let(:issue) { issue_1 } + end end - it 'loads all the labels when opened and submit one as filter', :aggregate_failures do - expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 2) + describe 'filters by label' do + before do + set_filter('label') + end - expect_filtered_search_dropdown_results(filter_dropdown, 3) + it 'loads all the labels when opened and submit one as filter', :aggregate_failures do + expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 2) - filter_dropdown.click_on project_label.title - filter_submit.click + expect_filtered_search_dropdown_results(filter_dropdown, 3) - expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 1) - expect(find('.board-card')).to have_content(issue_2.title) - end - end + filter_dropdown.click_on project_label.title + filter_submit.click - describe 'filters by releases' do - before do - set_filter('release') + expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 1) + expect(find('.board-card')).to have_content(issue_2.title) + end end - it 'loads all the releases when opened and submit one as filter', :aggregate_failures do - expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 2) + describe 'filters by releases' do + before do + set_filter('release') + end - expect_filtered_search_dropdown_results(filter_dropdown, 2) + it 'loads all the releases when opened and submit one as filter', :aggregate_failures do + expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 2) - click_on release.tag - filter_submit.click + expect_filtered_search_dropdown_results(filter_dropdown, 2) - expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 1) - expect(find('.board-card')).to have_content(issue_1.title) - end - end + click_on release.tag + filter_submit.click - describe 'filters by confidentiality' do - before do - filter_input.click - filter_input.set("confidential:") + expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 1) + expect(find('.board-card')).to have_content(issue_1.title) + end end - it 'loads all the confidentiality options when opened and submit one as filter', :aggregate_failures do - expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 2) + describe 'filters by confidentiality' do + before do + filter_input.click + filter_input.set("confidential:") + end - expect_filtered_search_dropdown_results(filter_dropdown, 2) + it 'loads all the confidentiality options when opened and submit one as filter', :aggregate_failures do + expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 2) - filter_dropdown.click_on 'Yes' - filter_submit.click + expect_filtered_search_dropdown_results(filter_dropdown, 2) - expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 1) - expect(find('.board-card')).to have_content(issue_2.title) - end - end + filter_dropdown.click_on 'Yes' + filter_submit.click - describe 'filters by milestone' do - before do - set_filter('milestone') + expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 1) + expect(find('.board-card')).to have_content(issue_2.title) + end end - it 'loads all the milestones when opened and submit one as filter', :aggregate_failures do - expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 2) + describe 'filters by milestone' do + before do + set_filter('milestone') + end - expect_filtered_search_dropdown_results(filter_dropdown, 6) - expect(filter_dropdown).to have_content('None') - expect(filter_dropdown).to have_content('Any') - expect(filter_dropdown).to have_content('Started') - expect(filter_dropdown).to have_content('Upcoming') + it 'loads all the milestones when opened and submit one as filter', :aggregate_failures do + expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 2) - dropdown_nodes = page.find_all('.gl-filtered-search-suggestion-list > .gl-filtered-search-suggestion') + expect_filtered_search_dropdown_results(filter_dropdown, 6) + expect(filter_dropdown).to have_content('None') + expect(filter_dropdown).to have_content('Any') + expect(filter_dropdown).to have_content('Started') + expect(filter_dropdown).to have_content('Upcoming') - expect(dropdown_nodes[4]).to have_content(milestone_2.title) - expect(dropdown_nodes.last).to have_content(milestone_1.title) + dropdown_nodes = page.find_all('.gl-filtered-search-suggestion-list > .gl-filtered-search-suggestion') - click_on milestone_1.title - filter_submit.click + expect(dropdown_nodes[4]).to have_content(milestone_2.title) + expect(dropdown_nodes.last).to have_content(milestone_1.title) - expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 1) + click_on milestone_1.title + filter_submit.click + + expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 1) + end end - end - describe 'filters by reaction emoji' do - before do - set_filter('my-reaction') + describe 'filters by reaction emoji' do + before do + set_filter('my-reaction') + end + + it 'loads all the emojis when opened and submit one as filter', :aggregate_failures do + expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 2) + + expect_filtered_search_dropdown_results(filter_dropdown, 3) + + click_on 'thumbsup' + filter_submit.click + + expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 1) + expect(find('.board-card')).to have_content(issue_1.title) + end end - it 'loads all the emojis when opened and submit one as filter', :aggregate_failures do - expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 2) + describe 'filters by type' do + let_it_be(:incident) { create(:incident, project: project) } - expect_filtered_search_dropdown_results(filter_dropdown, 3) + before do + set_filter('type') + end - click_on 'thumbsup' - filter_submit.click + it 'loads all the types when opened and submit one as filter', :aggregate_failures do + expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 3) - expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 1) - expect(find('.board-card')).to have_content(issue_1.title) + expect_filtered_search_dropdown_results(filter_dropdown, 2) + + click_on 'Incident' + filter_submit.click + + expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 1) + expect(find('.board-card')).to have_content(incident.title) + end end end - describe 'filters by type' do - let_it_be(:incident) { create(:incident, project: project) } + context 'for a group board' do + let_it_be(:board) { create(:board, group: group) } + + let_it_be(:child_project_member) { create(:user).tap { |u| project.add_maintainer(u) } } before do - set_filter('type') + stub_feature_flags(apollo_boards: false) + + group.add_maintainer(user) + sign_in(user) end - it 'loads all the types when opened and submit one as filter', :aggregate_failures do - expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 3) + context 'when filtering by assignee' do + it 'includes descendant project members in autocomplete' do + visit group_board_path(group, board) + wait_for_requests + + set_filter('assignee') - expect_filtered_search_dropdown_results(filter_dropdown, 2) + expect(page).to have_css('.gl-filtered-search-suggestion', text: child_project_member.name) + end - click_on 'Incident' - filter_submit.click + context 'when new_graphql_users_autocomplete is disabled' do + before do + stub_feature_flags(new_graphql_users_autocomplete: false) + end - expect(find('.board:nth-child(1)')).to have_selector('.board-card', count: 1) - expect(find('.board-card')).to have_content(incident.title) + it 'does not include descendant project members in autocomplete' do + visit group_board_path(group, board) + wait_for_requests + + set_filter('assignee') + + expect(page).not_to have_css('.gl-filtered-search-suggestion', text: child_project_member.name) + end + end end end @@ -193,9 +237,4 @@ RSpec.describe 'Issue board filters', :js, feature_category: :team_planning do def expect_filtered_search_dropdown_results(filter_dropdown, count) expect(filter_dropdown).to have_selector('.gl-dropdown-item', count: count) end - - def visit_project_board - visit project_board_path(project, board) - wait_for_requests - end end diff --git a/spec/frontend/jobs/components/job/sidebar_header_spec.js b/spec/frontend/jobs/components/job/sidebar_header_spec.js index cf182330578..5f09d574f52 100644 --- a/spec/frontend/jobs/components/job/sidebar_header_spec.js +++ b/spec/frontend/jobs/components/job/sidebar_header_spec.js @@ -53,6 +53,8 @@ describe('Sidebar Header', () => { const findCancelButton = () => wrapper.findByTestId('cancel-button'); const findEraseButton = () => wrapper.findByTestId('job-log-erase-link'); + const findNewIssueButton = () => wrapper.findByTestId('job-new-issue'); + const findTerminalLink = () => wrapper.findByTestId('terminal-link'); const findJobName = () => wrapper.findByTestId('job-name'); const findRetryButton = () => wrapper.findComponent(JobRetryButton); @@ -67,6 +69,8 @@ describe('Sidebar Header', () => { expect(findCancelButton().exists()).toBe(false); expect(findEraseButton().exists()).toBe(false); expect(findRetryButton().exists()).toBe(false); + expect(findNewIssueButton().exists()).toBe(false); + expect(findTerminalLink().exists()).toBe(false); }); it('renders a retry button with a path', async () => { @@ -83,5 +87,15 @@ describe('Sidebar Header', () => { await createComponentWithApollo({ restJob: { erase_path: 'erase/path' } }); expect(findEraseButton().exists()).toBe(true); }); + + it('should render link to new issue', async () => { + await createComponentWithApollo({ restJob: { new_issue_path: 'new/issue/path' } }); + expect(findNewIssueButton().attributes('href')).toBe('new/issue/path'); + }); + + it('should render terminal link', async () => { + await createComponentWithApollo({ restJob: { terminal_path: 'terminal/path' } }); + expect(findTerminalLink().attributes('href')).toBe('terminal/path'); + }); }); }); diff --git a/spec/frontend/jobs/components/job/sidebar_spec.js b/spec/frontend/jobs/components/job/sidebar_spec.js index fbff64b4d78..6c5ed075b85 100644 --- a/spec/frontend/jobs/components/job/sidebar_spec.js +++ b/spec/frontend/jobs/components/job/sidebar_spec.js @@ -20,8 +20,6 @@ describe('Sidebar details block', () => { const forwardDeploymentFailure = 'forward_deployment_failure'; const findModal = () => wrapper.findComponent(JobRetryForwardDeploymentModal); const findArtifactsBlock = () => wrapper.findComponent(ArtifactsBlock); - const findNewIssueButton = () => wrapper.findByTestId('job-new-issue'); - const findTerminalLink = () => wrapper.findByTestId('terminal-link'); const findJobStagesDropdown = () => wrapper.findComponent(StagesDropdown); const findJobsContainer = () => wrapper.findComponent(JobsContainer); @@ -48,36 +46,6 @@ describe('Sidebar details block', () => { }); }); - describe('without terminal path', () => { - it('does not render terminal link', async () => { - createWrapper(); - await store.dispatch('receiveJobSuccess', job); - - expect(findTerminalLink().exists()).toBe(false); - }); - }); - - describe('with terminal path', () => { - it('renders terminal link', async () => { - createWrapper(); - await store.dispatch('receiveJobSuccess', { ...job, terminal_path: 'job/43123/terminal' }); - - expect(findTerminalLink().exists()).toBe(true); - }); - }); - - describe('actions', () => { - beforeEach(() => { - createWrapper(); - return store.dispatch('receiveJobSuccess', job); - }); - - it('should render link to new issue', () => { - expect(findNewIssueButton().attributes('href')).toBe(job.new_issue_path); - expect(findNewIssueButton().text()).toBe('New issue'); - }); - }); - describe('forward deployment failure', () => { describe('when the relevant data is missing', () => { it.each` diff --git a/spec/frontend/sentry/init_sentry_spec.js b/spec/frontend/sentry/init_sentry_spec.js index 9f9415f451d..8e46a63775b 100644 --- a/spec/frontend/sentry/init_sentry_spec.js +++ b/spec/frontend/sentry/init_sentry_spec.js @@ -1,4 +1,4 @@ -import * as Sentry from 'sentrybrowser7'; +import * as Sentry from 'sentrybrowser'; import { initSentry } from '~/sentry/init_sentry'; @@ -11,7 +11,7 @@ const mockRevision = '00112233'; const mockFeatureCategory = 'my_feature_category'; const mockPage = 'index:page'; -jest.mock('sentrybrowser7'); +jest.mock('sentrybrowser'); describe('SentryConfig', () => { beforeEach(() => { diff --git a/spec/frontend/sidebar/components/confidential/sidebar_confidentiality_form_spec.js b/spec/frontend/sidebar/components/confidential/sidebar_confidentiality_form_spec.js index 1ca20dad1c6..476448ef5ab 100644 --- a/spec/frontend/sidebar/components/confidential/sidebar_confidentiality_form_spec.js +++ b/spec/frontend/sidebar/components/confidential/sidebar_confidentiality_form_spec.js @@ -4,7 +4,7 @@ import { nextTick } from 'vue'; import waitForPromises from 'helpers/wait_for_promises'; import { createAlert } from '~/alert'; import SidebarConfidentialityForm from '~/sidebar/components/confidential/sidebar_confidentiality_form.vue'; -import { confidentialityQueries } from '~/sidebar/constants'; +import { confidentialityQueries } from '~/sidebar/queries/constants'; jest.mock('~/alert'); diff --git a/spec/frontend/sidebar/components/incidents/sidebar_escalation_status_spec.js b/spec/frontend/sidebar/components/incidents/sidebar_escalation_status_spec.js index 00b57b4916e..f3d50f17e2d 100644 --- a/spec/frontend/sidebar/components/incidents/sidebar_escalation_status_spec.js +++ b/spec/frontend/sidebar/components/incidents/sidebar_escalation_status_spec.js @@ -11,11 +11,8 @@ import { createMockDirective, getBinding } from 'helpers/vue_mock_directive'; import { mountExtended } from 'helpers/vue_test_utils_helper'; import SidebarEscalationStatus from '~/sidebar/components/incidents/sidebar_escalation_status.vue'; import SidebarEditableItem from '~/sidebar/components/sidebar_editable_item.vue'; -import { - escalationStatusQuery, - escalationStatusMutation, - STATUS_ACKNOWLEDGED, -} from '~/sidebar/constants'; +import { STATUS_ACKNOWLEDGED } from '~/sidebar/constants'; +import { escalationStatusQuery, escalationStatusMutation } from '~/sidebar/queries/constants'; import waitForPromises from 'helpers/wait_for_promises'; import EscalationStatus from 'ee_else_ce/sidebar/components/incidents/escalation_status.vue'; import { createAlert } from '~/alert'; diff --git a/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view_spec.js b/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view_spec.js index 9c8d9656955..6de113ba1f9 100644 --- a/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view_spec.js +++ b/spec/frontend/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view_spec.js @@ -5,7 +5,7 @@ import VueApollo from 'vue-apollo'; import createMockApollo from 'helpers/mock_apollo_helper'; import waitForPromises from 'helpers/wait_for_promises'; import { createAlert } from '~/alert'; -import { workspaceLabelsQueries } from '~/sidebar/constants'; +import { workspaceLabelsQueries } from '~/sidebar/queries/constants'; import DropdownContentsCreateView from '~/sidebar/components/labels/labels_select_widget/dropdown_contents_create_view.vue'; import createLabelMutation from '~/sidebar/components/labels/labels_select_widget/graphql/create_label.mutation.graphql'; import { DEFAULT_LABEL_COLOR } from '~/sidebar/components/labels/labels_select_widget/constants'; diff --git a/spec/lib/gitlab/gon_helper_spec.rb b/spec/lib/gitlab/gon_helper_spec.rb index 1135cfc22ac..bcf1a7fcf69 100644 --- a/spec/lib/gitlab/gon_helper_spec.rb +++ b/spec/lib/gitlab/gon_helper_spec.rb @@ -58,6 +58,7 @@ RSpec.describe Gitlab::GonHelper do context 'when sentry is configured' do let(:clientside_dsn) { 'https://xxx@sentry.example.com/1' } let(:environment) { 'staging' } + let(:sentry_clientside_traces_sample_rate) { 0.5 } context 'with legacy sentry configuration' do before do @@ -77,6 +78,15 @@ RSpec.describe Gitlab::GonHelper do stub_application_setting(sentry_enabled: true) stub_application_setting(sentry_clientside_dsn: clientside_dsn) stub_application_setting(sentry_environment: environment) + stub_application_setting(sentry_clientside_traces_sample_rate: sentry_clientside_traces_sample_rate) + end + + it 'sets sentry dsn and environment from config' do + expect(gon).to receive(:sentry_dsn=).with(clientside_dsn) + expect(gon).to receive(:sentry_environment=).with(environment) + expect(gon).to receive(:sentry_clientside_traces_sample_rate=).with(sentry_clientside_traces_sample_rate) + + helper.add_gon_variables end context 'when enable_new_sentry_clientside_integration is disabled' do @@ -87,19 +97,8 @@ RSpec.describe Gitlab::GonHelper do it 'does not set sentry dsn and environment from config' do expect(gon).not_to receive(:sentry_dsn=).with(clientside_dsn) expect(gon).not_to receive(:sentry_environment=).with(environment) - - helper.add_gon_variables - end - end - - context 'when enable_new_sentry_clientside_integration is enabled' do - before do - stub_feature_flags(enable_new_sentry_clientside_integration: true) - end - - it 'sets sentry dsn and environment from config' do - expect(gon).to receive(:sentry_dsn=).with(clientside_dsn) - expect(gon).to receive(:sentry_environment=).with(environment) + expect(gon).not_to receive(:sentry_clientside_traces_sample_rate=) + .with(sentry_clientside_traces_sample_rate) helper.add_gon_variables end diff --git a/spec/services/ci/create_pipeline_service/logger_spec.rb b/spec/services/ci/create_pipeline_service/logger_spec.rb index 6a1987fcc7c..6b4a1809d9a 100644 --- a/spec/services/ci/create_pipeline_service/logger_spec.rb +++ b/spec/services/ci/create_pipeline_service/logger_spec.rb @@ -139,74 +139,5 @@ RSpec.describe Ci::CreatePipelineService, # rubocop: disable RSpec/FilePath expect(pipeline).to be_created_successfully end end - - describe 'pipeline includes count' do - before do - stub_const('Gitlab::Ci::Config::External::Context::TEMP_MAX_INCLUDES', 2) - end - - context 'when the includes count exceeds the maximum' do - before do - allow_next_instance_of(Ci::Pipeline) do |pipeline| - allow(pipeline).to receive(:config_metadata) - .and_return({ includes: [{ file: 1 }, { file: 2 }, { file: 3 }] }) - end - end - - it 'creates a log entry' do - expect(Gitlab::AppJsonLogger) - .to receive(:info) - .with(a_hash_including({ 'pipeline_includes_count' => 3 })) - .and_call_original - - expect(pipeline).to be_created_successfully - end - end - - context 'when the includes count does not exceed the maximum' do - before do - allow_next_instance_of(Ci::Pipeline) do |pipeline| - allow(pipeline).to receive(:config_metadata) - .and_return({ includes: [{ file: 1 }, { file: 2 }] }) - end - end - - it 'does not create a log entry but it collects the data' do - expect(Gitlab::AppJsonLogger).not_to receive(:info) - expect(pipeline).to be_created_successfully - - expect(service.logger.observations_hash) - .to match(a_hash_including({ 'pipeline_includes_count' => 2 })) - end - end - - context 'when the includes data is nil' do - before do - allow_next_instance_of(Ci::Pipeline) do |pipeline| - allow(pipeline).to receive(:config_metadata) - .and_return({}) - end - end - - it 'does not create a log entry' do - expect(Gitlab::AppJsonLogger).not_to receive(:info) - expect(pipeline).to be_created_successfully - end - end - - context 'when the pipeline config_metadata is nil' do - before do - allow_next_instance_of(Ci::Pipeline) do |pipeline| - allow(pipeline).to receive(:config_metadata) - .and_return(nil) - end - end - - it 'does not create a log entry but it collects the data' do - expect(Gitlab::AppJsonLogger).not_to receive(:info) - expect(pipeline).to be_created_successfully - end - end - end end end diff --git a/yarn.lock b/yarn.lock index c50c418fc94..b5adf1da8ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11457,7 +11457,7 @@ send@0.17.2: "@sentry/utils" "5.30.0" tslib "^1.9.3" -"sentrybrowser7@npm:@sentry/browser@^7.21.1": +"sentrybrowser@npm:@sentry/browser@^7.21.1": version "7.21.1" resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.21.1.tgz#bffa3ea19050c06400107d2297b9802f9719f98b" integrity sha512-cS2Jz2+fs9+4pJqLJPtYqGyY97ywJDWAWIR1Yla3hs1QQuH6m0Nz3ojZD1gE2eKH9mHwkGbnNAh+hHcrYrfGzw== |