Skip to content

Commit 7a8b152

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent c702311 commit 7a8b152

File tree

37 files changed

+397
-99
lines changed

37 files changed

+397
-99
lines changed

.gitlab-ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ variables:
228228
RETRY_FAILED_TESTS_IN_NEW_PROCESS: "true"
229229
# Run with decomposed databases by default
230230
DECOMPOSED_DB: "true"
231+
SEC_DECOMPOSED_DB: "false"
231232

232233
DOCS_REVIEW_APPS_DOMAIN: "docs.gitlab-review.app"
233234
DOCS_GITLAB_REPO_SUFFIX: "ee"

.gitlab/ci/database.gitlab-ci.yml

+30
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,36 @@ db:backup_and_restore single-db-ci-connection:
3131
- .single-db-ci-connection
3232
- .rails:rules:db-backup
3333

34+
db:rollback single-db-sec-connection:
35+
extends:
36+
- db:rollback
37+
- .single-db-sec-connection
38+
- .rails:rules:single-db-sec-connection
39+
40+
db:migrate:reset single-db-sec-connection:
41+
extends:
42+
- db:migrate:reset
43+
- .single-db-sec-connection
44+
- .rails:rules:single-db-sec-connection
45+
46+
db:check-schema-single-db-sec-connection:
47+
extends:
48+
- db:check-schema
49+
- .single-db-sec-connection
50+
- .rails:rules:single-db-sec-connection
51+
52+
db:post_deployment_migrations_validator-single-db-sec-connection:
53+
extends:
54+
- db:post_deployment_migrations_validator
55+
- .single-db-sec-connection
56+
- .rails:rules:db:check-migrations-single-db-sec-connection
57+
58+
db:backup_and_restore single-db-sec-connection:
59+
extends:
60+
- db:backup_and_restore
61+
- .single-db-sec-connection
62+
- .rails:rules:db-backup
63+
3464
db:rollback:
3565
extends:
3666
- .db-job-base

.gitlab/ci/rails.gitlab-ci.yml

+56
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,13 @@ rspec unit pg14 single-db-ci-connection:
195195
- .rspec-unit-parallel
196196
- .rails:rules:single-db-ci-connection
197197

198+
rspec unit pg14 single-db-sec-connection:
199+
extends:
200+
- rspec unit pg14
201+
- .single-db-sec-connection-rspec
202+
- .rspec-unit-parallel
203+
- .rails:rules:single-db-sec-connection
204+
198205
rspec unit pg14 praefect:
199206
extends:
200207
- rspec unit pg14
@@ -229,6 +236,13 @@ rspec integration pg14 single-db-ci-connection:
229236
- .rspec-integration-parallel
230237
- .rails:rules:single-db-ci-connection
231238

239+
rspec integration pg14 single-db-sec-connection:
240+
extends:
241+
- rspec integration pg14
242+
- .single-db-sec-connection-rspec
243+
- .rspec-integration-parallel
244+
- .rails:rules:single-db-sec-connection
245+
232246
rspec integration pg14 praefect:
233247
extends:
234248
- rspec integration pg14
@@ -265,6 +279,15 @@ rspec system pg14 single-db-ci-connection:
265279
- .rspec-system-parallel
266280
- .rails:rules:single-db-ci-connection
267281

282+
- .rails:rules:single-db
283+
284+
rspec system pg14 single-db-sec-connection:
285+
extends:
286+
- rspec system pg14
287+
- .single-db-sec-connection-rspec
288+
- .rspec-system-parallel
289+
- .rails:rules:single-db-sec-connection
290+
268291
rspec system pg14 praefect:
269292
extends:
270293
- rspec system pg14
@@ -818,6 +841,18 @@ rspec-ee background_migration pg14 single-db-ci-connection:
818841
- .single-db-ci-connection-rspec
819842
- .rails:rules:single-db-ci-connection-ee
820843

844+
rspec-ee migration pg14 single-db-sec-connection:
845+
extends:
846+
- rspec-ee migration pg14
847+
- .single-db-sec-connection-rspec
848+
- .rails:rules:single-db-sec-connection-ee
849+
850+
rspec-ee background_migration pg14 single-db-sec-connection:
851+
extends:
852+
- rspec-ee background_migration pg14
853+
- .single-db-sec-connection-rspec
854+
- .rails:rules:single-db-sec-connection-ee
855+
821856
rspec-ee migration pg14 praefect:
822857
extends:
823858
- rspec migration pg14
@@ -864,6 +899,13 @@ rspec-ee unit pg14 single-db-ci-connection:
864899
- .rspec-ee-unit-parallel
865900
- .rails:rules:single-db-ci-connection-ee
866901

902+
rspec-ee unit pg14 single-db-sec-connection:
903+
extends:
904+
- rspec-ee unit pg14
905+
- .single-db-sec-connection-rspec
906+
- .rspec-ee-unit-parallel
907+
- .rails:rules:single-db-sec-connection-ee
908+
867909
rspec-ee integration pg14:
868910
extends:
869911
- .rspec-ee-base-pg14
@@ -896,6 +938,13 @@ rspec-ee integration pg14 single-db-ci-connection:
896938
- .rspec-ee-integration-parallel
897939
- .rails:rules:single-db-ci-connection-ee
898940

941+
rspec-ee integration pg14 single-db-sec-connection:
942+
extends:
943+
- rspec-ee integration pg14
944+
- .single-db-sec-connection-rspec
945+
- .rspec-ee-integration-parallel
946+
- .rails:rules:single-db-sec-connection-ee
947+
899948
.custom-models-variables:
900949
variables:
901950
AIGW_CUSTOM_MODELS__ENABLED: true
@@ -943,6 +992,13 @@ rspec-ee system pg14 single-db-ci-connection:
943992
- .rspec-ee-system-parallel
944993
- .rails:rules:single-db-ci-connection-ee
945994

995+
rspec-ee system pg14 single-db-sec-connection:
996+
extends:
997+
- rspec-ee system pg14
998+
- .single-db-sec-connection-rspec
999+
- .rspec-ee-system-parallel
1000+
- .rails:rules:single-db-sec-connection-ee
1001+
9461002
# EE: default refs (MRs, default branch, schedules) jobs #
9471003
##################################################
9481004

.gitlab/ci/rails/shared.gitlab-ci.yml

+8
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,20 @@ include:
4242
variables:
4343
CI_CONNECTION_DB: "true"
4444

45+
.single-db-sec-connection:
46+
extends: .single-db
47+
variables:
48+
SEC_CONNECTION_DB: "true"
49+
4550
.single-db-rspec:
4651
extends: .single-db
4752

4853
.single-db-ci-connection-rspec:
4954
extends: .single-db-ci-connection
5055

56+
.single-db-sec-connection-rspec:
57+
extends: .single-db-sec-connection
58+
5159
.praefect-with-db:
5260
variables:
5361
GITALY_PRAEFECT_WITH_DB: '1'

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

+27
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@
111111
.if-merge-request-labels-run-single-db: &if-merge-request-labels-run-single-db
112112
if: '($CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_EVENT_TYPE != "merge_train") && $CI_MERGE_REQUEST_LABELS =~ /pipeline:run-single-db/'
113113

114+
.if-merge-request-labels-sec-decomposition: &if-merge-request-labels-sec-decomposition
115+
if: '($CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_EVENT_TYPE != "merge_train") && $CI_MERGE_REQUEST_LABELS =~ /sec-decomposition/'
116+
114117
.if-merge-request-labels-run-review-app: &if-merge-request-labels-run-review-app
115118
if: '($CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_EVENT_TYPE != "merge_train") && $CI_MERGE_REQUEST_LABELS =~ /pipeline:run-review-app/'
116119

@@ -1963,6 +1966,30 @@
19631966
- <<: *if-merge-request
19641967
changes: *decomposed-db-models-patterns
19651968

1969+
.rails:rules:single-db-sec-connection:
1970+
rules:
1971+
- <<: *if-default-branch-schedule-nightly
1972+
- <<: *if-merge-request-labels-run-single-db
1973+
- <<: *if-merge-request-labels-sec-decomposition
1974+
- <<: *if-merge-request-labels-pipeline-expedite
1975+
when: never
1976+
- if: '$ENABLE_RSPEC_SINGLE_DB_SEC_CONNECTION == "true"'
1977+
- <<: *if-merge-request-not-approved
1978+
when: never
1979+
1980+
.rails:rules:single-db-sec-connection-ee:
1981+
rules:
1982+
- <<: *if-not-ee
1983+
when: never
1984+
- !reference [".rails:rules:single-db-sec-connection", "rules"]
1985+
1986+
.rails:rules:db:check-migrations-single-db-sec-connection:
1987+
rules:
1988+
- <<: *if-merge-request-labels-run-single-db
1989+
- <<: *if-merge-request-labels-sec-decomposition
1990+
- <<: *if-merge-request-labels-pipeline-expedite
1991+
when: never
1992+
19661993
.rails:rules:db:migrate:multi-version-upgrade:
19671994
rules:
19681995
- if: '$DISABLE_DB_MULTI_VERSION_UPGRADE =~ /true|yes|1/i'

.rubocop_todo/gitlab/bounded_contexts.yml

-1
Original file line numberDiff line numberDiff line change
@@ -2907,7 +2907,6 @@ Gitlab/BoundedContexts:
29072907
- 'ee/app/models/elastic/index_setting.rb'
29082908
- 'ee/app/models/elastic/migration_record.rb'
29092909
- 'ee/app/models/elastic/reindexing_slice.rb'
2910-
- 'ee/app/models/elastic/reindexing_task.rb'
29112910
- 'ee/app/models/elasticsearch_indexed_namespace.rb'
29122911
- 'ee/app/models/elasticsearch_indexed_project.rb'
29132912
- 'ee/app/models/embedding/application_record.rb'

.rubocop_todo/search/namespaced_class.yml

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Search/NamespacedClass:
3131
- 'ee/app/models/elastic/index_setting.rb'
3232
- 'ee/app/models/elastic/migration_record.rb'
3333
- 'ee/app/models/elastic/reindexing_slice.rb'
34-
- 'ee/app/models/elastic/reindexing_task.rb'
3534
- 'ee/app/models/elasticsearch_indexed_namespace.rb'
3635
- 'ee/app/models/elasticsearch_indexed_project.rb'
3736
- 'ee/app/presenters/ee/search_service_presenter.rb'

.rubocop_todo/style/class_and_module_children.yml

-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,6 @@ Style/ClassAndModuleChildren:
421421
- 'ee/app/models/dast/profile_schedule.rb'
422422
- 'ee/app/models/ee/ci/job_artifact.rb'
423423
- 'ee/app/models/elastic/reindexing_slice.rb'
424-
- 'ee/app/models/elastic/reindexing_task.rb'
425424
- 'ee/app/models/epic/metrics.rb'
426425
- 'ee/app/models/epic/related_epic_link.rb'
427426
- 'ee/app/models/geo/base_registry.rb'

.rubocop_todo/style/combinable_loops.yml

-10
This file was deleted.

app/graphql/types/ml/model_version_type.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ModelVersionType < ::Types::BaseObject
1616

1717
field :created_at, Types::TimeType, null: false, description: 'Date of creation.'
1818

19-
field :author, ::Types::UserType, null: false, description: 'User that created the model version.'
19+
field :author, ::Types::UserType, null: true, description: 'User that created the model version.'
2020

2121
field :description, ::GraphQL::Types::String,
2222
null: true,

app/presenters/ml/model_version_presenter.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def display_name
1111
end
1212

1313
def author
14-
model_version.package.creator
14+
model_version.package&.creator
1515
end
1616

1717
def path

0 commit comments

Comments
 (0)