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
ea40cf76
Commit
ea40cf76
authored
Jun 17, 2021
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move protected runner builds scoping to register job service
parent
1ae7d9ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
app/services/ci/register_job_service.rb
app/services/ci/register_job_service.rb
+4
-0
lib/gitlab/ci/queue/builder.rb
lib/gitlab/ci/queue/builder.rb
+6
-12
No files found.
app/services/ci/register_job_service.rb
View file @
ea40cf76
...
...
@@ -115,6 +115,10 @@ module Ci
end
end
if
runner
.
ref_protected?
builds
=
queue
.
builds_for_protected_runner
(
builds
)
end
# pick builds that does not have other tags than runner's one
builds
=
queue
.
builds_matching_tag_ids
(
builds
,
runner
.
tags
.
ids
)
...
...
lib/gitlab/ci/queue/builder.rb
View file @
ea40cf76
...
...
@@ -57,6 +57,10 @@ module Gitlab
relation
.
queued_before
(
time
)
end
def
builds_for_protected_runner
(
relation
)
relation
.
ref_protected
end
class
BuildsTableStrategy
attr_reader
:runner
,
:common
...
...
@@ -104,13 +108,7 @@ module Gitlab
end
def
new_builds
all_builds
=
::
Ci
::
Build
.
pending
.
unstarted
if
runner
.
ref_protected?
all_builds
.
ref_protected
else
all_builds
end
::
Ci
::
Build
.
pending
.
unstarted
end
private
...
...
@@ -172,11 +170,7 @@ module Gitlab
end
def
new_builds
if
runner
.
ref_protected?
::
Ci
::
PendingBuild
.
ref_protected
else
::
Ci
::
PendingBuild
.
all
end
::
Ci
::
PendingBuild
.
all
end
private
...
...
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