Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
23d9b6b645
commit
1d49db554e
|
|
@ -1 +1 @@
|
|||
575e8b7baeb800a8d0d0f28a80c0461a7a0db741
|
||||
12794f56ea8f6d289298e9befd2ee6fbd56f4dc4
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ export default {
|
|||
class: [
|
||||
'js-log-line',
|
||||
'job-log-line',
|
||||
{ 'gl-bg-gray-700': isHighlighted || applyHashHighlight },
|
||||
{ 'job-log-line-highlight': isHighlighted || applyHashHighlight },
|
||||
],
|
||||
},
|
||||
[
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ export default {
|
|||
<template>
|
||||
<div
|
||||
class="js-log-line job-log-line-header job-log-line"
|
||||
:class="{ 'gl-bg-gray-700': isHighlighted || applyHashHighlight }"
|
||||
:class="{ 'job-log-line-highlight': isHighlighted || applyHashHighlight }"
|
||||
role="button"
|
||||
@click="handleOnClick"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
<script>
|
||||
import { GlTooltipDirective } from '@gitlab/ui';
|
||||
import { __ } from '~/locale';
|
||||
import CiIcon from '~/vue_shared/components/ci_icon/ci_icon.vue';
|
||||
/**
|
||||
* Renders a downstream pipeline dropdown for the pipeline mini graph.
|
||||
*/
|
||||
export default {
|
||||
name: 'DownstreamPipelineDropdown',
|
||||
directives: {
|
||||
GlTooltip: GlTooltipDirective,
|
||||
},
|
||||
components: {
|
||||
CiIcon,
|
||||
},
|
||||
props: {
|
||||
pipeline: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
pipelineTooltipText() {
|
||||
const name = this.pipeline?.name || this.pipeline?.project?.name || __('Downstream pipeline');
|
||||
const status = this.pipeline?.detailedStatus?.label || __('unknown');
|
||||
|
||||
return `${name} - ${status}`;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ci-icon
|
||||
v-gl-tooltip.hover
|
||||
:title="pipelineTooltipText"
|
||||
:status="pipeline.detailedStatus"
|
||||
:show-tooltip="false"
|
||||
/>
|
||||
</template>
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
<script>
|
||||
import { GlTooltipDirective } from '@gitlab/ui';
|
||||
import { sprintf, s__ } from '~/locale';
|
||||
import CiIcon from '~/vue_shared/components/ci_icon/ci_icon.vue';
|
||||
import DownstreamPipelineDropdown from './downstream_pipeline_dropdown.vue';
|
||||
|
||||
/**
|
||||
* Renders the downstream portion of the pipeline mini graph.
|
||||
*/
|
||||
|
|
@ -11,7 +12,7 @@ export default {
|
|||
GlTooltip: GlTooltipDirective,
|
||||
},
|
||||
components: {
|
||||
CiIcon,
|
||||
DownstreamPipelineDropdown,
|
||||
},
|
||||
props: {
|
||||
pipelines: {
|
||||
|
|
@ -51,24 +52,16 @@ export default {
|
|||
});
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
pipelineTooltipText(pipeline) {
|
||||
return `${pipeline?.project?.name} - ${pipeline?.detailedStatus?.label}`;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span v-if="pipelines" class="gl-inline-flex gl-gap-2 gl-align-middle">
|
||||
<ci-icon
|
||||
<downstream-pipeline-dropdown
|
||||
v-for="pipeline in pipelinesTrimmed"
|
||||
:key="pipeline.id"
|
||||
v-gl-tooltip.hover
|
||||
:title="pipelineTooltipText(pipeline)"
|
||||
:status="pipeline.detailedStatus"
|
||||
:show-tooltip="false"
|
||||
data-testid="downstream-pipelines"
|
||||
:pipeline="pipeline"
|
||||
@jobActionExecuted="$emit('jobActionExecuted')"
|
||||
/>
|
||||
|
||||
<a
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
query getDownstreamPipelineJobs($fullPath: ID!, $iid: ID!) {
|
||||
project(fullPath: $fullPath) {
|
||||
id
|
||||
pipeline(iid: $iid) {
|
||||
id
|
||||
path
|
||||
name
|
||||
project {
|
||||
id
|
||||
name
|
||||
}
|
||||
jobs {
|
||||
nodes {
|
||||
id
|
||||
detailedStatus {
|
||||
id
|
||||
action {
|
||||
id
|
||||
confirmationMessage
|
||||
icon
|
||||
path
|
||||
title
|
||||
}
|
||||
detailsPath
|
||||
group
|
||||
hasDetails
|
||||
icon
|
||||
name
|
||||
tooltip
|
||||
}
|
||||
name
|
||||
scheduled
|
||||
scheduledAt
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -19,6 +19,7 @@ import { fetchPolicies } from '~/lib/graphql';
|
|||
import SafeHtml from '~/vue_shared/directives/safe_html';
|
||||
import { visitUrl } from '~/lib/utils/url_utility';
|
||||
import { s__, __, n__ } from '~/locale';
|
||||
import { createAlert } from '~/alert';
|
||||
import { helpPagePath } from '~/helpers/help_page_helper';
|
||||
import {
|
||||
IDENTITY_VERIFICATION_REQUIRED_ERROR,
|
||||
|
|
@ -348,35 +349,45 @@ export default {
|
|||
},
|
||||
async createPipeline() {
|
||||
this.submitted = true;
|
||||
try {
|
||||
const {
|
||||
data: {
|
||||
pipelineCreate: { errors, pipeline },
|
||||
},
|
||||
} = await this.$apollo.mutate({
|
||||
mutation: createPipelineMutation,
|
||||
variables: {
|
||||
input: {
|
||||
projectPath: this.projectPath,
|
||||
ref: this.refShortName,
|
||||
variables: filterVariables(this.variables),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const { data } = await this.$apollo.mutate({
|
||||
mutation: createPipelineMutation,
|
||||
variables: {
|
||||
endpoint: this.pipelinesPath,
|
||||
// send shortName as fall back for query params
|
||||
// https://gitlab.com/gitlab-org/gitlab/-/issues/287815
|
||||
ref: this.refQueryParam,
|
||||
variablesAttributes: filterVariables(this.variables),
|
||||
},
|
||||
});
|
||||
const pipelineErrors = pipeline?.errorMessages?.nodes?.map((node) => node?.content) || '';
|
||||
const totalWarnings = pipeline?.warningMessages?.nodes?.length || 0;
|
||||
|
||||
const { id, errors, totalWarnings, warnings } = data.createPipeline;
|
||||
if (pipeline?.path) {
|
||||
visitUrl(pipeline.path);
|
||||
} else if (errors?.length > 0 || pipelineErrors.length || totalWarnings) {
|
||||
const warnings = pipeline?.warningMessages?.nodes?.map((node) => node?.content) || '';
|
||||
const error = errors[0] || pipelineErrors[0] || '';
|
||||
|
||||
if (id) {
|
||||
visitUrl(`${this.pipelinesPath}/${id}`);
|
||||
return;
|
||||
this.reportError({
|
||||
title: i18n.submitErrorTitle,
|
||||
error,
|
||||
warnings,
|
||||
totalWarnings,
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
createAlert({ message: i18n.submitErrorTitle });
|
||||
Sentry.captureException(error);
|
||||
}
|
||||
|
||||
// always re-enable submit button
|
||||
this.submitted = false;
|
||||
const [error] = errors;
|
||||
|
||||
this.reportError({
|
||||
title: i18n.submitErrorTitle,
|
||||
error,
|
||||
warnings,
|
||||
totalWarnings,
|
||||
});
|
||||
},
|
||||
onRefsLoadingError(error) {
|
||||
this.reportError({ title: i18n.refsLoadingErrorTitle });
|
||||
|
|
|
|||
|
|
@ -1,9 +1,23 @@
|
|||
mutation createPipeline($endpoint: String, $ref: String, $variablesAttributes: Array) {
|
||||
createPipeline(endpoint: $endpoint, ref: $ref, variablesAttributes: $variablesAttributes)
|
||||
@client {
|
||||
id
|
||||
# This name is specifically needed for backend logic
|
||||
mutation internalPipelineCreate($input: PipelineCreateInput!) {
|
||||
pipelineCreate(input: $input) {
|
||||
clientMutationId
|
||||
errors
|
||||
totalWarnings
|
||||
warnings
|
||||
pipeline {
|
||||
id
|
||||
path
|
||||
errorMessages {
|
||||
nodes {
|
||||
id
|
||||
content
|
||||
}
|
||||
}
|
||||
warningMessages {
|
||||
nodes {
|
||||
id
|
||||
content
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
import axios from '~/lib/utils/axios_utils';
|
||||
|
||||
export const resolvers = {
|
||||
Mutation: {
|
||||
createPipeline: (_, { endpoint, ref, variablesAttributes }) => {
|
||||
return axios
|
||||
.post(endpoint, { ref, variables_attributes: variablesAttributes })
|
||||
.then((response) => {
|
||||
const { id } = response.data;
|
||||
return {
|
||||
id,
|
||||
errors: [],
|
||||
totalWarnings: 0,
|
||||
warnings: [],
|
||||
};
|
||||
})
|
||||
.catch((err) => {
|
||||
const { errors = [], totalWarnings = 0, warnings = [] } = err.response.data;
|
||||
|
||||
return {
|
||||
id: null,
|
||||
errors,
|
||||
totalWarnings,
|
||||
warnings,
|
||||
};
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
@ -2,7 +2,6 @@ import Vue from 'vue';
|
|||
import VueApollo from 'vue-apollo';
|
||||
import createDefaultClient from '~/lib/graphql';
|
||||
import PipelineNewForm from './components/pipeline_new_form.vue';
|
||||
import { resolvers } from './graphql/resolvers';
|
||||
|
||||
const mountPipelineNewForm = (el) => {
|
||||
const {
|
||||
|
|
@ -31,7 +30,7 @@ const mountPipelineNewForm = (el) => {
|
|||
Vue.use(VueApollo);
|
||||
|
||||
const apolloProvider = new VueApollo({
|
||||
defaultClient: createDefaultClient(resolvers),
|
||||
defaultClient: createDefaultClient(),
|
||||
});
|
||||
|
||||
return new Vue({
|
||||
|
|
|
|||
|
|
@ -1,13 +1,16 @@
|
|||
// We need to filter out blank variables
|
||||
// and filter out variables that have no key
|
||||
// before sending to the API to create a pipeline.
|
||||
/**
|
||||
* We need to filter out blank variables as well as variables that have no key
|
||||
* and then format the variables to GraphQL
|
||||
* before sending to the API to create a pipeline.
|
||||
*/
|
||||
|
||||
export default (variables) => {
|
||||
return variables
|
||||
.filter(({ key }) => key !== '')
|
||||
.map(({ variable_type, key, value }) => ({
|
||||
variable_type,
|
||||
.map(({ key, value, variable_type: variableType }) => ({
|
||||
key,
|
||||
secret_value: value,
|
||||
value,
|
||||
// CiVariableType must be all caps
|
||||
variableType: variableType.toUpperCase(),
|
||||
}));
|
||||
};
|
||||
|
|
|
|||
|
|
@ -475,6 +475,7 @@ export default {
|
|||
'collapseAllFiles',
|
||||
'setDiffViewType',
|
||||
'setShowWhitespace',
|
||||
'goToFile',
|
||||
]),
|
||||
...mapActions('findingsDrawer', ['setDrawer']),
|
||||
closeDrawer() {
|
||||
|
|
@ -804,7 +805,11 @@ export default {
|
|||
:data-can-create-note="getNoteableData.current_user.can_create_note"
|
||||
class="files gl-mt-2 gl-flex"
|
||||
>
|
||||
<diffs-file-tree :visible="renderFileTree" @toggled="fileTreeToggled" />
|
||||
<diffs-file-tree
|
||||
:visible="renderFileTree"
|
||||
@toggled="fileTreeToggled"
|
||||
@clickFile="goToFile({ path: $event.path })"
|
||||
/>
|
||||
<div class="col-12 col-md-auto diff-files-holder">
|
||||
<commit-widget v-if="commit" :commit="commit" :collapsible="false" />
|
||||
<gl-alert
|
||||
|
|
|
|||
|
|
@ -65,6 +65,6 @@ export default {
|
|||
side="right"
|
||||
@resize-end="cacheTreeListWidth"
|
||||
/>
|
||||
<tree-list :hide-file-stats="hideFileStats" />
|
||||
<tree-list :hide-file-stats="hideFileStats" @clickFile="$emit('clickFile', $event)" />
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
...mapActions('diffs', ['toggleTreeOpen', 'goToFile', 'setRenderTreeList', 'setTreeOpen']),
|
||||
...mapActions('diffs', ['toggleTreeOpen', 'setRenderTreeList', 'setTreeOpen']),
|
||||
|
||||
scrollVirtualScrollerToFileHash(hash) {
|
||||
const item = document.querySelector(`[data-file-row="${hash}"]`);
|
||||
|
|
@ -239,7 +239,7 @@ export default {
|
|||
class="gl-relative !gl-m-1"
|
||||
:data-file-row="item.fileHash"
|
||||
@toggleTreeOpen="toggleTreeOpen"
|
||||
@clickFile="(path) => goToFile({ path })"
|
||||
@clickFile="$emit('clickFile', $event)"
|
||||
/>
|
||||
</template>
|
||||
<template #after>
|
||||
|
|
|
|||
|
|
@ -42,12 +42,17 @@ export default {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<gl-badge :icon="mappedStatus.icon" :variant="mappedStatus.variant" icon-size="sm">
|
||||
<div class="gl-flex gl-flex-col gl-items-start gl-gap-2">
|
||||
<gl-badge
|
||||
:icon="mappedStatus.icon"
|
||||
icon-optically-aligned
|
||||
:variant="mappedStatus.variant"
|
||||
class="gl-pr-3"
|
||||
>
|
||||
{{ mappedStatus.text }}
|
||||
</gl-badge>
|
||||
|
||||
<div v-if="failuresHref" class="gl-mt-2">
|
||||
<div v-if="failuresHref">
|
||||
<gl-link :href="failuresHref">{{ s__('Import|Show errors') }} ></gl-link>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -80,9 +80,6 @@ export default {
|
|||
toggleTreeOpen(path) {
|
||||
this.$emit('toggleTreeOpen', path);
|
||||
},
|
||||
clickedFile(path) {
|
||||
this.$emit('clickFile', path);
|
||||
},
|
||||
clickFile() {
|
||||
// Manual Action if a tree is selected/opened
|
||||
if (this.isTree && this.hasUrlAtCurrentRoute()) {
|
||||
|
|
@ -91,7 +88,7 @@ export default {
|
|||
|
||||
if (this.$router && !this.hasUrlAtCurrentRoute()) this.$router.push(this.fileRouterUrl);
|
||||
|
||||
if (this.isBlob) this.clickedFile(this.file.path);
|
||||
if (this.isBlob) this.$emit('clickFile', this.file);
|
||||
},
|
||||
scrollIntoView(isInit = false) {
|
||||
const block = isInit && this.isTree ? 'center' : 'nearest';
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
import { GlBadge, GlPopover, GlTooltipDirective } from '@gitlab/ui';
|
||||
import uniqueId from 'lodash/uniqueId';
|
||||
import { joinPaths } from '~/lib/utils/url_utility';
|
||||
import { s__, sprintf } from '~/locale';
|
||||
import { truncate } from '~/lib/utils/text_utility';
|
||||
|
||||
|
|
@ -55,7 +56,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
topicPath(topic) {
|
||||
return `/explore/projects/topics/${encodeURIComponent(topic)}`;
|
||||
const explorePath = `/explore/projects/topics/${encodeURIComponent(topic)}`;
|
||||
|
||||
return joinPaths(gon.relative_url_root || '', explorePath);
|
||||
},
|
||||
topicTitle(topic) {
|
||||
return truncate(topic, MAX_TOPIC_TITLE_LENGTH);
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ input[type='file'] {
|
|||
height: 0;
|
||||
margin: 4px 0;
|
||||
overflow: hidden;
|
||||
border-top: 1px solid $border-color;
|
||||
@apply gl-border-t;
|
||||
}
|
||||
|
||||
.info-well {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ body {
|
|||
}
|
||||
|
||||
legend {
|
||||
border-bottom: 1px solid $border-color;
|
||||
@apply gl-border-b;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ $brand-danger: $red-500;
|
|||
|
||||
$border-radius-base: $gl-border-radius-base;
|
||||
|
||||
$input-border: $border-color;
|
||||
$input-border: $gl-border-color-default;
|
||||
|
||||
$padding-base-vertical: $gl-vert-padding;
|
||||
$padding-base-horizontal: $gl-padding;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
@import '@gitlab/ui/src/tokens/build/scss/tokens.dark';
|
||||
|
||||
$border-color: #4f4f4f;
|
||||
|
||||
$body-bg: $gray-10;
|
||||
$input-bg: $white;
|
||||
$input-focus-bg: $white;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ a {
|
|||
.error-nav {
|
||||
margin: $gl-spacing-scale-6 0 0 0;
|
||||
padding: $gl-spacing-scale-4 0 0 0;
|
||||
border-top: 1px solid $border-color;
|
||||
border-top: 1px solid $gl-border-color-default;
|
||||
|
||||
li {
|
||||
display: block;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
width: $award-emoji-width;
|
||||
font-size: 14px;
|
||||
background-color: $white;
|
||||
border: 1px solid $border-color;
|
||||
@apply gl-border;
|
||||
border-radius: $border-radius-base;
|
||||
box-shadow: 0 6px 12px $award-emoji-menu-shadow;
|
||||
pointer-events: none;
|
||||
|
|
@ -129,19 +129,6 @@
|
|||
}
|
||||
|
||||
.gl-button.btn.award-control {
|
||||
margin: 4px 8px 4px 0;
|
||||
|
||||
&.disabled {
|
||||
cursor: default;
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
background-color: $white;
|
||||
border-color: $border-color;
|
||||
}
|
||||
}
|
||||
|
||||
&.active,
|
||||
&:hover,
|
||||
&:active,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
.avatar-tile {
|
||||
margin-right: 4px;
|
||||
border: 1px solid $border-color;
|
||||
@apply gl-border;
|
||||
border-radius: 50%;
|
||||
vertical-align: sub;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -278,12 +278,11 @@ li.note {
|
|||
|
||||
// these classes override styles from the dropzone node package
|
||||
.dropzone .dz-preview .dz-progress {
|
||||
border-color: $border-color !important;
|
||||
@apply gl-border #{!important};
|
||||
|
||||
.dz-upload {
|
||||
background: $green-500 !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.dz-message {
|
||||
|
|
@ -407,7 +406,7 @@ li.note {
|
|||
padding-bottom: $gl-spacing-scale-6;
|
||||
margin: 0;
|
||||
|
||||
border-top: 1px solid $border-color;
|
||||
@apply gl-border-t;
|
||||
}
|
||||
|
||||
.gl-pseudo-placeholder:empty::before {
|
||||
|
|
|
|||
|
|
@ -122,17 +122,17 @@ $diff-file-header: 41px;
|
|||
img {
|
||||
border: 1px solid $white;
|
||||
background-image: linear-gradient(45deg,
|
||||
$border-color 25%,
|
||||
var(--gl-border-color-default) 25%,
|
||||
transparent 25%,
|
||||
transparent 75%,
|
||||
$border-color 75%,
|
||||
$border-color 100%),
|
||||
var(--gl-border-color-default) 75%,
|
||||
var(--gl-border-color-default) 100%),
|
||||
linear-gradient(45deg,
|
||||
$border-color 25%,
|
||||
var(--gl-border-color-default) 25%,
|
||||
transparent 25%,
|
||||
transparent 75%,
|
||||
$border-color 75%,
|
||||
$border-color 100%);
|
||||
var(--gl-border-color-default) 75%,
|
||||
var(--gl-border-color-default) 100%);
|
||||
background-size: 10px 10px;
|
||||
background-position: 0 0, 5px 5px;
|
||||
max-width: 100%;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@
|
|||
|
||||
.md-suggestion-diff {
|
||||
display: table !important;
|
||||
border: 1px solid $border-color !important;
|
||||
@apply gl-border #{!important};
|
||||
|
||||
td {
|
||||
border: 0 !important;
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background-color: $gray-10;
|
||||
border: 1px solid $border-color;
|
||||
@apply gl-border;
|
||||
border-radius: $gl-border-radius-base $gl-border-radius-base 0 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@
|
|||
|
||||
.gl-responsive-table-row {
|
||||
margin-top: 10px;
|
||||
border: 1px solid $border-color;
|
||||
@apply gl-text-subtle;
|
||||
@apply gl-border gl-text-subtle;
|
||||
|
||||
&.gl-responsive-table-row-clickable {
|
||||
&:hover {
|
||||
|
|
@ -92,7 +91,7 @@
|
|||
align-self: stretch;
|
||||
min-height: 0;
|
||||
background-color: $gray-50;
|
||||
border-top: 1px solid $border-color;
|
||||
@apply gl-border-t;
|
||||
|
||||
.table-action-buttons {
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
margin: 0;
|
||||
list-style: none;
|
||||
height: auto;
|
||||
border-bottom: 1px solid $border-color;
|
||||
@apply gl-border-b;
|
||||
|
||||
li:not(.md-header-toolbar) {
|
||||
display: flex;
|
||||
|
|
@ -328,7 +328,7 @@
|
|||
|
||||
&.activities {
|
||||
display: flex;
|
||||
border-bottom: 1px solid $border-color;
|
||||
@apply gl-border-b;
|
||||
align-items: center;
|
||||
|
||||
.nav-links {
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@
|
|||
.block {
|
||||
padding: 16px 0;
|
||||
width: 250px;
|
||||
border-bottom: 1px solid $border-color;
|
||||
@apply gl-border-b;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -249,10 +249,10 @@
|
|||
@apply gl-text-subtle;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid $border-color;
|
||||
@apply gl-border-b;
|
||||
|
||||
&:hover {
|
||||
background-color: $border-color;
|
||||
background-color: $gray-100;
|
||||
@apply gl-text-default;
|
||||
}
|
||||
}
|
||||
|
|
@ -569,7 +569,7 @@
|
|||
}
|
||||
|
||||
.participants {
|
||||
border-bottom: 1px solid $border-color;
|
||||
@apply gl-border-b;
|
||||
}
|
||||
|
||||
.hide-collapsed {
|
||||
|
|
@ -581,7 +581,7 @@
|
|||
height: $sidebar-toggle-height;
|
||||
margin-top: 0;
|
||||
margin-left: 0;
|
||||
border-bottom: 1px solid $border-color !important;
|
||||
@apply gl-border-b #{!important};
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
.gitlab-tabs {
|
||||
background: $gray-10;
|
||||
border: 1px solid $border-color;
|
||||
@apply gl-border;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
li {
|
||||
width: 50%;
|
||||
|
||||
&:not(:last-child) {
|
||||
border-right: 1px solid $border-color;
|
||||
@apply gl-border-r;
|
||||
}
|
||||
|
||||
&.active {
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
}
|
||||
|
||||
.gitlab-tab-content {
|
||||
border: 1px solid $border-color;
|
||||
@apply gl-border;
|
||||
border-top: 0;
|
||||
margin-bottom: $gl-padding;
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
// to make room for the summary toggle
|
||||
details summary {
|
||||
@apply gl-font-bold;
|
||||
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
a.anchor {
|
||||
@apply -gl-ml-7;
|
||||
|
|
@ -190,7 +190,7 @@
|
|||
|
||||
td,
|
||||
th {
|
||||
border: 1px solid $border-color;
|
||||
@apply gl-border;
|
||||
}
|
||||
|
||||
tr {
|
||||
|
|
@ -615,7 +615,8 @@
|
|||
}
|
||||
|
||||
.exampleblock > div:nth-of-type(1) {
|
||||
border: $gl-border-size-3 solid $border-color;
|
||||
@apply gl-border;
|
||||
border-width: $gl-border-size-3;
|
||||
border-radius: $gl-border-radius-base;
|
||||
padding: $gl-padding-12 $gl-padding-24;
|
||||
|
||||
|
|
@ -832,7 +833,7 @@ wbr {
|
|||
content: '';
|
||||
width: 16rem;
|
||||
max-width: 100%;
|
||||
border-top: 1px solid $border-color;
|
||||
@apply gl-border-t;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ $purple-light: #ede8fb !default;
|
|||
/*
|
||||
* UI elements
|
||||
*/
|
||||
$border-color: $gray-100;
|
||||
$well-expand-item: #e8f2f7 !default;
|
||||
|
||||
/*
|
||||
|
|
@ -234,7 +233,6 @@ $dropdown-max-height-lg: 445px;
|
|||
$dropdown-vertical-offset: 4px;
|
||||
$dropdown-title-btn-color: #bfbfbf;
|
||||
$dropdown-loading-bg: rgba($white, 0.6);
|
||||
$dropdown-toggle-active-border-color: darken($border-color, 14%);
|
||||
$dropdown-fade-mask-height: 32px;
|
||||
$dropdown-member-form-control-width: 163px;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ $font-family-sans-serif: $regular-font;
|
|||
$font-family-monospace: $monospace-font;
|
||||
$btn-line-height: 20px;
|
||||
$table-accent-bg: $gray-10;
|
||||
$table-border-color: $gray-100;
|
||||
$card-border-color: $border-color;
|
||||
$table-border-color: $gl-border-color-default;
|
||||
$card-border-color: $gl-border-color-default;
|
||||
$card-cap-bg: $gray-10 !default;
|
||||
$success: $green-500;
|
||||
$info: $blue-500;
|
||||
|
|
@ -26,7 +26,7 @@ $dropdown-item-padding-y: 8px;
|
|||
$dropdown-item-padding-x: 12px;
|
||||
$popover-max-width: 300px;
|
||||
$popover-border-width: 1px;
|
||||
$popover-border-color: $border-color;
|
||||
$popover-border-color: $gl-border-color-default;
|
||||
$popover-box-shadow: 0 $border-radius-small $gl-border-radius-base 0 $gl-color-alpha-dark-8;
|
||||
$popover-arrow-outer-color: $gl-color-alpha-dark-8;
|
||||
$h1-font-size: 14px * 2.5;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
|
||||
.diffOverview {
|
||||
background-color: $white;
|
||||
border-left: 1px solid $border-color;
|
||||
@apply gl-border-l;
|
||||
cursor: ns-resize;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@
|
|||
}
|
||||
|
||||
.common-note-form .md-area {
|
||||
border-color: var(--ide-input-border, $border-color);
|
||||
border-color: var(--ide-input-border, var(--gl-border-color-default));
|
||||
}
|
||||
|
||||
.md table:not(.code) tr th {
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
.card-header,
|
||||
.ide-terminal .top-bar,
|
||||
.ide-pipeline .top-bar {
|
||||
border-color: var(--ide-border-color, $border-color);
|
||||
border-color: var(--ide-border-color, var(--gl-border-color-default));
|
||||
}
|
||||
|
||||
hr {
|
||||
|
|
@ -138,7 +138,7 @@
|
|||
.nav-links,
|
||||
.gl-tabs-nav,
|
||||
.common-note-form .md-area.is-focused .nav-links {
|
||||
border-color: var(--ide-border-color-alt, $border-color);
|
||||
border-color: var(--ide-border-color-alt, var(--gl-border-color-default));
|
||||
}
|
||||
|
||||
pre {
|
||||
|
|
@ -188,7 +188,7 @@
|
|||
input[type='text'],
|
||||
input[type='search'],
|
||||
.filtered-search-box {
|
||||
border-color: var(--ide-input-border, $border-color);
|
||||
border-color: var(--ide-input-border, var(--gl-border-color-default));
|
||||
background: var(--ide-input-background, $white) !important;
|
||||
}
|
||||
|
||||
|
|
@ -241,7 +241,7 @@
|
|||
.dropdown,
|
||||
.dropdown-menu-toggle {
|
||||
color: var(--ide-input-color, var(--gl-text-color-default)) !important;
|
||||
border-color: var(--ide-btn-default-border, $border-color);
|
||||
border-color: var(--ide-btn-default-border, var(--gl-border-color-default));
|
||||
}
|
||||
|
||||
.dropdown-menu-toggle {
|
||||
|
|
@ -258,34 +258,34 @@
|
|||
// todo: remove this block after all default buttons have been migrated to gl-button
|
||||
.btn-default:not(.gl-button) {
|
||||
background-color: var(--ide-btn-default-background, $white) !important;
|
||||
border-color: var(--ide-btn-default-border, $border-color);
|
||||
border-color: var(--ide-btn-default-border, var(--gl-border-color-default));
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
border-color: var(--ide-btn-default-hover-border, $border-color) !important;
|
||||
border-color: var(--ide-btn-default-hover-border, var(--gl-border-color-default)) !important;
|
||||
background-color: var(--ide-btn-default-background, $gray-50) !important;
|
||||
}
|
||||
|
||||
&:active,
|
||||
.active {
|
||||
border-color: var(--ide-btn-default-hover-border, $border-color) !important;
|
||||
background-color: var(--ide-btn-default-background, $border-color) !important;
|
||||
border-color: var(--ide-btn-default-hover-border, var(--gl-border-color-default)) !important;
|
||||
background-color: var(--ide-btn-default-background, var(--gl-border-color-default)) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
color: var(--ide-text-color, var(--gl-text-color-default));
|
||||
border-color: var(--ide-background, $border-color);
|
||||
border-color: var(--ide-background, var(--gl-border-color-default));
|
||||
background-color: var(--ide-dropdown-background, $white);
|
||||
|
||||
.nav-links {
|
||||
background-color: var(--ide-dropdown-hover-background, $white);
|
||||
border-color: var(--ide-dropdown-hover-background, $border-color);
|
||||
border-color: var(--ide-dropdown-hover-background, var(--gl-border-color-default));
|
||||
}
|
||||
|
||||
.gl-tabs-nav {
|
||||
background-color: var(--ide-dropdown-hover-background, $white);
|
||||
box-shadow: inset 0 -2px 0 0 var(--ide-dropdown-hover-background, $border-color);
|
||||
box-shadow: inset 0 -2px 0 0 var(--ide-dropdown-hover-background, var(--gl-border-color-default));
|
||||
}
|
||||
|
||||
.divider {
|
||||
|
|
|
|||
|
|
@ -1,18 +1,3 @@
|
|||
@mixin build-content($border-radius: 30px) {
|
||||
display: inline-block;
|
||||
padding: 8px 10px 9px;
|
||||
width: 100%;
|
||||
border: 1px solid var(--gl-border-color-default);
|
||||
border-radius: $border-radius;
|
||||
background-color: var(--white, $white);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--gray-50, $gray-50);
|
||||
border: 1px solid $dropdown-toggle-active-border-color;
|
||||
color: var(--gl-text-color-default);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Action icons inside dropdowns:
|
||||
- dropdown in big graph
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@
|
|||
align-items: flex-start;
|
||||
|
||||
&:hover {
|
||||
background-color: rgba($white, 0.2);
|
||||
background-color: var(--gl-color-alpha-light-8);
|
||||
}
|
||||
|
||||
.arrow {
|
||||
|
|
@ -229,6 +229,29 @@
|
|||
}
|
||||
}
|
||||
|
||||
.job-log-line-highlight {
|
||||
$highlight-border-size: 2px;
|
||||
$highlight-extra-x-padding: 2px;
|
||||
$highlight-x-padding: $gl-padding-8 + $highlight-extra-x-padding;
|
||||
$highlight-border: $highlight-border-size solid currentColor;
|
||||
$highlight-x-margin: -#{$highlight-border-size + $highlight-extra-x-padding};
|
||||
|
||||
border-left: $highlight-border;
|
||||
border-right: $highlight-border;
|
||||
|
||||
padding-left: $highlight-x-padding;
|
||||
padding-right: $highlight-x-padding;
|
||||
|
||||
margin-left: $highlight-x-margin;
|
||||
margin-right: $highlight-x-margin;
|
||||
|
||||
background-color: var(--gl-color-alpha-light-4);
|
||||
|
||||
.arrow {
|
||||
left: $highlight-extra-x-padding;
|
||||
}
|
||||
}
|
||||
|
||||
.loader-animation {
|
||||
@include build-loader-animation;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,15 +64,15 @@ $ide-commit-header-height: 48px;
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
border-left: 1px solid var(--ide-border-color, $border-color);
|
||||
border-right: 1px solid var(--ide-border-color, $border-color);
|
||||
border-left: 1px solid var(--ide-border-color, var(--gl-border-color-default));
|
||||
border-right: 1px solid var(--ide-border-color, var(--gl-border-color-default));
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.multi-file-tabs {
|
||||
display: flex;
|
||||
background-color: var(--ide-background, $gray-10);
|
||||
box-shadow: inset 0 -1px var(--ide-border-color, $border-color);
|
||||
box-shadow: inset 0 -1px var(--ide-border-color, var(--gl-border-color-default));
|
||||
|
||||
> ul {
|
||||
display: flex;
|
||||
|
|
@ -84,8 +84,8 @@ $ide-commit-header-height: 48px;
|
|||
align-items: center;
|
||||
padding: $grid-size $gl-padding;
|
||||
background-color: var(--ide-background-hover, $gray-50);
|
||||
border-right: 1px solid var(--ide-border-color, $border-color);
|
||||
border-bottom: 1px solid var(--ide-border-color, $border-color);
|
||||
border-right: 1px solid var(--ide-border-color, var(--gl-border-color-default));
|
||||
border-bottom: 1px solid var(--ide-border-color, var(--gl-border-color-default));
|
||||
|
||||
// stylelint-disable-next-line gitlab/no-gl-class
|
||||
&.active,
|
||||
|
|
@ -129,13 +129,13 @@ $ide-commit-header-height: 48px;
|
|||
font-weight: normal !important;
|
||||
|
||||
background-color: var(--ide-background-hover, $gray-50);
|
||||
border-right: 1px solid var(--ide-border-color, $border-color);
|
||||
border-bottom: 1px solid var(--ide-border-color, $border-color);
|
||||
border-right: 1px solid var(--ide-border-color, var(--gl-border-color-default));
|
||||
border-bottom: 1px solid var(--ide-border-color, var(--gl-border-color-default));
|
||||
|
||||
// stylelint-disable-next-line gitlab/no-gl-class
|
||||
&.gl-tab-nav-item-active {
|
||||
background-color: var(--ide-highlight-background, $white);
|
||||
border-color: var(--ide-border-color, $border-color);
|
||||
border-color: var(--ide-border-color, var(--gl-border-color-default));
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
|
||||
|
|
@ -233,7 +233,7 @@ $ide-commit-header-height: 48px;
|
|||
|
||||
.ide-status-bar {
|
||||
color: var(--ide-text-color, var(--gl-text-color-default));
|
||||
border-top: 1px solid var(--ide-border-color, $border-color);
|
||||
border-top: 1px solid var(--ide-border-color, var(--gl-border-color-default));
|
||||
padding: 2px $gl-padding-8 0;
|
||||
background-color: var(--ide-footer-background, $white);
|
||||
display: flex;
|
||||
|
|
@ -307,8 +307,8 @@ $ide-commit-header-height: 48px;
|
|||
flex: 1;
|
||||
flex-direction: column;
|
||||
background-color: var(--ide-highlight-background, $white);
|
||||
border-left: 1px solid var(--ide-border-color, $border-color);
|
||||
border-top: 1px solid var(--ide-border-color, $border-color);
|
||||
border-left: 1px solid var(--ide-border-color, var(--gl-border-color-default));
|
||||
border-top: 1px solid var(--ide-border-color, var(--gl-border-color-default));
|
||||
border-top-left-radius: $border-radius-small;
|
||||
min-height: 0; // firefox fix
|
||||
}
|
||||
|
|
@ -333,7 +333,7 @@ $ide-commit-header-height: 48px;
|
|||
|
||||
.multi-file-commit-panel-header {
|
||||
height: $ide-commit-header-height;
|
||||
border-bottom: 1px solid var(--ide-border-color-alt, $border-color);
|
||||
border-bottom: 1px solid var(--ide-border-color-alt, var(--gl-border-color-default));
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
|
|
@ -395,7 +395,7 @@ $ide-commit-header-height: 48px;
|
|||
.multi-file-commit-form {
|
||||
position: relative;
|
||||
background-color: var(--ide-highlight-background, $white);
|
||||
border-left: 1px solid var(--ide-border-color, $border-color);
|
||||
border-left: 1px solid var(--ide-border-color, var(--gl-border-color-default));
|
||||
transition: all 0.3s ease;
|
||||
|
||||
> form,
|
||||
|
|
@ -403,7 +403,7 @@ $ide-commit-header-height: 48px;
|
|||
padding: $gl-padding 0;
|
||||
margin-left: $gl-padding;
|
||||
margin-right: $gl-padding;
|
||||
border-top: 1px solid var(--ide-border-color-alt, $border-color);
|
||||
border-top: 1px solid var(--ide-border-color-alt, var(--gl-border-color-default));
|
||||
}
|
||||
|
||||
.btn {
|
||||
|
|
@ -474,7 +474,7 @@ $ide-commit-header-height: 48px;
|
|||
margin-right: $gl-padding;
|
||||
|
||||
&.is-first {
|
||||
border-bottom: 1px solid var(--ide-border-color-alt, $border-color);
|
||||
border-bottom: 1px solid var(--ide-border-color-alt, var(--gl-border-color-default));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -527,8 +527,8 @@ $ide-commit-header-height: 48px;
|
|||
width: calc(100% + 1px);
|
||||
padding-right: $gl-padding + 1px;
|
||||
background-color: var(--ide-highlight-background, $white);
|
||||
border-top-color: var(--ide-border-color, $border-color);
|
||||
border-bottom-color: var(--ide-border-color, $border-color);
|
||||
border-top-color: var(--ide-border-color, var(--gl-border-color-default));
|
||||
border-bottom-color: var(--ide-border-color, var(--gl-border-color-default));
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
|
|
@ -639,7 +639,7 @@ $ide-commit-header-height: 48px;
|
|||
padding: 12px 0;
|
||||
margin-left: $ide-tree-padding;
|
||||
margin-right: $ide-tree-padding;
|
||||
border-bottom: 1px solid var(--ide-border-color-alt, $border-color);
|
||||
border-bottom: 1px solid var(--ide-border-color-alt, var(--gl-border-color-default));
|
||||
|
||||
svg {
|
||||
color: var(--ide-text-color-secondary, var(--gl-icon-color-subtle));
|
||||
|
|
@ -853,7 +853,7 @@ $ide-commit-header-height: 48px;
|
|||
padding: 16px;
|
||||
|
||||
&:not(:last-child) {
|
||||
border-bottom: 1px solid var(--ide-border-color, $border-color);
|
||||
border-bottom: 1px solid var(--ide-border-color, var(--gl-border-color-default));
|
||||
}
|
||||
|
||||
.ci-status-icon {
|
||||
|
|
@ -983,7 +983,7 @@ $ide-commit-header-height: 48px;
|
|||
.ide-file-templates {
|
||||
padding: $grid-size $gl-padding;
|
||||
background-color: var(--ide-background, $gray-10);
|
||||
border-bottom: 1px solid var(--ide-border-color, $border-color);
|
||||
border-bottom: 1px solid var(--ide-border-color, var(--gl-border-color-default));
|
||||
|
||||
.dropdown {
|
||||
min-width: 180px;
|
||||
|
|
@ -998,7 +998,7 @@ $ide-commit-header-height: 48px;
|
|||
height: 65px;
|
||||
padding: 8px 16px;
|
||||
background-color: var(--ide-background, $gray-10);
|
||||
box-shadow: inset 0 -1px var(--ide-border-color, $border-color);
|
||||
box-shadow: inset 0 -1px var(--ide-border-color, var(--gl-border-color-default));
|
||||
}
|
||||
|
||||
.ide-commit-list-changed-icon {
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
.timeline-entry:last-child,
|
||||
.create-timeline-event {
|
||||
.timeline-event-bottom-border {
|
||||
border-bottom: solid $gl-border-size-1 $border-color;
|
||||
@apply gl-border-b;
|
||||
padding-top: $gl-spacing-scale-5;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
}
|
||||
|
||||
.reference {
|
||||
border-top: 1px solid $border-color;
|
||||
@apply gl-border-t;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
&.ui-gray {
|
||||
background-color: $gray-900;
|
||||
border: solid 1px $border-color;
|
||||
@apply gl-border;
|
||||
}
|
||||
|
||||
&.ui-neutral {
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
// stylelint-disable-next-line gitlab/no-gl-class
|
||||
.gl-dark & {
|
||||
background-color: $gray-950;
|
||||
border: solid 1px $border-color;
|
||||
@apply gl-border;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
@import 'highlight/embedded';
|
||||
@import 'framework/images';
|
||||
|
||||
$border-style: 1px solid $border-color;
|
||||
$border-style: 1px solid $gl-border-color-default;
|
||||
|
||||
font-family: $regular-font;
|
||||
font-size: $gl-font-size;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
name: populate_and_use_build_source_table
|
||||
feature_issue_url: https://gitlab.com/groups/gitlab-org/-/epics/11796
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/170899
|
||||
rollout_issue_url:
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/517040
|
||||
milestone: '17.7'
|
||||
group: group::security policies
|
||||
type: wip
|
||||
type: beta
|
||||
default_enabled: false
|
||||
|
|
@ -1,14 +1,20 @@
|
|||
- title: "Rename 'setPreReceiveSecretDetection' GraphQL mutation to 'setSecretPushProtection'"
|
||||
- title: "Rename `setPreReceiveSecretDetection` GraphQL mutation to `setSecretPushProtection`"
|
||||
removal_milestone: "18.0"
|
||||
announcement_milestone: "17.7"
|
||||
breaking_change: true
|
||||
window: 1
|
||||
reporter: smeadzinger
|
||||
window: 3
|
||||
reporter: abellucci
|
||||
stage: application_security_testing
|
||||
issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/462504
|
||||
impact: low
|
||||
issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/514414
|
||||
impact: medium
|
||||
scope: project
|
||||
resolution_role: Maintainer
|
||||
manual_task: true
|
||||
body: |
|
||||
The 'setPreReceiveSecretDetection' GraphQL mutation has been renamed to 'setSecretPushProtection'.
|
||||
The `setPreReceiveSecretDetection` GraphQL mutation has been renamed to `setSecretPushProtection`. We are also renaming some fields in the mutation's response to reflect the name change of the feature `pre_receive_secret_detection` to `secret_push_protection`.
|
||||
To avoid breaking workflows that use the old name, before GitLab 18.0 you should:
|
||||
|
||||
- Stop using the old mutation name `setPreReceiveSecretDetection`. Instead, use the name `setSecretPushProtection`.
|
||||
- Change any references to the field `pre_receive_secret_detection_enabled` to `secret_push_protection_enabled`.
|
||||
|
||||
documentation_url: https://docs.gitlab.com/ee/api/graphql/reference/index.html#mutationsetsecretpushprotection
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
migration_job_name: BackfillBulkImportExportBatchesGroupId
|
||||
description: Backfills sharding key `bulk_import_export_batches.group_id` from `bulk_import_exports`.
|
||||
feature_category: importers
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/180432
|
||||
milestone: '17.9'
|
||||
queued_migration_version: 20250205194220
|
||||
finalized_by: # version of the migration that finalized this BBM
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
migration_job_name: BackfillBulkImportExportBatchesProjectId
|
||||
description: Backfills sharding key `bulk_import_export_batches.project_id` from `bulk_import_exports`.
|
||||
feature_category: importers
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/180432
|
||||
milestone: '17.9'
|
||||
queued_migration_version: 20250205194215
|
||||
finalized_by: # version of the migration that finalized this BBM
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
migration_job_name: BackfillComplianceViolationNullTargetProjectIds
|
||||
description: Backfill target_project_id for ComplianceViolation models so we can set NOT NULL to the column in the future
|
||||
description: Backfill target_project_id for ComplianceViolation models so we can validate the FK
|
||||
feature_category: compliance_management
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/172754
|
||||
milestone: '17.7'
|
||||
queued_migration_version: 20241114202257
|
||||
finalized_by: 20250106194913
|
||||
milestone: '17.9'
|
||||
queued_migration_version: 20250203155647
|
||||
finalized_by:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
migration_job_name: BackfillRequiredCodeOwnersSectionsProtectedBranchNamespaceId
|
||||
description: Backfills sharding key `required_code_owners_sections.protected_branch_namespace_id` from `protected_branches`.
|
||||
feature_category: source_code_management
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/180440
|
||||
milestone: '17.9'
|
||||
queued_migration_version: 20250205200247
|
||||
finalized_by: # version of the migration that finalized this BBM
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
migration_job_name: BackfillRequiredCodeOwnersSectionsProtectedBranchProjectId
|
||||
description: Backfills sharding key `required_code_owners_sections.protected_branch_project_id` from `protected_branches`.
|
||||
feature_category: source_code_management
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/180440
|
||||
milestone: '17.9'
|
||||
queued_migration_version: 20250205200242
|
||||
finalized_by: # version of the migration that finalized this BBM
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
migration_job_name: BackfillSnippetRepositoryStorageMovesSnippetOrganizationId
|
||||
description: Backfills sharding key `snippet_repository_storage_moves.snippet_organization_id` from `snippets`.
|
||||
feature_category: source_code_management
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/180441
|
||||
milestone: '17.9'
|
||||
queued_migration_version: 20250205200748
|
||||
finalized_by: # version of the migration that finalized this BBM
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
migration_job_name: BackfillSnippetRepositoryStorageMovesSnippetProjectId
|
||||
description: Backfills sharding key `snippet_repository_storage_moves.snippet_project_id` from `snippets`.
|
||||
feature_category: source_code_management
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/180441
|
||||
milestone: '17.9'
|
||||
queued_migration_version: 20250205200743
|
||||
finalized_by: # version of the migration that finalized this BBM
|
||||
|
|
@ -27,3 +27,6 @@ desired_sharding_key:
|
|||
table: bulk_import_exports
|
||||
sharding_key: group_id
|
||||
belongs_to: export
|
||||
desired_sharding_key_migration_job_name:
|
||||
- BackfillBulkImportExportBatchesProjectId
|
||||
- BackfillBulkImportExportBatchesGroupId
|
||||
|
|
|
|||
|
|
@ -26,3 +26,6 @@ desired_sharding_key:
|
|||
sharding_key: namespace_id
|
||||
belongs_to: protected_branch
|
||||
table_size: small
|
||||
desired_sharding_key_migration_job_name:
|
||||
- BackfillRequiredCodeOwnersSectionsProtectedBranchProjectId
|
||||
- BackfillRequiredCodeOwnersSectionsProtectedBranchNamespaceId
|
||||
|
|
|
|||
|
|
@ -28,3 +28,6 @@ desired_sharding_key:
|
|||
table: snippets
|
||||
sharding_key: organization_id
|
||||
belongs_to: container
|
||||
desired_sharding_key_migration_job_name:
|
||||
- BackfillSnippetRepositoryStorageMovesSnippetProjectId
|
||||
- BackfillSnippetRepositoryStorageMovesSnippetOrganizationId
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddProjectIdToBulkImportExportBatches < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
|
||||
def change
|
||||
add_column :bulk_import_export_batches, :project_id, :bigint
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddGroupIdToBulkImportExportBatches < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
|
||||
def change
|
||||
add_column :bulk_import_export_batches, :group_id, :bigint
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddProtectedBranchProjectIdToRequiredCodeOwnersSections < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
|
||||
def change
|
||||
add_column :required_code_owners_sections, :protected_branch_project_id, :bigint
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddProtectedBranchNamespaceIdToRequiredCodeOwnersSections < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
|
||||
def change
|
||||
add_column :required_code_owners_sections, :protected_branch_namespace_id, :bigint
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddSnippetProjectIdToSnippetRepositoryStorageMoves < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
|
||||
def change
|
||||
add_column :snippet_repository_storage_moves, :snippet_project_id, :bigint
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddSnippetOrganizationIdToSnippetRepositoryStorageMoves < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
|
||||
def change
|
||||
add_column :snippet_repository_storage_moves, :snippet_organization_id, :bigint
|
||||
end
|
||||
end
|
||||
|
|
@ -5,23 +5,13 @@ class QueueBackfillComplianceViolationNullTargetProjectIds < Gitlab::Database::M
|
|||
|
||||
restrict_gitlab_migration gitlab_schema: :gitlab_main
|
||||
|
||||
MIGRATION = "BackfillComplianceViolationNullTargetProjectIds"
|
||||
DELAY_INTERVAL = 2.minutes
|
||||
BATCH_SIZE = 1000
|
||||
SUB_BATCH_SIZE = 100
|
||||
|
||||
def up
|
||||
queue_batched_background_migration(
|
||||
MIGRATION,
|
||||
:merge_requests_compliance_violations,
|
||||
:id,
|
||||
job_interval: DELAY_INTERVAL,
|
||||
batch_size: BATCH_SIZE,
|
||||
sub_batch_size: SUB_BATCH_SIZE
|
||||
)
|
||||
# no-op
|
||||
# Requeued by https://gitlab.com/gitlab-org/gitlab/-/merge_requests/180053
|
||||
end
|
||||
|
||||
def down
|
||||
delete_batched_background_migration(MIGRATION, :merge_requests_compliance_violations, :id, [])
|
||||
# noop
|
||||
# Requeued by https://gitlab.com/gitlab-org/gitlab/-/merge_requests/180053
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class RequeueBackfillComplianceViolationNullTargetProjectIdsMigration < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
restrict_gitlab_migration gitlab_schema: :gitlab_main
|
||||
|
||||
MIGRATION = "BackfillComplianceViolationNullTargetProjectIds"
|
||||
DELAY_INTERVAL = 2.minutes
|
||||
BATCH_SIZE = 10_000
|
||||
SUB_BATCH_SIZE = 1_000
|
||||
|
||||
def up
|
||||
delete_batched_background_migration(MIGRATION, :merge_requests_compliance_violations, :id, [])
|
||||
|
||||
queue_batched_background_migration(
|
||||
MIGRATION,
|
||||
:merge_requests_compliance_violations,
|
||||
:id,
|
||||
job_interval: DELAY_INTERVAL,
|
||||
batch_size: BATCH_SIZE,
|
||||
sub_batch_size: SUB_BATCH_SIZE
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
delete_batched_background_migration(MIGRATION, :merge_requests_compliance_violations, :id, [])
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class IndexBulkImportExportBatchesOnProjectId < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
disable_ddl_transaction!
|
||||
|
||||
INDEX_NAME = 'index_bulk_import_export_batches_on_project_id'
|
||||
|
||||
def up
|
||||
add_concurrent_index :bulk_import_export_batches, :project_id, name: INDEX_NAME
|
||||
end
|
||||
|
||||
def down
|
||||
remove_concurrent_index_by_name :bulk_import_export_batches, INDEX_NAME
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddBulkImportExportBatchesProjectIdFk < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
add_concurrent_foreign_key :bulk_import_export_batches, :projects, column: :project_id, on_delete: :cascade
|
||||
end
|
||||
|
||||
def down
|
||||
with_lock_retries do
|
||||
remove_foreign_key :bulk_import_export_batches, column: :project_id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddBulkImportExportBatchesProjectIdTrigger < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
|
||||
def up
|
||||
install_sharding_key_assignment_trigger(
|
||||
table: :bulk_import_export_batches,
|
||||
sharding_key: :project_id,
|
||||
parent_table: :bulk_import_exports,
|
||||
parent_sharding_key: :project_id,
|
||||
foreign_key: :export_id
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
remove_sharding_key_assignment_trigger(
|
||||
table: :bulk_import_export_batches,
|
||||
sharding_key: :project_id,
|
||||
parent_table: :bulk_import_exports,
|
||||
parent_sharding_key: :project_id,
|
||||
foreign_key: :export_id
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class QueueBackfillBulkImportExportBatchesProjectId < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
restrict_gitlab_migration gitlab_schema: :gitlab_main_cell
|
||||
|
||||
MIGRATION = "BackfillBulkImportExportBatchesProjectId"
|
||||
DELAY_INTERVAL = 2.minutes
|
||||
BATCH_SIZE = 1000
|
||||
SUB_BATCH_SIZE = 100
|
||||
|
||||
def up
|
||||
queue_batched_background_migration(
|
||||
MIGRATION,
|
||||
:bulk_import_export_batches,
|
||||
:id,
|
||||
:project_id,
|
||||
:bulk_import_exports,
|
||||
:project_id,
|
||||
:export_id,
|
||||
job_interval: DELAY_INTERVAL,
|
||||
batch_size: BATCH_SIZE,
|
||||
sub_batch_size: SUB_BATCH_SIZE
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
delete_batched_background_migration(
|
||||
MIGRATION,
|
||||
:bulk_import_export_batches,
|
||||
:id,
|
||||
[
|
||||
:project_id,
|
||||
:bulk_import_exports,
|
||||
:project_id,
|
||||
:export_id
|
||||
]
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class IndexBulkImportExportBatchesOnGroupId < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
disable_ddl_transaction!
|
||||
|
||||
INDEX_NAME = 'index_bulk_import_export_batches_on_group_id'
|
||||
|
||||
def up
|
||||
add_concurrent_index :bulk_import_export_batches, :group_id, name: INDEX_NAME
|
||||
end
|
||||
|
||||
def down
|
||||
remove_concurrent_index_by_name :bulk_import_export_batches, INDEX_NAME
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddBulkImportExportBatchesGroupIdFk < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
add_concurrent_foreign_key :bulk_import_export_batches, :namespaces, column: :group_id, on_delete: :cascade
|
||||
end
|
||||
|
||||
def down
|
||||
with_lock_retries do
|
||||
remove_foreign_key :bulk_import_export_batches, column: :group_id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddBulkImportExportBatchesGroupIdTrigger < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
|
||||
def up
|
||||
install_sharding_key_assignment_trigger(
|
||||
table: :bulk_import_export_batches,
|
||||
sharding_key: :group_id,
|
||||
parent_table: :bulk_import_exports,
|
||||
parent_sharding_key: :group_id,
|
||||
foreign_key: :export_id
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
remove_sharding_key_assignment_trigger(
|
||||
table: :bulk_import_export_batches,
|
||||
sharding_key: :group_id,
|
||||
parent_table: :bulk_import_exports,
|
||||
parent_sharding_key: :group_id,
|
||||
foreign_key: :export_id
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class QueueBackfillBulkImportExportBatchesGroupId < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
restrict_gitlab_migration gitlab_schema: :gitlab_main_cell
|
||||
|
||||
MIGRATION = "BackfillBulkImportExportBatchesGroupId"
|
||||
DELAY_INTERVAL = 2.minutes
|
||||
BATCH_SIZE = 1000
|
||||
SUB_BATCH_SIZE = 100
|
||||
|
||||
def up
|
||||
queue_batched_background_migration(
|
||||
MIGRATION,
|
||||
:bulk_import_export_batches,
|
||||
:id,
|
||||
:group_id,
|
||||
:bulk_import_exports,
|
||||
:group_id,
|
||||
:export_id,
|
||||
job_interval: DELAY_INTERVAL,
|
||||
batch_size: BATCH_SIZE,
|
||||
sub_batch_size: SUB_BATCH_SIZE
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
delete_batched_background_migration(
|
||||
MIGRATION,
|
||||
:bulk_import_export_batches,
|
||||
:id,
|
||||
[
|
||||
:group_id,
|
||||
:bulk_import_exports,
|
||||
:group_id,
|
||||
:export_id
|
||||
]
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class IndexRequiredCodeOwnersSectionsOnProtectedBranchProjectId < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
disable_ddl_transaction!
|
||||
|
||||
INDEX_NAME = 'index_required_code_owners_sections_on_protected_branch_project'
|
||||
|
||||
def up
|
||||
add_concurrent_index :required_code_owners_sections, :protected_branch_project_id, name: INDEX_NAME
|
||||
end
|
||||
|
||||
def down
|
||||
remove_concurrent_index_by_name :required_code_owners_sections, INDEX_NAME
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddRequiredCodeOwnersSectionsProtectedBranchProjectIdFk < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
add_concurrent_foreign_key :required_code_owners_sections, :projects, column: :protected_branch_project_id,
|
||||
on_delete: :cascade
|
||||
end
|
||||
|
||||
def down
|
||||
with_lock_retries do
|
||||
remove_foreign_key :required_code_owners_sections, column: :protected_branch_project_id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddRequiredCodeOwnersSectionsProtectedBranchProjectIdTrigger < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
|
||||
def up
|
||||
install_sharding_key_assignment_trigger(
|
||||
table: :required_code_owners_sections,
|
||||
sharding_key: :protected_branch_project_id,
|
||||
parent_table: :protected_branches,
|
||||
parent_sharding_key: :project_id,
|
||||
foreign_key: :protected_branch_id
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
remove_sharding_key_assignment_trigger(
|
||||
table: :required_code_owners_sections,
|
||||
sharding_key: :protected_branch_project_id,
|
||||
parent_table: :protected_branches,
|
||||
parent_sharding_key: :project_id,
|
||||
foreign_key: :protected_branch_id
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class QueueBackfillRequiredCodeOwnersSectionsProtectedBranchProjectId < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
restrict_gitlab_migration gitlab_schema: :gitlab_main_cell
|
||||
|
||||
MIGRATION = "BackfillRequiredCodeOwnersSectionsProtectedBranchProjectId"
|
||||
DELAY_INTERVAL = 2.minutes
|
||||
BATCH_SIZE = 1000
|
||||
SUB_BATCH_SIZE = 100
|
||||
|
||||
def up
|
||||
queue_batched_background_migration(
|
||||
MIGRATION,
|
||||
:required_code_owners_sections,
|
||||
:id,
|
||||
:protected_branch_project_id,
|
||||
:protected_branches,
|
||||
:project_id,
|
||||
:protected_branch_id,
|
||||
job_interval: DELAY_INTERVAL,
|
||||
batch_size: BATCH_SIZE,
|
||||
sub_batch_size: SUB_BATCH_SIZE
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
delete_batched_background_migration(
|
||||
MIGRATION,
|
||||
:required_code_owners_sections,
|
||||
:id,
|
||||
[
|
||||
:protected_branch_project_id,
|
||||
:protected_branches,
|
||||
:project_id,
|
||||
:protected_branch_id
|
||||
]
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class IndexRequiredCodeOwnersSectionsOnProtectedBranchNamespaceId < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
disable_ddl_transaction!
|
||||
|
||||
INDEX_NAME = 'index_required_code_owners_sections_on_protected_branch_namespa'
|
||||
|
||||
def up
|
||||
add_concurrent_index :required_code_owners_sections, :protected_branch_namespace_id, name: INDEX_NAME
|
||||
end
|
||||
|
||||
def down
|
||||
remove_concurrent_index_by_name :required_code_owners_sections, INDEX_NAME
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddRequiredCodeOwnersSectionsProtectedBranchNamespaceIdFk < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
add_concurrent_foreign_key :required_code_owners_sections, :namespaces, column: :protected_branch_namespace_id,
|
||||
on_delete: :cascade
|
||||
end
|
||||
|
||||
def down
|
||||
with_lock_retries do
|
||||
remove_foreign_key :required_code_owners_sections, column: :protected_branch_namespace_id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddRequiredCodeOwnersSectionsProtectedBranchNamespaceIdTrigger < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
|
||||
def up
|
||||
install_sharding_key_assignment_trigger(
|
||||
table: :required_code_owners_sections,
|
||||
sharding_key: :protected_branch_namespace_id,
|
||||
parent_table: :protected_branches,
|
||||
parent_sharding_key: :namespace_id,
|
||||
foreign_key: :protected_branch_id
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
remove_sharding_key_assignment_trigger(
|
||||
table: :required_code_owners_sections,
|
||||
sharding_key: :protected_branch_namespace_id,
|
||||
parent_table: :protected_branches,
|
||||
parent_sharding_key: :namespace_id,
|
||||
foreign_key: :protected_branch_id
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class QueueBackfillRequiredCodeOwnersSectionsProtectedBranchNamespaceId < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
restrict_gitlab_migration gitlab_schema: :gitlab_main_cell
|
||||
|
||||
MIGRATION = "BackfillRequiredCodeOwnersSectionsProtectedBranchNamespaceId"
|
||||
DELAY_INTERVAL = 2.minutes
|
||||
BATCH_SIZE = 1000
|
||||
SUB_BATCH_SIZE = 100
|
||||
|
||||
def up
|
||||
queue_batched_background_migration(
|
||||
MIGRATION,
|
||||
:required_code_owners_sections,
|
||||
:id,
|
||||
:protected_branch_namespace_id,
|
||||
:protected_branches,
|
||||
:namespace_id,
|
||||
:protected_branch_id,
|
||||
job_interval: DELAY_INTERVAL,
|
||||
batch_size: BATCH_SIZE,
|
||||
sub_batch_size: SUB_BATCH_SIZE
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
delete_batched_background_migration(
|
||||
MIGRATION,
|
||||
:required_code_owners_sections,
|
||||
:id,
|
||||
[
|
||||
:protected_branch_namespace_id,
|
||||
:protected_branches,
|
||||
:namespace_id,
|
||||
:protected_branch_id
|
||||
]
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class IndexSnippetRepositoryStorageMovesOnSnippetProjectId < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
disable_ddl_transaction!
|
||||
|
||||
INDEX_NAME = 'index_snippet_repository_storage_moves_on_snippet_project_id'
|
||||
|
||||
def up
|
||||
add_concurrent_index :snippet_repository_storage_moves, :snippet_project_id, name: INDEX_NAME
|
||||
end
|
||||
|
||||
def down
|
||||
remove_concurrent_index_by_name :snippet_repository_storage_moves, INDEX_NAME
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddSnippetRepositoryStorageMovesSnippetProjectIdFk < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
add_concurrent_foreign_key :snippet_repository_storage_moves, :projects, column: :snippet_project_id,
|
||||
on_delete: :cascade
|
||||
end
|
||||
|
||||
def down
|
||||
with_lock_retries do
|
||||
remove_foreign_key :snippet_repository_storage_moves, column: :snippet_project_id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddSnippetRepositoryStorageMovesSnippetProjectIdTrigger < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
|
||||
def up
|
||||
install_sharding_key_assignment_trigger(
|
||||
table: :snippet_repository_storage_moves,
|
||||
sharding_key: :snippet_project_id,
|
||||
parent_table: :snippets,
|
||||
parent_sharding_key: :project_id,
|
||||
foreign_key: :snippet_id
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
remove_sharding_key_assignment_trigger(
|
||||
table: :snippet_repository_storage_moves,
|
||||
sharding_key: :snippet_project_id,
|
||||
parent_table: :snippets,
|
||||
parent_sharding_key: :project_id,
|
||||
foreign_key: :snippet_id
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class QueueBackfillSnippetRepositoryStorageMovesSnippetProjectId < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
restrict_gitlab_migration gitlab_schema: :gitlab_main_cell
|
||||
|
||||
MIGRATION = "BackfillSnippetRepositoryStorageMovesSnippetProjectId"
|
||||
DELAY_INTERVAL = 2.minutes
|
||||
BATCH_SIZE = 1000
|
||||
SUB_BATCH_SIZE = 100
|
||||
|
||||
def up
|
||||
queue_batched_background_migration(
|
||||
MIGRATION,
|
||||
:snippet_repository_storage_moves,
|
||||
:id,
|
||||
:snippet_project_id,
|
||||
:snippets,
|
||||
:project_id,
|
||||
:snippet_id,
|
||||
job_interval: DELAY_INTERVAL,
|
||||
batch_size: BATCH_SIZE,
|
||||
sub_batch_size: SUB_BATCH_SIZE
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
delete_batched_background_migration(
|
||||
MIGRATION,
|
||||
:snippet_repository_storage_moves,
|
||||
:id,
|
||||
[
|
||||
:snippet_project_id,
|
||||
:snippets,
|
||||
:project_id,
|
||||
:snippet_id
|
||||
]
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class IndexSnippetRepositoryStorageMovesOnSnippetOrganizationId < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
disable_ddl_transaction!
|
||||
|
||||
INDEX_NAME = 'index_snippet_repository_storage_moves_on_snippet_organization_'
|
||||
|
||||
def up
|
||||
add_concurrent_index :snippet_repository_storage_moves, :snippet_organization_id, name: INDEX_NAME
|
||||
end
|
||||
|
||||
def down
|
||||
remove_concurrent_index_by_name :snippet_repository_storage_moves, INDEX_NAME
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddSnippetRepositoryStorageMovesSnippetOrganizationIdFk < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
add_concurrent_foreign_key :snippet_repository_storage_moves, :organizations, column: :snippet_organization_id,
|
||||
on_delete: :cascade
|
||||
end
|
||||
|
||||
def down
|
||||
with_lock_retries do
|
||||
remove_foreign_key :snippet_repository_storage_moves, column: :snippet_organization_id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddSnippetRepositoryStorageMovesSnippetOrganizationIdTrigger < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
|
||||
def up
|
||||
install_sharding_key_assignment_trigger(
|
||||
table: :snippet_repository_storage_moves,
|
||||
sharding_key: :snippet_organization_id,
|
||||
parent_table: :snippets,
|
||||
parent_sharding_key: :organization_id,
|
||||
foreign_key: :snippet_id
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
remove_sharding_key_assignment_trigger(
|
||||
table: :snippet_repository_storage_moves,
|
||||
sharding_key: :snippet_organization_id,
|
||||
parent_table: :snippets,
|
||||
parent_sharding_key: :organization_id,
|
||||
foreign_key: :snippet_id
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class QueueBackfillSnippetRepositoryStorageMovesSnippetOrganizationId < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.9'
|
||||
restrict_gitlab_migration gitlab_schema: :gitlab_main_cell
|
||||
|
||||
MIGRATION = "BackfillSnippetRepositoryStorageMovesSnippetOrganizationId"
|
||||
DELAY_INTERVAL = 2.minutes
|
||||
BATCH_SIZE = 1000
|
||||
SUB_BATCH_SIZE = 100
|
||||
|
||||
def up
|
||||
queue_batched_background_migration(
|
||||
MIGRATION,
|
||||
:snippet_repository_storage_moves,
|
||||
:id,
|
||||
:snippet_organization_id,
|
||||
:snippets,
|
||||
:organization_id,
|
||||
:snippet_id,
|
||||
job_interval: DELAY_INTERVAL,
|
||||
batch_size: BATCH_SIZE,
|
||||
sub_batch_size: SUB_BATCH_SIZE
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
delete_batched_background_migration(
|
||||
MIGRATION,
|
||||
:snippet_repository_storage_moves,
|
||||
:id,
|
||||
[
|
||||
:snippet_organization_id,
|
||||
:snippets,
|
||||
:organization_id,
|
||||
:snippet_id
|
||||
]
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1 @@
|
|||
69e62d835391a30864604e0f6e7606eee6be11dd9222b8f7a27a091c75f7a48b
|
||||
|
|
@ -0,0 +1 @@
|
|||
b34a3ed26d3334bdc540bbaf24b4f4ca1363e7b298d80563911ba22f70a49ea8
|
||||
|
|
@ -0,0 +1 @@
|
|||
f232c938acc1bc36de7026708242b3d0e37f9b790cf33e04c1aba48f95f1e78a
|
||||
|
|
@ -0,0 +1 @@
|
|||
786144c2e8d07fa235bf42140c8f4c129428005bd1a40d9166d7164076c30069
|
||||
|
|
@ -0,0 +1 @@
|
|||
37bec5959dea60be93a4692ab77d6fc8386654936cb89bf1e41f25a9d8e4fe7d
|
||||
|
|
@ -0,0 +1 @@
|
|||
1fb52aeec6b0d8f6f6a3f4f93665fe6847276b64571cfefe8411d965e42f964c
|
||||
|
|
@ -0,0 +1 @@
|
|||
64c55754411150e58880a106b66fca024b764867af0165150afa7cc63f78c24c
|
||||
|
|
@ -0,0 +1 @@
|
|||
a0e3e2b19c8e56e7efca28f91d23e831b85681714524031898d56d1768a0bceb
|
||||
|
|
@ -0,0 +1 @@
|
|||
cd90fce585b2c6c54653f400e473f831689e1809c143ea22c86df4e3cde85f19
|
||||
|
|
@ -0,0 +1 @@
|
|||
fdfe8d62bedf723dd12481e65cd789b084bc2758d35cd45337edb00aa4f8ed43
|
||||
|
|
@ -0,0 +1 @@
|
|||
afba62ea5f560ea6930004960c18dda1ded59abde09d8c364c8950e87875e464
|
||||
|
|
@ -0,0 +1 @@
|
|||
d30e03f5fe9261870d74212c20a1c88229c6aa1289445991ea7ed5aa1b4313cf
|
||||
|
|
@ -0,0 +1 @@
|
|||
5037c2ad27f62fe904e9c927753dc314f41bcb1a39e239d1ba0cdfd58a5dca41
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue