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
5c48b88c
Commit
5c48b88c
authored
May 20, 2021
by
Marius Bobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Look for active and online runners when loading the matchers
Look for active and online runners when loading the matchers
parent
3168331b
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
22 additions
and
15 deletions
+22
-15
app/services/ci/pipeline_creation/drop_not_runnable_builds_service.rb
.../ci/pipeline_creation/drop_not_runnable_builds_service.rb
+2
-0
ee/spec/features/merge_trains/two_merge_requests_on_train_spec.rb
...features/merge_trains/two_merge_requests_on_train_spec.rb
+1
-1
ee/spec/features/merge_trains/user_adds_merge_request_to_merge_train_spec.rb
...rge_trains/user_adds_merge_request_to_merge_train_spec.rb
+1
-1
ee/spec/services/ci/create_pipeline_service/needs_spec.rb
ee/spec/services/ci/create_pipeline_service/needs_spec.rb
+1
-1
ee/spec/services/ci/pipeline_creation/drop_not_runnable_builds_service_spec.rb
...ipeline_creation/drop_not_runnable_builds_service_spec.rb
+1
-0
ee/spec/services/ci/process_pipeline_service_spec.rb
ee/spec/services/ci/process_pipeline_service_spec.rb
+1
-1
spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb
...s/merge_request/user_sees_merge_request_pipelines_spec.rb
+1
-1
spec/lib/gitlab/ci/build/auto_retry_spec.rb
spec/lib/gitlab/ci/build/auto_retry_spec.rb
+1
-1
spec/services/ci/create_pipeline_service/cross_project_pipeline_spec.rb
...ci/create_pipeline_service/cross_project_pipeline_spec.rb
+1
-1
spec/services/ci/create_pipeline_service/needs_spec.rb
spec/services/ci/create_pipeline_service/needs_spec.rb
+1
-1
spec/services/ci/create_pipeline_service_spec.rb
spec/services/ci/create_pipeline_service_spec.rb
+1
-1
spec/services/ci/pipeline_creation/drop_not_runnable_builds_service_spec.rb
...ipeline_creation/drop_not_runnable_builds_service_spec.rb
+7
-3
spec/services/ci/pipeline_processing/shared_processing_service.rb
...vices/ci/pipeline_processing/shared_processing_service.rb
+1
-1
spec/services/ci/pipeline_processing/shared_processing_service_tests_with_yaml.rb
...e_processing/shared_processing_service_tests_with_yaml.rb
+1
-1
spec/workers/ci/initial_pipeline_process_worker_spec.rb
spec/workers/ci/initial_pipeline_process_worker_spec.rb
+1
-1
No files found.
app/services/ci/pipeline_creation/drop_not_runnable_builds_service.rb
View file @
5c48b88c
...
...
@@ -30,6 +30,8 @@ module Ci
def
load_runners
@instance_runners
,
@private_runners
=
project
.
all_runners
.
active
.
online
.
runner_matchers
.
partition
(
&
:instance_type?
)
end
...
...
ee/spec/features/merge_trains/two_merge_requests_on_train_spec.rb
View file @
5c48b88c
...
...
@@ -8,7 +8,7 @@ RSpec.describe 'Two merge requests on a merge train' do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:maintainer_1
)
{
create
(
:user
)
}
let_it_be
(
:maintainer_2
)
{
create
(
:user
)
}
let_it_be
(
:runner
)
{
create
(
:ci_runner
)
}
let_it_be
(
:runner
)
{
create
(
:ci_runner
,
:online
)
}
let
(
:merge_request_1
)
do
create
(
:merge_request
,
...
...
ee/spec/features/merge_trains/user_adds_merge_request_to_merge_train_spec.rb
View file @
5c48b88c
...
...
@@ -64,7 +64,7 @@ RSpec.describe 'User adds a merge request to a merge train', :js do
end
context
'when pipeline for merge train succeeds'
,
:sidekiq_might_not_need_inline
do
let_it_be
(
:runner
)
{
create
(
:ci_runner
)
}
let_it_be
(
:runner
)
{
create
(
:ci_runner
,
:online
)
}
before
do
visit
project_merge_request_path
(
project
,
merge_request
)
...
...
ee/spec/services/ci/create_pipeline_service/needs_spec.rb
View file @
5c48b88c
...
...
@@ -75,7 +75,7 @@ RSpec.describe Ci::CreatePipelineService do
end
it
'creates a pipeline with regular_job and bridge_dag_job pending'
do
create
(
:ci_runner
)
create
(
:ci_runner
,
:online
)
pipeline
=
create_pipeline!
processables
=
pipeline
.
processables
Ci
::
InitialPipelineProcessWorker
.
new
.
perform
(
pipeline
.
id
)
...
...
ee/spec/services/ci/pipeline_creation/drop_not_runnable_builds_service_spec.rb
View file @
5c48b88c
...
...
@@ -13,6 +13,7 @@ RSpec.describe Ci::PipelineCreation::DropNotRunnableBuildsService do
let_it_be
(
:instance_runner
)
do
create
(
:ci_runner
,
:online
,
runner_type: :instance_type
,
public_projects_minutes_cost_factor:
0
,
private_projects_minutes_cost_factor:
1
)
...
...
ee/spec/services/ci/process_pipeline_service_spec.rb
View file @
5c48b88c
...
...
@@ -31,7 +31,7 @@ RSpec.describe Ci::ProcessPipelineService, '#execute' do
context
'when there is a runner available'
do
let_it_be
(
:runner
)
do
create
(
:ci_runner
,
tag_list:
%w[ruby postgres mysql]
)
create
(
:ci_runner
,
:online
,
tag_list:
%w[ruby postgres mysql]
)
end
it
'creates a downstream cross-project pipeline'
do
...
...
spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb
View file @
5c48b88c
...
...
@@ -25,7 +25,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request',
}
end
let_it_be
(
:runner
)
{
create
(
:ci_runner
)
}
let_it_be
(
:runner
)
{
create
(
:ci_runner
,
:online
)
}
before
do
stub_application_setting
(
auto_devops_enabled:
false
)
...
...
spec/lib/gitlab/ci/build/auto_retry_spec.rb
View file @
5c48b88c
...
...
@@ -8,7 +8,7 @@ RSpec.describe Gitlab::Ci::Build::AutoRetry do
describe
'#allowed?'
do
using
RSpec
::
Parameterized
::
TableSyntax
let
(
:build
)
{
build_stubbed
(
:ci_build
)
}
let
(
:build
)
{
create
(
:ci_build
)
}
subject
{
auto_retry
.
allowed?
}
...
...
spec/services/ci/create_pipeline_service/cross_project_pipeline_spec.rb
View file @
5c48b88c
...
...
@@ -53,7 +53,7 @@ RSpec.describe Ci::CreatePipelineService, '#execute' do
end
context
'when sidekiq processes the job'
,
:sidekiq_inline
do
let_it_be
(
:runner
)
{
create
(
:ci_runner
)
}
let_it_be
(
:runner
)
{
create
(
:ci_runner
,
:online
)
}
it
'transitions to pending status and triggers a downstream pipeline'
do
pipeline
=
create_pipeline!
...
...
spec/services/ci/create_pipeline_service/needs_spec.rb
View file @
5c48b88c
...
...
@@ -204,7 +204,7 @@ RSpec.describe Ci::CreatePipelineService do
context
'when there are runners matching the builds'
do
before
do
create
(
:ci_runner
)
create
(
:ci_runner
,
:online
)
end
it
'creates a pipeline with build_a and test_b pending; deploy_b manual'
,
:sidekiq_inline
do
...
...
spec/services/ci/create_pipeline_service_spec.rb
View file @
5c48b88c
...
...
@@ -7,7 +7,7 @@ RSpec.describe Ci::CreatePipelineService do
let_it_be
(
:project
,
reload:
true
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:user
,
reload:
true
)
{
project
.
owner
}
let_it_be
(
:runner
)
{
create
(
:ci_runner
,
tag_list:
%w[postgres mysql ruby]
)
}
let_it_be
(
:runner
)
{
create
(
:ci_runner
,
:online
,
tag_list:
%w[postgres mysql ruby]
)
}
let
(
:ref_name
)
{
'refs/heads/master'
}
...
...
spec/services/ci/pipeline_creation/drop_not_runnable_builds_service_spec.rb
View file @
5c48b88c
...
...
@@ -38,6 +38,10 @@ RSpec.describe Ci::PipelineCreation::DropNotRunnableBuildsService do
end
context
'when there are no runners available'
do
let_it_be
(
:offline_project_runner
)
do
create
(
:ci_runner
,
runner_type: :project_type
,
projects:
[
project
])
end
it
'drops the job'
do
execute
job
.
reload
...
...
@@ -49,7 +53,7 @@ RSpec.describe Ci::PipelineCreation::DropNotRunnableBuildsService do
context
'with project runners'
do
let_it_be
(
:project_runner
)
do
create
(
:ci_runner
,
runner_type: :project_type
,
projects:
[
project
])
create
(
:ci_runner
,
:online
,
runner_type: :project_type
,
projects:
[
project
])
end
it
'does not drop the jobs'
do
...
...
@@ -59,7 +63,7 @@ RSpec.describe Ci::PipelineCreation::DropNotRunnableBuildsService do
context
'with group runners'
do
let_it_be
(
:group_runner
)
do
create
(
:ci_runner
,
runner_type: :group_type
,
groups:
[
group
])
create
(
:ci_runner
,
:online
,
runner_type: :group_type
,
groups:
[
group
])
end
it
'does not drop the jobs'
do
...
...
@@ -69,7 +73,7 @@ RSpec.describe Ci::PipelineCreation::DropNotRunnableBuildsService do
context
'with instance runners'
do
let_it_be
(
:instance_runner
)
do
create
(
:ci_runner
,
runner_type: :instance_type
)
create
(
:ci_runner
,
:online
,
runner_type: :instance_type
)
end
it
'does not drop the jobs'
do
...
...
spec/services/ci/pipeline_processing/shared_processing_service.rb
View file @
5c48b88c
...
...
@@ -859,7 +859,7 @@ RSpec.shared_examples 'Pipeline Processing Service' do
end
context
'when a bridge job has parallel:matrix config'
,
:sidekiq_inline
do
let_it_be
(
:runner
)
{
create
(
:ci_runner
)
}
let_it_be
(
:runner
)
{
create
(
:ci_runner
,
:online
)
}
let
(
:parent_config
)
do
<<-
EOY
...
...
spec/services/ci/pipeline_processing/shared_processing_service_tests_with_yaml.rb
View file @
5c48b88c
...
...
@@ -3,7 +3,7 @@
RSpec
.
shared_context
'Pipeline Processing Service Tests With Yaml'
do
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:user
)
{
project
.
owner
}
let_it_be
(
:runner
)
{
create
(
:ci_runner
)
}
let_it_be
(
:runner
)
{
create
(
:ci_runner
,
:online
)
}
where
(
:test_file_path
)
do
Dir
.
glob
(
Rails
.
root
.
join
(
'spec/services/ci/pipeline_processing/test_cases/*.yml'
))
...
...
spec/workers/ci/initial_pipeline_process_worker_spec.rb
View file @
5c48b88c
...
...
@@ -13,7 +13,7 @@ RSpec.describe Ci::InitialPipelineProcessWorker do
context
'when there are runners available'
do
before
do
create
(
:ci_runner
)
create
(
:ci_runner
,
:online
)
end
it
'marks the pipeline as pending'
do
...
...
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