Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9704f753
Commit
9704f753
authored
Sep 20, 2021
by
Adam Hegyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid 2PC when creating ci_builds
Avoid 2PC when creating ci_builds
parent
9c60a1fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
spec/factories/ci/pipelines.rb
spec/factories/ci/pipelines.rb
+1
-0
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+6
-0
No files found.
spec/factories/ci/pipelines.rb
View file @
9704f753
...
...
@@ -48,6 +48,7 @@ FactoryBot.define do
transient
{
ci_ref_presence
{
true
}
}
before
(
:create
)
do
|
pipeline
,
evaluator
|
pipeline
.
ensure_project_iid!
pipeline
.
ensure_ci_ref!
if
evaluator
.
ci_ref_presence
&&
pipeline
.
ci_ref_id
.
nil?
end
...
...
spec/models/ci/build_spec.rb
View file @
9704f753
...
...
@@ -5289,4 +5289,10 @@ RSpec.describe Ci::Build do
expect
(
build
.
reload
.
queuing_entry
).
not_to
be_present
end
end
it
'does not generate cross DB queries when a record is created via FactoryBot'
do
with_cross_database_modification_prevented
do
create
(
:ci_build
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment