Skip to content

Commit 6c20a11

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 2de5b5b commit 6c20a11

File tree

31 files changed

+237
-155
lines changed

31 files changed

+237
-155
lines changed

.gitlab-ci.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ variables:
218218
BUNDLER_CHECKSUM_VERIFICATION_OPT_IN: "1"
219219
CACHE_CLASSES: "true"
220220
CHECK_PRECOMPILED_ASSETS: "true"
221-
FF_USE_FASTZIP: "true"
222221
RETRY_FAILED_TESTS_IN_NEW_PROCESS: "true"
223222
# Run with decomposed databases by default
224223
DECOMPOSED_DB: "true"
@@ -231,11 +230,6 @@ variables:
231230
REVIEW_APPS_GCP_PROJECT: "gitlab-review-apps"
232231
REVIEW_APPS_GCP_REGION: "us-central1"
233232

234-
CACHE_ASSETS_AS_PACKAGE: "true"
235-
REUSE_FRONTEND_FIXTURES_ENABLED: "true"
236-
BUILD_ASSETS_IMAGE: "true" # Set it to "false" to disable assets image building, used in `build-assets-image`
237-
SIMPLECOV: "true"
238-
239233
REGISTRY_HOST: "registry.gitlab.com"
240234
REGISTRY_GROUP: "gitlab-org"
241235

@@ -250,6 +244,15 @@ variables:
250244
# https://github.com/ruby/ruby/pull/7663 lands in the Ruby interpreter.
251245
NOKOGIRI_LIBXML_MEMORY_MANAGEMENT: default
252246

247+
# CI jobs behavior can be changed by changing the value of these variables in the project's CI/CD variables
248+
AVERAGE_KNAPSACK_REPORT: "true"
249+
ENABLE_DEPSASTER: "true"
250+
ENABLE_DEPSCORE: "true"
251+
CACHE_ASSETS_AS_PACKAGE: "true"
252+
REUSE_FRONTEND_FIXTURES_ENABLED: "true"
253+
BUILD_ASSETS_IMAGE: "true" # Set it to "false" to disable assets image building, used in `build-assets-image`
254+
SIMPLECOV: "true"
255+
253256
include:
254257
- local: .gitlab/ci/_skip.yml
255258
rules:

.gitlab/ci/rules.gitlab-ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -2534,7 +2534,7 @@
25342534

25352535
.static-analysis:rules:trigger-depsaster:
25362536
rules:
2537-
- if: $ENABLE_DEPSASTER != 'true'
2537+
- if: "$ENABLE_DEPSASTER != 'true'"
25382538
when: never
25392539
- <<: *if-fork-merge-request
25402540
when: never
@@ -2565,10 +2565,12 @@
25652565
rules:
25662566
# Requiring $DEPENDENCY_REVIEW_PAT prevents the bot from running on forks or CE
25672567
# Without it the script would fail too.
2568-
- if: $ENABLE_DEPSCORE != 'true'
2568+
- if: "$ENABLE_DEPSCORE != 'true'"
25692569
when: never
25702570
- if: "$DEPENDENCY_REVIEW_PAT == null"
25712571
when: never
2572+
- <<: *if-fork-merge-request
2573+
when: never
25722574
- <<: *if-not-ee
25732575
when: never
25742576
# Run only when the merge request have dependency file modifications

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

+8-5
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ export default {
158158
activeProject: undefined,
159159
hasScannerError: false,
160160
pinnedFileStatus: '',
161+
codequalityData: {},
162+
sastData: {},
161163
};
162164
},
163165
apollo: {
@@ -192,14 +194,11 @@ export default {
192194
}
193195
194196
if (codequalityReportsComparer?.report?.newErrors) {
195-
this.$store.commit(
196-
'diffs/SET_CODEQUALITY_DATA',
197-
sortFindingsByFile(codequalityReportsComparer.report.newErrors),
198-
);
197+
this.codequalityData = sortFindingsByFile(codequalityReportsComparer.report.newErrors);
199198
}
200199
201200
if (sastReport?.report) {
202-
this.$store.commit('diffs/SET_SAST_DATA', sastReport.report);
201+
this.sastData = sastReport.report;
203202
}
204203
},
205204
error() {
@@ -759,6 +758,8 @@ export default {
759758
>
760759
<diff-file
761760
:file="item"
761+
:codequality-data="codequalityData"
762+
:sast-data="sastData"
762763
:reviewed="fileReviews[item.id]"
763764
:is-first-file="index === 0"
764765
:is-last-file="index === diffFilesLength - 1"
@@ -778,6 +779,8 @@ export default {
778779
v-for="(file, index) in diffs"
779780
:key="file.new_path"
780781
:file="file"
782+
:codequality-data="codequalityData"
783+
:sast-data="sastData"
781784
:reviewed="fileReviews[file.id]"
782785
:is-first-file="index === 0"
783786
:is-last-file="index === diffFilesLength - 1"

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

+17-8
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,20 @@ export default {
4747
required: false,
4848
default: '',
4949
},
50+
codequalityData: {
51+
type: Object,
52+
required: false,
53+
default: null,
54+
},
55+
sastData: {
56+
type: Object,
57+
required: false,
58+
default: null,
59+
},
5060
},
5161
computed: {
5262
...mapState('diffs', ['projectPath']),
53-
...mapGetters('diffs', [
54-
'isInlineView',
55-
'getCommentFormForDiffFile',
56-
'diffLines',
57-
'fileLineCodequality',
58-
'fileLineSast',
59-
]),
63+
...mapGetters('diffs', ['isInlineView', 'getCommentFormForDiffFile', 'diffLines']),
6064
...mapGetters(['getNoteableData', 'noteableType', 'getUserData']),
6165
diffMode() {
6266
return getDiffMode(this.diffFile);
@@ -92,7 +96,10 @@ export default {
9296
return this.getUserData;
9397
},
9498
mappedLines() {
95-
return this.diffLines(this.diffFile).map(mapParallel(this)) || [];
99+
return (
100+
this.diffLines(this.diffFile).map(mapParallel(this, this.codequalityData, this.sastData)) ||
101+
[]
102+
);
96103
},
97104
imageDiscussions() {
98105
return this.diffFile.discussions.filter(
@@ -145,6 +152,8 @@ export default {
145152
<template v-if="isTextFile">
146153
<diff-view
147154
:diff-file="diffFile"
155+
:codequality-data="codequalityData"
156+
:sast-data="sastData"
148157
:diff-lines="mappedLines"
149158
:help-page-path="helpPagePath"
150159
:inline="isInlineView"

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

+13-6
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,16 @@ export default {
9090
required: false,
9191
default: true,
9292
},
93+
codequalityData: {
94+
type: Object,
95+
required: false,
96+
default: null,
97+
},
98+
sastData: {
99+
type: Object,
100+
required: false,
101+
default: null,
102+
},
93103
},
94104
idState() {
95105
return {
@@ -104,12 +114,7 @@ export default {
104114
genericError: SOMETHING_WENT_WRONG,
105115
},
106116
computed: {
107-
...mapState('diffs', [
108-
'currentDiffFileId',
109-
'codequalityDiff',
110-
'conflictResolutionPath',
111-
'canMerge',
112-
]),
117+
...mapState('diffs', ['currentDiffFileId', 'conflictResolutionPath', 'canMerge']),
113118
...mapGetters(['isNotesFetched', 'getNoteableData', 'noteableType']),
114119
...mapGetters('diffs', ['getDiffFileDiscussions', 'isVirtualScrollingEnabled', 'pinnedFile']),
115120
isPinnedFile() {
@@ -553,6 +558,8 @@ export default {
553558
<diff-content
554559
v-if="showContent"
555560
:class="hasBodyClasses.content"
561+
:codequality-data="codequalityData"
562+
:sast-data="sastData"
556563
:diff-file="file"
557564
:help-page-path="helpPagePath"
558565
@load-file="requestDiff"

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

+13-9
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ export default {
4545
required: false,
4646
default: false,
4747
},
48+
codequalityData: {
49+
type: Object,
50+
required: false,
51+
default: null,
52+
},
53+
sastData: {
54+
type: Object,
55+
required: false,
56+
default: null,
57+
},
4858
},
4959
idState() {
5060
return {
@@ -54,13 +64,7 @@ export default {
5464
},
5565
computed: {
5666
...mapGetters('diffs', ['commitId', 'fileLineCoverage']),
57-
...mapState('diffs', [
58-
'codequalityDiff',
59-
'sastDiff',
60-
'highlightedRow',
61-
'coverageLoaded',
62-
'selectedCommentPosition',
63-
]),
67+
...mapState('diffs', ['highlightedRow', 'coverageLoaded', 'selectedCommentPosition']),
6468
...mapState({
6569
selectedCommentPosition: ({ notes }) => notes.selectedCommentPosition,
6670
selectedCommentPositionHover: ({ notes }) => notes.selectedCommentPositionHover,
@@ -76,8 +80,8 @@ export default {
7680
},
7781
hasInlineFindingsChanges() {
7882
return (
79-
this.codequalityDiff?.files?.[this.diffFile.file_path]?.length > 0 ||
80-
this.sastDiff?.added?.length > 0
83+
this.codequalityData?.files?.[this.diffFile.file_path]?.length > 0 ||
84+
this.sastData?.added?.length > 0
8185
);
8286
},
8387
},

app/assets/javascripts/diffs/store/getters.js

-10
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,6 @@ export const fileLineCoverage = (state) => (file, line) => {
149149
return {};
150150
};
151151

152-
// This function is overwritten for the inline codequality feature in EE
153-
export const fileLineCodequality = () => () => {
154-
return null;
155-
};
156-
157-
// This function is overwritten for the inline SAST feature in EE
158-
export const fileLineSast = () => () => {
159-
return null;
160-
};
161-
162152
/**
163153
* Returns index of a currently selected diff in diffFiles
164154
* @returns {number}

app/assets/javascripts/diffs/store/modules/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import * as getters from 'ee_else_ce/diffs/store/getters';
2-
import createState from 'ee_else_ce/diffs/store/modules/diff_state';
3-
import mutations from 'ee_else_ce/diffs/store/mutations';
1+
import * as getters from '../getters';
2+
import mutations from '../mutations';
43
import * as actions from '../actions';
4+
import createState from './diff_state';
55

66
export default () => ({
77
namespaced: true,

app/assets/javascripts/ml/model_registry/apps/index_ml_models.vue

+12-17
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { helpPagePath } from '~/helpers/help_page_helper';
66
import * as Sentry from '~/sentry/sentry_browser_wrapper';
77
import EmptyState from '../components/empty_state.vue';
88
import * as i18n from '../translations';
9-
import { BASE_SORT_FIELDS, GRAPHQL_PAGE_SIZE, MODEL_ENTITIES } from '../constants';
9+
import { BASE_SORT_FIELDS, MODEL_ENTITIES } from '../constants';
1010
import ModelRow from '../components/model_row.vue';
1111
import ActionsDropdown from '../components/actions_dropdown.vue';
1212
import getModelsQuery from '../graphql/queries/get_models.query.graphql';
@@ -62,12 +62,17 @@ export default {
6262
error(error) {
6363
this.handleError(error);
6464
},
65+
skip() {
66+
return this.skipQueries;
67+
},
6568
},
6669
},
6770
data() {
6871
return {
6972
models: [],
7073
errorMessage: undefined,
74+
skipQueries: true,
75+
queryVariables: {},
7176
};
7277
},
7378
computed: {
@@ -83,31 +88,21 @@ export default {
8388
isLoading() {
8489
return this.$apollo.queries.models.loading;
8590
},
86-
queryVariables() {
87-
return {
88-
fullPath: this.projectPath,
89-
first: GRAPHQL_PAGE_SIZE,
90-
};
91-
},
9291
},
9392
methods: {
9493
fetchPage(variables) {
95-
const vars = {
96-
...this.queryVariables,
94+
this.queryVariables = {
95+
fullPath: this.projectPath,
9796
...variables,
9897
name: variables.name,
9998
orderBy: variables.orderBy?.toUpperCase() || 'CREATED_AT',
10099
sort: variables.sort?.toUpperCase() || 'DESC',
101100
};
102101
103-
this.$apollo.queries.models
104-
.fetchMore({
105-
variables: vars,
106-
updateQuery: (previousResult, { fetchMoreResult }) => {
107-
return fetchMoreResult;
108-
},
109-
})
110-
.catch(this.handleError);
102+
this.errorMessage = null;
103+
this.skipQueries = false;
104+
105+
this.$apollo.queries.models.fetchMore({});
111106
},
112107
handleError(error) {
113108
this.errorMessage = makeLoadModelErrorMessage(error.message);

app/services/concerns/update_repository_storage_methods.rb

+1-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ def execute
2828

2929
unless same_filesystem?
3030
mirror_repositories
31-
32-
repository_storage_move.transaction do
33-
mirror_object_pool(destination_storage_name)
34-
end
31+
mirror_object_pool(destination_storage_name)
3532
end
3633

3734
repository_storage_move.finish_replication!

app/services/projects/update_repository_storage_service.rb

+8-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,14 @@ def mirror_object_pool(destination_storage_name)
4949
pool_repository: pool_repository
5050
)
5151

52-
Repositories::ReplicateService.new(pool_repository.object_pool.repository)
53-
.execute(target_pool_repository.object_pool.repository, :object_pool)
52+
begin
53+
Repositories::ReplicateService.new(pool_repository.object_pool.repository)
54+
.execute(target_pool_repository.object_pool.repository, :object_pool)
55+
rescue StandardError => e
56+
target_pool_repository.destroy!
57+
58+
raise e
59+
end
5460
end
5561

5662
def remove_old_paths

doc/administration/reference_architectures/10k_users.md

-3
Original file line numberDiff line numberDiff line change
@@ -644,9 +644,6 @@ in the second step, do not supply the `EXTERNAL_URL` value.
644644
patroni['username'] = '<patroni_api_username>'
645645
patroni['password'] = '<patroni_api_password>'
646646

647-
# Replace 10.6.0.0/24 with Network Addresses for your other patroni nodes
648-
patroni['allowlist'] = %w(10.6.0.0/24 127.0.0.1/32)
649-
650647
# Replace 10.6.0.0/24 with Network Address
651648
postgresql['trust_auth_cidr_addresses'] = %w(10.6.0.0/24 127.0.0.1/32)
652649

doc/administration/reference_architectures/25k_users.md

-3
Original file line numberDiff line numberDiff line change
@@ -652,9 +652,6 @@ in the second step, do not supply the `EXTERNAL_URL` value.
652652
patroni['username'] = '<patroni_api_username>'
653653
patroni['password'] = '<patroni_api_password>'
654654

655-
# Replace 10.6.0.0/24 with Network Addresses for your other patroni nodes
656-
patroni['allowlist'] = %w(10.6.0.0/24 127.0.0.1/32)
657-
658655
# Replace 10.6.0.0/24 with Network Address
659656
postgresql['trust_auth_cidr_addresses'] = %w(10.6.0.0/24 127.0.0.1/32)
660657

doc/administration/reference_architectures/3k_users.md

-3
Original file line numberDiff line numberDiff line change
@@ -918,9 +918,6 @@ in the second step, do not supply the `EXTERNAL_URL` value.
918918
patroni['username'] = '<patroni_api_username>'
919919
patroni['password'] = '<patroni_api_password>'
920920

921-
# Replace 10.6.0.0/24 with Network Addresses for your other patroni nodes
922-
patroni['allowlist'] = %w(10.6.0.0/24 127.0.0.1/32)
923-
924921
# Replace 10.6.0.0/24 with Network Address
925922
postgresql['trust_auth_cidr_addresses'] = %w(10.6.0.0/24 127.0.0.1/32)
926923

doc/administration/reference_architectures/50k_users.md

-3
Original file line numberDiff line numberDiff line change
@@ -654,9 +654,6 @@ in the second step, do not supply the `EXTERNAL_URL` value.
654654
patroni['username'] = '<patroni_api_username>'
655655
patroni['password'] = '<patroni_api_password>'
656656

657-
# Replace 10.6.0.0/24 with Network Addresses for your other patroni nodes
658-
patroni['allowlist'] = %w(10.6.0.0/24 127.0.0.1/32)
659-
660657
# Replace 10.6.0.0/24 with Network Address
661658
postgresql['trust_auth_cidr_addresses'] = %w(10.6.0.0/24 127.0.0.1/32)
662659

0 commit comments

Comments
 (0)