Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
497d517e13
commit
6ab9cdec26
|
|
@ -10,6 +10,7 @@ fragment AlertDetailItem on AlertManagementAlert {
|
|||
description
|
||||
updatedAt
|
||||
endedAt
|
||||
hosts
|
||||
details
|
||||
runbook
|
||||
todos {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ query getAlert($iid: String!, $fullPath: ID!) {
|
|||
service
|
||||
description
|
||||
endedAt
|
||||
hosts
|
||||
details
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,55 +0,0 @@
|
|||
/**
|
||||
* Context:
|
||||
* https://gitlab.com/gitlab-org/gitlab/-/issues/198524
|
||||
* https://gitlab.com/gitlab-org/gitlab/-/merge_requests/29491
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*
|
||||
* LABEL_NAMES - an array of labels to filter issues in the GraphQL query
|
||||
* WORKFLOW_PREFIX - the prefix for workflow labels
|
||||
* ACCEPTING_CONTRIBUTIONS_TITLE - the accepting contributions label
|
||||
*/
|
||||
export const LABEL_NAMES = ['Package::Coming soon'];
|
||||
const WORKFLOW_PREFIX = 'workflow::';
|
||||
const ACCEPTING_CONTRIBUTIONS_TITLE = 'accepting merge requests';
|
||||
|
||||
const setScoped = (label, scoped) => (label ? { ...label, scoped } : label);
|
||||
|
||||
/**
|
||||
* Finds workflow:: scoped labels and returns the first or null.
|
||||
* @param {Object[]} labels Labels from the issue
|
||||
*/
|
||||
export const findWorkflowLabel = (labels = []) =>
|
||||
labels.find(l => l.title.toLowerCase().includes(WORKFLOW_PREFIX.toLowerCase()));
|
||||
|
||||
/**
|
||||
* Determines if an issue is accepting community contributions by checking if
|
||||
* the "Accepting merge requests" label is present.
|
||||
* @param {Object[]} labels
|
||||
*/
|
||||
export const findAcceptingContributionsLabel = (labels = []) =>
|
||||
labels.find(l => l.title.toLowerCase() === ACCEPTING_CONTRIBUTIONS_TITLE.toLowerCase());
|
||||
|
||||
/**
|
||||
* Formats the GraphQL response into the format that the view template expects.
|
||||
* @param {Object} data GraphQL response
|
||||
*/
|
||||
export const toViewModel = data => {
|
||||
// This just flatterns the issues -> nodes and labels -> nodes hierarchy
|
||||
// into an array of objects.
|
||||
const issues = (data.project?.issues?.nodes || []).map(i => ({
|
||||
...i,
|
||||
labels: (i.labels?.nodes || []).map(node => node),
|
||||
}));
|
||||
|
||||
return issues.map(x => ({
|
||||
...x,
|
||||
labels: [
|
||||
setScoped(findWorkflowLabel(x.labels), true),
|
||||
setScoped(findAcceptingContributionsLabel(x.labels), false),
|
||||
].filter(Boolean),
|
||||
}));
|
||||
};
|
||||
|
|
@ -1,172 +0,0 @@
|
|||
<script>
|
||||
import {
|
||||
GlAlert,
|
||||
GlEmptyState,
|
||||
GlIcon,
|
||||
GlLabel,
|
||||
GlLink,
|
||||
GlSkeletonLoader,
|
||||
GlSprintf,
|
||||
} from '@gitlab/ui';
|
||||
import { ApolloQuery } from 'vue-apollo';
|
||||
import Tracking from '~/tracking';
|
||||
import { TrackingActions } from '../../shared/constants';
|
||||
import { s__ } from '~/locale';
|
||||
import comingSoonIssuesQuery from './queries/issues.graphql';
|
||||
import { toViewModel, LABEL_NAMES } from './helpers';
|
||||
|
||||
export default {
|
||||
name: 'ComingSoon',
|
||||
components: {
|
||||
GlAlert,
|
||||
GlEmptyState,
|
||||
GlIcon,
|
||||
GlLabel,
|
||||
GlLink,
|
||||
GlSkeletonLoader,
|
||||
GlSprintf,
|
||||
ApolloQuery,
|
||||
},
|
||||
mixins: [Tracking.mixin()],
|
||||
props: {
|
||||
illustration: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
projectPath: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
suggestedContributionsPath: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
variables() {
|
||||
return {
|
||||
projectPath: this.projectPath,
|
||||
labelNames: LABEL_NAMES,
|
||||
};
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.track(TrackingActions.COMING_SOON_REQUESTED);
|
||||
},
|
||||
methods: {
|
||||
onIssueLinkClick(issueIid, label) {
|
||||
this.track(TrackingActions.COMING_SOON_LIST, {
|
||||
label,
|
||||
value: issueIid,
|
||||
});
|
||||
},
|
||||
onDocsLinkClick() {
|
||||
this.track(TrackingActions.COMING_SOON_HELP);
|
||||
},
|
||||
},
|
||||
loadingRows: 5,
|
||||
i18n: {
|
||||
alertTitle: s__('PackageRegistry|Upcoming package managers'),
|
||||
alertIntro: s__(
|
||||
"PackageRegistry|Is your favorite package manager missing? We'd love your help in building first-class support for it into GitLab! %{contributionLinkStart}Visit the contribution documentation%{contributionLinkEnd} to learn more about how to build support for new package managers into GitLab. Below is a list of package managers that are on our radar.",
|
||||
),
|
||||
emptyStateTitle: s__('PackageRegistry|No upcoming issues'),
|
||||
emptyStateDescription: s__('PackageRegistry|There are no upcoming issues to display.'),
|
||||
},
|
||||
comingSoonIssuesQuery,
|
||||
toViewModel,
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<apollo-query
|
||||
:query="$options.comingSoonIssuesQuery"
|
||||
:variables="variables"
|
||||
:update="$options.toViewModel"
|
||||
>
|
||||
<template #default="{ result: { data }, isLoading }">
|
||||
<div>
|
||||
<gl-alert :title="$options.i18n.alertTitle" :dismissible="false" variant="tip">
|
||||
<gl-sprintf :message="$options.i18n.alertIntro">
|
||||
<template #contributionLink="{ content }">
|
||||
<gl-link
|
||||
:href="suggestedContributionsPath"
|
||||
target="_blank"
|
||||
@click="onDocsLinkClick"
|
||||
>{{ content }}</gl-link
|
||||
>
|
||||
</template>
|
||||
</gl-sprintf>
|
||||
</gl-alert>
|
||||
</div>
|
||||
|
||||
<div v-if="isLoading" class="gl-display-flex gl-flex-direction-column">
|
||||
<gl-skeleton-loader
|
||||
v-for="index in $options.loadingRows"
|
||||
:key="index"
|
||||
:width="1000"
|
||||
:height="80"
|
||||
preserve-aspect-ratio="xMinYMax meet"
|
||||
>
|
||||
<rect width="700" height="10" x="0" y="16" rx="4" />
|
||||
<rect width="60" height="10" x="0" y="45" rx="4" />
|
||||
<rect width="60" height="10" x="70" y="45" rx="4" />
|
||||
</gl-skeleton-loader>
|
||||
</div>
|
||||
|
||||
<template v-else-if="data && data.length">
|
||||
<div
|
||||
v-for="issue in data"
|
||||
:key="issue.iid"
|
||||
data-testid="issue-row"
|
||||
class="gl-responsive-table-row gl-flex-direction-column gl-align-items-baseline"
|
||||
>
|
||||
<div class="table-section section-100 gl-white-space-normal text-truncate">
|
||||
<gl-link
|
||||
data-testid="issue-title-link"
|
||||
:href="issue.webUrl"
|
||||
class="gl-text-gray-900 gl-font-weight-bold"
|
||||
@click="onIssueLinkClick(issue.iid, issue.title)"
|
||||
>
|
||||
{{ issue.title }}
|
||||
</gl-link>
|
||||
</div>
|
||||
|
||||
<div class="table-section section-100 gl-white-space-normal mt-md-3">
|
||||
<div class="gl-display-flex gl-text-gray-400">
|
||||
<gl-icon name="issues" class="gl-mr-2" />
|
||||
<gl-link
|
||||
data-testid="issue-id-link"
|
||||
:href="issue.webUrl"
|
||||
class="gl-text-gray-400 gl-mr-5"
|
||||
@click="onIssueLinkClick(issue.iid, issue.title)"
|
||||
>#{{ issue.iid }}</gl-link
|
||||
>
|
||||
|
||||
<div v-if="issue.milestone" class="gl-display-flex gl-align-items-center gl-mr-5">
|
||||
<gl-icon name="clock" class="gl-mr-2" />
|
||||
<span data-testid="milestone">{{ issue.milestone.title }}</span>
|
||||
</div>
|
||||
|
||||
<gl-label
|
||||
v-for="label in issue.labels"
|
||||
:key="label.title"
|
||||
class="gl-mr-3"
|
||||
size="sm"
|
||||
:background-color="label.color"
|
||||
:title="label.title"
|
||||
:scoped="Boolean(label.scoped)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<gl-empty-state v-else :title="$options.i18n.emptyStateTitle" :svg-path="illustration">
|
||||
<template #description>
|
||||
<p>{{ $options.i18n.emptyStateDescription }}</p>
|
||||
</template>
|
||||
</gl-empty-state>
|
||||
</template>
|
||||
</apollo-query>
|
||||
</template>
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
query getComingSoonIssues($projectPath: ID!, $labelNames: [String]) {
|
||||
project(fullPath: $projectPath) {
|
||||
issues(state: opened, labelName: $labelNames) {
|
||||
nodes {
|
||||
iid
|
||||
title
|
||||
webUrl
|
||||
labels {
|
||||
nodes {
|
||||
title
|
||||
color
|
||||
}
|
||||
}
|
||||
milestone {
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -9,7 +9,6 @@ import PackageFilter from './packages_filter.vue';
|
|||
import PackageList from './packages_list.vue';
|
||||
import PackageSort from './packages_sort.vue';
|
||||
import { PACKAGE_REGISTRY_TABS, DELETE_PACKAGE_SUCCESS_MESSAGE } from '../constants';
|
||||
import PackagesComingSoon from '../coming_soon/packages_coming_soon.vue';
|
||||
import PackageTitle from './package_title.vue';
|
||||
|
||||
export default {
|
||||
|
|
@ -22,14 +21,12 @@ export default {
|
|||
PackageFilter,
|
||||
PackageList,
|
||||
PackageSort,
|
||||
PackagesComingSoon,
|
||||
PackageTitle,
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
emptyListIllustration: state => state.config.emptyListIllustration,
|
||||
emptyListHelpUrl: state => state.config.emptyListHelpUrl,
|
||||
comingSoon: state => state.config.comingSoon,
|
||||
filterQuery: state => state.filterQuery,
|
||||
selectedType: state => state.selectedType,
|
||||
packageHelpUrl: state => state.config.packageHelpUrl,
|
||||
|
|
@ -122,14 +119,6 @@ export default {
|
|||
</template>
|
||||
</package-list>
|
||||
</gl-tab>
|
||||
|
||||
<gl-tab v-if="comingSoon" :title="__('Coming soon')" lazy>
|
||||
<packages-coming-soon
|
||||
:illustration="emptyListIllustration"
|
||||
:project-path="comingSoon.projectPath"
|
||||
:suggested-contributions-path="comingSoon.suggestedContributions"
|
||||
/>
|
||||
</gl-tab>
|
||||
</gl-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,12 @@
|
|||
import * as types from './mutation_types';
|
||||
import {
|
||||
parseIntPagination,
|
||||
normalizeHeaders,
|
||||
convertObjectPropsToCamelCase,
|
||||
} from '~/lib/utils/common_utils';
|
||||
import { parseIntPagination, normalizeHeaders } from '~/lib/utils/common_utils';
|
||||
import { GROUP_PAGE_TYPE } from '../constants';
|
||||
|
||||
export default {
|
||||
[types.SET_INITIAL_STATE](state, config) {
|
||||
const { comingSoonJson, ...rest } = config;
|
||||
const comingSoonObj = JSON.parse(comingSoonJson);
|
||||
|
||||
state.config = {
|
||||
...rest,
|
||||
comingSoon: comingSoonObj && convertObjectPropsToCamelCase(comingSoonObj),
|
||||
isGroupPage: config.pageType === GROUP_PAGE_TYPE,
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -14,9 +14,6 @@ export const TrackingActions = {
|
|||
REQUEST_DELETE_PACKAGE: 'request_delete_package',
|
||||
CANCEL_DELETE_PACKAGE: 'cancel_delete_package',
|
||||
PULL_PACKAGE: 'pull_package',
|
||||
COMING_SOON_REQUESTED: 'activate_coming_soon_requested',
|
||||
COMING_SOON_LIST: 'click_coming_soon_issue_link',
|
||||
COMING_SOON_HELP: 'click_coming_soon_documentation_link',
|
||||
};
|
||||
|
||||
export const TrackingCategories = {
|
||||
|
|
|
|||
|
|
@ -3,13 +3,14 @@ import initProjectNew from '../../../projects/project_new';
|
|||
import { __ } from '~/locale';
|
||||
import { deprecatedCreateFlash as createFlash } from '~/flash';
|
||||
import Tracking from '~/tracking';
|
||||
import { isExperimentEnabled } from '~/lib/utils/experimentation';
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
initProjectVisibilitySelector();
|
||||
initProjectNew.bindEvents();
|
||||
|
||||
const { category, property } = gon.tracking_data ?? { category: 'projects:new' };
|
||||
const hasNewCreateProjectUi = 'newCreateProjectUi' in gon?.features;
|
||||
const hasNewCreateProjectUi = isExperimentEnabled('newCreateProjectUi');
|
||||
|
||||
if (!hasNewCreateProjectUi) {
|
||||
// Setting additional tracking for HAML template
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const MARKDOWN_LINK_TEXT = {
|
|||
};
|
||||
|
||||
const TRACKING_EVENT_NAME = 'view_wiki_page';
|
||||
const TRACKING_CONTEXT_SCHEMA = 'iglu:com.gitlab/wiki_page_context/jsonschema/1-0-0';
|
||||
const TRACKING_CONTEXT_SCHEMA = 'iglu:com.gitlab/wiki_page_context/jsonschema/1-0-1';
|
||||
|
||||
export default class Wikis {
|
||||
constructor() {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ const allowedFields = [
|
|||
'endedAt',
|
||||
'details',
|
||||
'environment',
|
||||
'hosts',
|
||||
];
|
||||
|
||||
const isAllowed = fieldName => allowedFields.includes(fieldName);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ module GoogleApi
|
|||
|
||||
before_action :validate_session_key!
|
||||
|
||||
feature_category :kubernetes_management
|
||||
|
||||
def callback
|
||||
token, expires_at = GoogleApi::CloudPlatform::Client
|
||||
.new(nil, callback_google_api_auth_url)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ class GraphqlController < ApplicationController
|
|||
# callback execution order here
|
||||
around_action :sessionless_bypass_admin_mode!, if: :sessionless_user?
|
||||
|
||||
feature_category :not_owned
|
||||
|
||||
def execute
|
||||
result = multiplex? ? execute_multiplex : execute_query
|
||||
|
||||
|
|
@ -113,6 +115,12 @@ class GraphqlController < ApplicationController
|
|||
|
||||
# Merging to :metadata will ensure these are logged as top level keys
|
||||
payload[:metadata] ||= {}
|
||||
payload[:metadata].merge!(graphql: { operation_name: params[:operationName] })
|
||||
payload[:metadata].merge!(graphql: logs)
|
||||
end
|
||||
|
||||
def logs
|
||||
RequestStore.store[:graphql_logs].to_h
|
||||
.except(:duration_s, :query_string)
|
||||
.merge(operation_name: params[:operationName])
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ class Groups::AvatarsController < Groups::ApplicationController
|
|||
|
||||
skip_cross_project_access_check :destroy
|
||||
|
||||
feature_category :subgroups
|
||||
|
||||
def destroy
|
||||
@group.remove_avatar!
|
||||
@group.save
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ class Groups::BoardsController < Groups::ApplicationController
|
|||
push_frontend_feature_flag(:boards_with_swimlanes, group, default_enabled: false)
|
||||
end
|
||||
|
||||
feature_category :boards
|
||||
|
||||
private
|
||||
|
||||
def assign_endpoint_vars
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ module Groups
|
|||
before_action :group
|
||||
skip_cross_project_access_check :index
|
||||
|
||||
feature_category :subgroups
|
||||
|
||||
def index
|
||||
parent = if params[:parent_id].present?
|
||||
GroupFinder.new(current_user).execute(id: params[:parent_id])
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
class Groups::DeployTokensController < Groups::ApplicationController
|
||||
before_action :authorize_destroy_deploy_token!
|
||||
|
||||
feature_category :continuous_delivery
|
||||
|
||||
def revoke
|
||||
@token = @group.deploy_tokens.find(params[:id])
|
||||
@token.revoke!
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ class Groups::GroupLinksController < Groups::ApplicationController
|
|||
before_action :authorize_admin_group!
|
||||
before_action :group_link, only: [:update, :destroy]
|
||||
|
||||
feature_category :subgroups
|
||||
|
||||
def create
|
||||
shared_with_group = Group.find(params[:shared_with_group_id]) if params[:shared_with_group_id].present?
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ class Groups::GroupMembersController < Groups::ApplicationController
|
|||
:approve_access_request, :leave, :resend_invite,
|
||||
:override
|
||||
|
||||
feature_category :authentication_and_authorization
|
||||
|
||||
def index
|
||||
@sort = params[:sort].presence || sort_value_name
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
class Groups::ImportsController < Groups::ApplicationController
|
||||
include ContinueParams
|
||||
|
||||
feature_category :importers
|
||||
|
||||
def show
|
||||
if @group.import_state.nil? || @group.import_state.finished?
|
||||
if continue_params[:to]
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ class Groups::LabelsController < Groups::ApplicationController
|
|||
|
||||
respond_to :html
|
||||
|
||||
feature_category :issue_tracking
|
||||
|
||||
def index
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ class Groups::MilestonesController < Groups::ApplicationController
|
|||
push_frontend_feature_flag(:burnup_charts, @group)
|
||||
end
|
||||
|
||||
feature_category :issue_tracking
|
||||
|
||||
def index
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ module Groups
|
|||
class PackagesController < Groups::ApplicationController
|
||||
before_action :verify_packages_enabled!
|
||||
|
||||
feature_category :package_registry
|
||||
|
||||
private
|
||||
|
||||
def verify_packages_enabled!
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ module Groups
|
|||
before_action :verify_container_registry_enabled!
|
||||
before_action :authorize_read_container_image!
|
||||
|
||||
feature_category :package_registry
|
||||
|
||||
def index
|
||||
respond_to do |format|
|
||||
format.html
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
module Groups
|
||||
class ReleasesController < Groups::ApplicationController
|
||||
feature_category :release_evidence
|
||||
|
||||
def index
|
||||
respond_to do |format|
|
||||
format.json do
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ class Groups::RunnersController < Groups::ApplicationController
|
|||
|
||||
before_action :runner, only: [:edit, :update, :destroy, :pause, :resume, :show]
|
||||
|
||||
feature_category :continuous_integration
|
||||
|
||||
def show
|
||||
render 'shared/runners/show'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ module Groups
|
|||
end
|
||||
before_action :define_variables, only: [:show]
|
||||
|
||||
feature_category :continuous_integration
|
||||
|
||||
NUMBER_OF_RUNNERS_PER_PAGE = 4
|
||||
|
||||
def show
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ module Groups
|
|||
|
||||
before_action :authorize_admin_group!
|
||||
|
||||
feature_category :integrations
|
||||
|
||||
def index
|
||||
@integrations = Service.find_or_initialize_all(Service.for_group(group)).sort_by(&:title)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ module Groups
|
|||
push_frontend_feature_flag(:ajax_new_deploy_token, @group)
|
||||
end
|
||||
|
||||
feature_category :continuous_delivery
|
||||
|
||||
def create_deploy_token
|
||||
result = Groups::DeployTokens::CreateService.new(@group, current_user, deploy_token_params).execute
|
||||
@new_deploy_token = result[:deploy_token]
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ module Groups
|
|||
before_action :group
|
||||
skip_cross_project_access_check :index
|
||||
|
||||
feature_category :subgroups
|
||||
|
||||
def index
|
||||
shared_projects = GroupProjectsFinder.new(
|
||||
group: group,
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ class Groups::UploadsController < Groups::ApplicationController
|
|||
before_action :authorize_upload_file!, only: [:create, :authorize]
|
||||
before_action :verify_workhorse_api!, only: [:authorize]
|
||||
|
||||
feature_category :subgroups
|
||||
|
||||
private
|
||||
|
||||
def upload_model_class
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ module Groups
|
|||
|
||||
skip_cross_project_access_check :show, :update
|
||||
|
||||
feature_category :continuous_integration
|
||||
|
||||
def show
|
||||
respond_to do |format|
|
||||
format.json do
|
||||
|
|
|
|||
|
|
@ -46,6 +46,17 @@ class GroupsController < Groups::ApplicationController
|
|||
|
||||
layout :determine_layout
|
||||
|
||||
feature_category :subgroups, [
|
||||
:index, :new, :create, :show, :edit, :update,
|
||||
:destroy, :details, :transfer
|
||||
]
|
||||
|
||||
feature_category :audit_events, [:activity]
|
||||
feature_category :issue_tracking, [:issues, :issues_calendar, :preview_markdown]
|
||||
feature_category :code_review, [:merge_requests]
|
||||
feature_category :projects, [:projects]
|
||||
feature_category :importers, [:export, :download_export]
|
||||
|
||||
def index
|
||||
redirect_to(current_user ? dashboard_groups_path : explore_groups_path)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class ProjectsController < Projects::ApplicationController
|
|||
# Experiments
|
||||
before_action only: [:new, :create] do
|
||||
frontend_experimentation_tracking_data(:new_create_project_ui, 'click_tab')
|
||||
push_frontend_feature_flag(:new_create_project_ui) if experiment_enabled?(:new_create_project_ui)
|
||||
push_frontend_experiment(:new_create_project_ui)
|
||||
end
|
||||
|
||||
before_action only: [:edit] do
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ module Mutations
|
|||
'body or position arguments are required'
|
||||
end
|
||||
|
||||
super(args)
|
||||
super(**args)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
|
|
@ -34,26 +34,12 @@ module PackagesHelper
|
|||
expose_url(api_v4_group___packages_composer_packages_path(id: group_id, format: '.json'))
|
||||
end
|
||||
|
||||
def packages_coming_soon_enabled?(resource)
|
||||
::Feature.enabled?(:packages_coming_soon, resource) && ::Gitlab.dev_env_or_com?
|
||||
end
|
||||
|
||||
def packages_coming_soon_data(resource)
|
||||
return unless packages_coming_soon_enabled?(resource)
|
||||
|
||||
{
|
||||
project_path: ::Gitlab.com? ? 'gitlab-org/gitlab' : 'gitlab-org/gitlab-test',
|
||||
suggested_contributions: help_page_path('user/packages/index', anchor: 'suggested-contributions')
|
||||
}
|
||||
end
|
||||
|
||||
def packages_list_data(type, resource)
|
||||
{
|
||||
resource_id: resource.id,
|
||||
page_type: type,
|
||||
empty_list_help_url: help_page_path('user/packages/package_registry/index'),
|
||||
empty_list_illustration: image_path('illustrations/no-packages.svg'),
|
||||
coming_soon_json: packages_coming_soon_data(resource).to_json,
|
||||
package_help_url: help_page_path('user/packages/index')
|
||||
}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -142,7 +142,8 @@ module WikiHelper
|
|||
'wiki-format' => page.format,
|
||||
'wiki-title-size' => page.title.bytesize,
|
||||
'wiki-content-size' => page.raw_content.bytesize,
|
||||
'wiki-directory-nest-level' => page.path.scan('/').count
|
||||
'wiki-directory-nest-level' => page.path.scan('/').count,
|
||||
'wiki-container-type' => page.wiki.container.class.name
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -21,13 +21,6 @@ module AlertManagement
|
|||
ignored: 3
|
||||
}.freeze
|
||||
|
||||
STATUS_EVENTS = {
|
||||
triggered: :trigger,
|
||||
acknowledged: :acknowledge,
|
||||
resolved: :resolve,
|
||||
ignored: :ignore
|
||||
}.freeze
|
||||
|
||||
OPEN_STATUSES = [
|
||||
:triggered,
|
||||
:acknowledged
|
||||
|
|
@ -190,6 +183,15 @@ module AlertManagement
|
|||
reference.to_i > 0 && reference.to_i <= Gitlab::Database::MAX_INT_VALUE
|
||||
end
|
||||
|
||||
def status_event_for(status)
|
||||
self.class.state_machines[:status].events.transitions_for(self, to: status.to_s.to_sym).first&.event
|
||||
end
|
||||
|
||||
def change_status_to(new_status)
|
||||
event = status_event_for(new_status)
|
||||
event && fire_status_event(event)
|
||||
end
|
||||
|
||||
def prometheus?
|
||||
monitoring_tool == Gitlab::AlertManagement::Payload::MONITORING_TOOLS[:prometheus]
|
||||
end
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ module DesignManagement
|
|||
end
|
||||
|
||||
def self.instantiate(attrs)
|
||||
new(attrs).tap { |obj| obj.validate! }
|
||||
new(**attrs).tap { |obj| obj.validate! }
|
||||
end
|
||||
|
||||
# The ID, needed by GraphQL types and as part of the Lazy-fetch
|
||||
|
|
|
|||
|
|
@ -367,6 +367,7 @@ class Project < ApplicationRecord
|
|||
allow_destroy: true,
|
||||
reject_if: ->(attrs) { attrs[:id].blank? && attrs[:url].blank? }
|
||||
|
||||
accepts_nested_attributes_for :tracing_setting, update_only: true, allow_destroy: true
|
||||
accepts_nested_attributes_for :incident_management_setting, update_only: true
|
||||
accepts_nested_attributes_for :error_tracking_setting, update_only: true
|
||||
accepts_nested_attributes_for :metrics_setting, update_only: true, allow_destroy: true
|
||||
|
|
|
|||
|
|
@ -304,13 +304,18 @@ class User < ApplicationRecord
|
|||
transition deactivated: :active
|
||||
transition blocked: :active
|
||||
transition ldap_blocked: :active
|
||||
transition blocked_pending_approval: :active
|
||||
end
|
||||
|
||||
event :block_pending_approval do
|
||||
transition active: :blocked_pending_approval
|
||||
end
|
||||
|
||||
event :deactivate do
|
||||
transition active: :deactivated
|
||||
end
|
||||
|
||||
state :blocked, :ldap_blocked do
|
||||
state :blocked, :ldap_blocked, :blocked_pending_approval do
|
||||
def blocked?
|
||||
true
|
||||
end
|
||||
|
|
@ -333,7 +338,7 @@ class User < ApplicationRecord
|
|||
|
||||
# Scopes
|
||||
scope :admins, -> { where(admin: true) }
|
||||
scope :blocked, -> { with_states(:blocked, :ldap_blocked) }
|
||||
scope :blocked, -> { with_states(:blocked, :ldap_blocked, :blocked_pending_approval) }
|
||||
scope :external, -> { where(external: true) }
|
||||
scope :confirmed, -> { where.not(confirmed_at: nil) }
|
||||
scope :active, -> { with_state(:active).non_internal }
|
||||
|
|
@ -378,7 +383,9 @@ class User < ApplicationRecord
|
|||
|
||||
# The messages for these keys are defined in `devise.en.yml`
|
||||
def inactive_message
|
||||
if blocked?
|
||||
if blocked_pending_approval?
|
||||
:blocked_pending_approval
|
||||
elsif blocked?
|
||||
:blocked
|
||||
elsif internal?
|
||||
:forbidden
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ module AlertManagement
|
|||
def filter_status
|
||||
return unless params[:status]
|
||||
|
||||
status_event = AlertManagement::Alert::STATUS_EVENTS[status_key]
|
||||
status_event = alert.status_event_for(status_key)
|
||||
|
||||
unless status_event
|
||||
param_errors << _('Invalid status')
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ module Ci
|
|||
include ::Gitlab::ExclusiveLeaseHelpers
|
||||
|
||||
Result = Struct.new(:status, :backoff, keyword_init: true)
|
||||
InvalidTraceError = Class.new(StandardError)
|
||||
|
||||
ACCEPT_TIMEOUT = 5.minutes.freeze
|
||||
|
||||
|
|
@ -76,8 +77,20 @@ module Ci
|
|||
metrics.increment_trace_operation(operation: :finalized)
|
||||
end
|
||||
|
||||
unless ::Gitlab::Ci::Trace::Checksum.new(build).valid?
|
||||
metrics.increment_trace_operation(operation: :invalid)
|
||||
::Gitlab::Ci::Trace::Checksum.new(build).then do |checksum|
|
||||
unless checksum.valid?
|
||||
metrics.increment_trace_operation(operation: :invalid)
|
||||
|
||||
next unless log_invalid_chunks?
|
||||
|
||||
::Gitlab::ErrorTracking.log_exception(InvalidTraceError.new,
|
||||
project_path: build.project.full_path,
|
||||
build_id: build.id,
|
||||
state_crc32: checksum.state_crc32,
|
||||
chunks_crc32: checksum.chunks_crc32,
|
||||
chunks_count: checksum.chunks_count
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -182,5 +195,9 @@ module Ci
|
|||
def chunks_migration_enabled?
|
||||
::Gitlab::Ci::Features.accept_trace?(build.project)
|
||||
end
|
||||
|
||||
def log_invalid_chunks?
|
||||
::Gitlab::Ci::Features.log_invalid_trace_chunks?(build.project)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ module Projects
|
|||
.merge(grafana_integration_params)
|
||||
.merge(prometheus_integration_params)
|
||||
.merge(incident_management_setting_params)
|
||||
.merge(tracing_setting_params)
|
||||
end
|
||||
|
||||
def alerting_setting_params
|
||||
|
|
@ -121,6 +122,15 @@ module Projects
|
|||
|
||||
{ incident_management_setting_attributes: attrs }
|
||||
end
|
||||
|
||||
def tracing_setting_params
|
||||
attr = params[:tracing_setting_attributes]
|
||||
return {} unless attr
|
||||
|
||||
destroy = attr[:external_url].blank?
|
||||
|
||||
{ tracing_setting_attributes: attr.merge(_destroy: destroy) }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
title: Adds a Terraform.latest.gitlab-ci.yml to support quick development of Terraform
|
||||
related features
|
||||
merge_request: 43802
|
||||
author:
|
||||
type: added
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Populate issues blocking_issues_count
|
||||
merge_request: 42277
|
||||
author:
|
||||
type: other
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Log failed BatchCount queries
|
||||
merge_request: 41552
|
||||
author:
|
||||
type: added
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Add hosts field to alert detail table
|
||||
merge_request: 43087
|
||||
author:
|
||||
type: changed
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
name: ci_artifacts_exclude
|
||||
introduced_by_url:
|
||||
rollout_issue_url:
|
||||
group:
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/30708
|
||||
rollout_issue_url:
|
||||
group: group::continuous integration
|
||||
type: development
|
||||
default_enabled: true
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
name: ci_build_metadata_config
|
||||
introduced_by_url:
|
||||
rollout_issue_url:
|
||||
group:
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/7238
|
||||
rollout_issue_url:
|
||||
group: group::continuous integration
|
||||
type: development
|
||||
default_enabled: false
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
name: ci_enable_live_trace
|
||||
introduced_by_url:
|
||||
rollout_issue_url:
|
||||
group:
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/5255
|
||||
rollout_issue_url:
|
||||
group: group::continuous integration
|
||||
type: development
|
||||
default_enabled: false
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
name: ci_pipeline_latest
|
||||
introduced_by_url:
|
||||
rollout_issue_url:
|
||||
group:
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/34160
|
||||
rollout_issue_url:
|
||||
group: group::continuous integration
|
||||
type: development
|
||||
default_enabled: true
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
---
|
||||
name: packages_coming_soon
|
||||
introduced_by_url:
|
||||
rollout_issue_url:
|
||||
group:
|
||||
type: development
|
||||
default_enabled: false
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
name: ci_trace_log_invalid_chunks
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/44409
|
||||
rollout_issue_url:
|
||||
type: ops
|
||||
group: group::continuous integration
|
||||
default_enabled: false
|
||||
|
|
@ -18,6 +18,7 @@ en:
|
|||
unconfirmed: "You have to confirm your email address before continuing. Please check your email for the link we sent you, or click 'Resend confirmation email'."
|
||||
blocked: "Your account has been blocked. Please contact your GitLab administrator if you think this is an error."
|
||||
forbidden: "Your account does not have the required permission to login. Please contact your GitLab administrator if you think this is an error."
|
||||
blocked_pending_approval: "Your account is pending approval from your GitLab administrator and hence blocked. Please contact your GitLab administrator if you think this is an error."
|
||||
mailer:
|
||||
confirmation_instructions:
|
||||
subject: "Confirmation instructions"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class RequirementsAddProjectFk < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key(:requirements, :projects, column: :project_id, on_delete: :cascade) # rubocop: disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key(:requirements, :projects, column: :project_id, on_delete: :cascade)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class RequirementsAddAuthorFk < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key(:requirements, :users, column: :author_id, on_delete: :nullify) # rubocop: disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key(:requirements, :users, column: :author_id, on_delete: :nullify)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddCiSourcesProjectPipelineForeignKey < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :ci_sources_projects, :ci_pipelines, column: :pipeline_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :ci_sources_projects, :ci_pipelines, column: :pipeline_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddCiSourcesProjectSourceProjectForeignKey < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :ci_sources_projects, :projects, column: :source_project_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :ci_sources_projects, :projects, column: :source_project_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddVulnerabilityExportProjectForeignKey < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :vulnerability_exports, :projects, column: :project_id, on_delete: :cascade, index: false # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :vulnerability_exports, :projects, column: :project_id, on_delete: :cascade, index: false
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddVulnerabilityExportUserForeignKey < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :vulnerability_exports, :users, column: :author_id, on_delete: :cascade, index: false # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :vulnerability_exports, :users, column: :author_id, on_delete: :cascade, index: false
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddProjectsFkToJiraImportsTable < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :jira_imports, :projects, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :jira_imports, :projects, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddUsersFkToJiraImportsTable < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :jira_imports, :users, on_delete: :nullify # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :jira_imports, :users, on_delete: :nullify
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddLabelsFkToJiraImportsTable < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :jira_imports, :labels, on_delete: :nullify # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :jira_imports, :labels, on_delete: :nullify
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddLockedByUserIdForeignKeyToTerraformState < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :terraform_states, :users, column: :locked_by_user_id # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :terraform_states, :users, column: :locked_by_user_id
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddUserIdForeignKeyToResourceStateEvents < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :resource_state_events, :users, column: :user_id, on_delete: :nullify # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :resource_state_events, :users, column: :user_id, on_delete: :nullify
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddIssueIdForeignKeyToResourceStateEvents < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :resource_state_events, :issues, column: :issue_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :resource_state_events, :issues, column: :issue_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddMergeRequestIdForeignKeyToResourceStateEvents < ActiveRecord::Migration
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :resource_state_events, :merge_requests, column: :merge_request_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :resource_state_events, :merge_requests, column: :merge_request_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddFkToProjectRepositoryStorageMoves < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :project_repository_storage_moves, :projects, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :project_repository_storage_moves, :projects, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class AddForeignKeyFromWebauthnRegistrationsToUsers < ActiveRecord::Migration[6.
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :webauthn_registrations, :users, column: :user_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :webauthn_registrations, :users, column: :user_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddForeignKeyToEpicIdOnResourceStateEvents < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :resource_state_events, :epics, column: :epic_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :resource_state_events, :epics, column: :epic_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddGroupWikiRepositoriesShardIdForeignKey < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :group_wiki_repositories, :shards, on_delete: :restrict # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :group_wiki_repositories, :shards, on_delete: :restrict
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddGroupWikiRepositoriesGroupIdForeignKey < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :group_wiki_repositories, :namespaces, column: :group_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :group_wiki_repositories, :namespaces, column: :group_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddAuthorForeignKeyToTestReports < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :requirements_management_test_reports, :users, column: :author_id, on_delete: :nullify # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :requirements_management_test_reports, :users, column: :author_id, on_delete: :nullify
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddPipelineForeignKeyToTestReports < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :requirements_management_test_reports, :ci_pipelines, column: :pipeline_id, on_delete: :nullify # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :requirements_management_test_reports, :ci_pipelines, column: :pipeline_id, on_delete: :nullify
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddForeignKeyToUserIdOnAlertManagementAlertAssignees < ActiveRecord::Migra
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :alert_management_alert_assignees, :users, column: :user_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :alert_management_alert_assignees, :users, column: :user_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddForeignKeyToAlertIdOnAlertMangagementAlertAssignees < ActiveRecord::Mig
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :alert_management_alert_assignees, :alert_management_alerts, column: :alert_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :alert_management_alert_assignees, :alert_management_alerts, column: :alert_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddForeignKeyToOpsFeatureFlagsIssues < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :operations_feature_flags_issues, :issues, column: :issue_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :operations_feature_flags_issues, :issues, column: :issue_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class AddRequirementsBuildReference < ActiveRecord::Migration[6.0]
|
|||
add_index :requirements_management_test_reports, :build_id, name: INDEX_NAME # rubocop:disable Migration/AddIndex
|
||||
|
||||
with_lock_retries do
|
||||
add_foreign_key :requirements_management_test_reports, :ci_builds, column: :build_id, on_delete: :nullify # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :requirements_management_test_reports, :ci_builds, column: :build_id, on_delete: :nullify
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddForeignKeyToBuildIdOnBuildReportResults < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :ci_build_report_results, :ci_builds, column: :build_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :ci_build_report_results, :ci_builds, column: :build_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddForeignKeyToProjectIdOnBuildReportResults < ActiveRecord::Migration[6.0
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :ci_build_report_results, :projects, column: :project_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :ci_build_report_results, :projects, column: :project_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddUsersForeignKeyToBoardUserPreferences < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :board_user_preferences, :users, column: :user_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :board_user_preferences, :users, column: :user_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddBoardsForeignKeyToBoardUserPreferences < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :board_user_preferences, :boards, column: :board_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :board_user_preferences, :boards, column: :board_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddForeignKeyToAlertManagementAlertUserMentions < ActiveRecord::Migration[
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :alert_management_alert_user_mentions, :notes, column: :note_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :alert_management_alert_user_mentions, :notes, column: :note_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class AddSourceMergeRequestIdToResourceStateEvents < ActiveRecord::Migration[6.0
|
|||
|
||||
unless foreign_key_exists?(:resource_state_events, :merge_requests, column: :source_merge_request_id)
|
||||
with_lock_retries do
|
||||
add_foreign_key :resource_state_events, :merge_requests, column: :source_merge_request_id, on_delete: :nullify # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :resource_state_events, :merge_requests, column: :source_merge_request_id, on_delete: :nullify
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddUsersFkToResourceIterationEventsTable < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :resource_iteration_events, :users, column: :user_id, on_delete: :nullify # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :resource_iteration_events, :users, column: :user_id, on_delete: :nullify
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddIssuesFkToResourceIterationEventsTable < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :resource_iteration_events, :issues, column: :issue_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :resource_iteration_events, :issues, column: :issue_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddMergeRequestsFkToResourceIterationEventsTable < ActiveRecord::Migration
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :resource_iteration_events, :merge_requests, column: :merge_request_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :resource_iteration_events, :merge_requests, column: :merge_request_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddIterationsFkToResourceIterationEventsTable < ActiveRecord::Migration[6.
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :resource_iteration_events, :sprints, column: :iteration_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :resource_iteration_events, :sprints, column: :iteration_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ class AddForeignKeyToExperimentOnExperimentUsers < ActiveRecord::Migration[6.0]
|
|||
def up
|
||||
with_lock_retries do
|
||||
# There is no need to use add_concurrent_foreign_key since it's an empty table
|
||||
add_foreign_key :experiment_users, :experiments, column: :experiment_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :experiment_users, :experiments, column: :experiment_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ class AddForeignKeyToUserOnExperimentUsers < ActiveRecord::Migration[6.0]
|
|||
def up
|
||||
with_lock_retries do
|
||||
# There is no need to use add_concurrent_foreign_key since it's an empty table
|
||||
add_foreign_key :experiment_users, :users, column: :user_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :experiment_users, :users, column: :user_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddForeignKeyToPipelineIdOnPipelineArtifact < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :ci_pipeline_artifacts, :ci_pipelines, column: :pipeline_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :ci_pipeline_artifacts, :ci_pipelines, column: :pipeline_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddForeignKeyToProjectIdOnPipelineArtifact < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :ci_pipeline_artifacts, :projects, column: :project_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :ci_pipeline_artifacts, :projects, column: :project_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class BoardsEpicUserPreferencesFkBoard < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :boards_epic_user_preferences, :boards, column: :board_id, on_delete: :cascade # rubocop: disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :boards_epic_user_preferences, :boards, column: :board_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class BoardsEpicUserPreferencesFkUser < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :boards_epic_user_preferences, :users, column: :user_id, on_delete: :cascade # rubocop: disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :boards_epic_user_preferences, :users, column: :user_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class BoardsEpicUserPreferencesFkEpic < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :boards_epic_user_preferences, :epics, column: :epic_id, on_delete: :cascade # rubocop: disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :boards_epic_user_preferences, :epics, column: :epic_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class AddMergeRequestForeignKeyToMergeRequestReviewers < ActiveRecord::Migration
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :merge_request_reviewers, :merge_requests, column: :merge_request_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :merge_request_reviewers, :merge_requests, column: :merge_request_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class AddUserForeignKeyToMergeRequestReviewers < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :merge_request_reviewers, :users, column: :user_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :merge_request_reviewers, :users, column: :user_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddForeignKeyOnScanIdToSecurityScans < ActiveRecord::Migration[6.0]
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :security_findings, :security_scans, column: :scan_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :security_findings, :security_scans, column: :scan_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class AddForeignKeyOnScannerIdToVulnerabilityScanners < ActiveRecord::Migration[
|
|||
|
||||
def up
|
||||
with_lock_retries do
|
||||
add_foreign_key :security_findings, :vulnerability_scanners, column: :scanner_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey
|
||||
add_foreign_key :security_findings, :vulnerability_scanners, column: :scanner_id, on_delete: :cascade
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue