Scheduler failed to assign the Job to the Runner when using coverage_report
Summary
The scheduler failed to assign job to the runner
Steps to reproduce
Example Project
What is the current bug behavior?
The scheduler fails to assign the job to the runner
What is the expected correct behavior?
The job is correctly assigned to the runner
Relevant logs and/or screenshots
Partial CI Config
Taken from https://docs.gitlab.com/ee/user/project/merge_requests/test_coverage_visualization.html#gradle-example and slightly modified:
- needs Job name changed
- cobertura report exchanged with the newer coverage_report
- rules changed to fit the workflow
coverage-gradle:
stage: test
needs:
- test-gradle
image: registry.gitlab.com/haynes/jacoco2cobertura:1.0.7
script:
- python /opt/cover2cover.py build/jacoco/jacoco.xml $CI_PROJECT_DIR/src/main/java/ > build/cobertura.xml
artifacts:
when: always
reports:
coverage_report:
coverage_format: cobertura
path: build/cobertura.xml
rules:
- if: $NAB_DISABLE_COVERAGE
when: never
- when: always
Raw
{
"severity":"ERROR",
"time":"2022-03-28T18:21:18.343Z",
"correlation_id":"01FZ8W5HSCA0V6EFBBG2NG4EGZ",
"exception.class":"KeyError",
"exception.message":"key not found: :coverage_report",
"exception.backtrace":["app/presenters/ci/build_runner_presenter.rb:90:in `fetch'","app/presenters/ci/build_runner_presenter.rb:90:in `block in create_reports'","app/presenters/ci/build_runner_presenter.rb:87:in `each'","app/presenters/ci/build_runner_presenter.rb:87:in `map'","app/presenters/ci/build_runner_presenter.rb:87:in `create_reports'","app/presenters/ci/build_runner_presenter.rb:15:in `artifacts'","app/services/ci/register_job_service.rb:213:in `present_build!'","app/services/ci/register_job_service.rb:173:in `process_build'","app/services/ci/register_job_service.rb:82:in `block in process_queue'","app/services/ci/register_job_service.rb:140:in `block in each_build'","app/services/ci/register_job_service.rb:140:in `each'","app/services/ci/register_job_service.rb:140:in `each_build'","app/services/ci/register_job_service.rb:55:in `process_queue'","app/services/ci/register_job_service.rb:31:in `block in execute'","lib/gitlab/ci/queue/metrics.rb:97:in `observe_queue_time'","app/services/ci/register_job_service.rb:30:in `execute'","lib/api/ci/runner.rb:151:in `block (2 levels) in \u003cclass:Runner\u003e'","ee/lib/gitlab/middleware/ip_restrictor.rb:14:in `block in call'","ee/lib/gitlab/ip_address_state.rb:10:in `with'","ee/lib/gitlab/middleware/ip_restrictor.rb:13:in `call'","lib/api/api_guard.rb:213:in `call'","lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in `call'","lib/gitlab/middleware/rails_queue_duration.rb:33:in `call'","lib/gitlab/middleware/memory_report.rb:13:in `call'","lib/gitlab/middleware/speedscope.rb:13:in `call'","lib/gitlab/request_profiler/middleware.rb:17:in `call'","lib/gitlab/database/load_balancing/rack_middleware.rb:23:in `call'","lib/gitlab/metrics/rack_middleware.rb:16:in `block in call'","lib/gitlab/metrics/web_transaction.rb:46:in `run'","lib/gitlab/metrics/rack_middleware.rb:16:in `call'","lib/gitlab/jira/middleware.rb:19:in `call'","lib/gitlab/middleware/go.rb:20:in `call'","lib/gitlab/etag_caching/middleware.rb:21:in `call'","lib/gitlab/middleware/query_analyzer.rb:11:in `block in call'","lib/gitlab/database/query_analyzer.rb:46:in `within'","lib/gitlab/middleware/query_analyzer.rb:11:in `call'","lib/gitlab/middleware/multipart.rb:173:in `call'","lib/gitlab/middleware/read_only/controller.rb:50:in `call'","lib/gitlab/middleware/read_only.rb:18:in `call'","lib/gitlab/middleware/same_site_cookies.rb:27:in `call'","lib/gitlab/middleware/handle_malformed_strings.rb:21:in `call'","lib/gitlab/middleware/basic_health_check.rb:25:in `call'","lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call'","lib/gitlab/middleware/request_context.rb:21:in `call'","lib/gitlab/middleware/webhook_recursion_detection.rb:15:in `call'","config/initializers/fix_local_cache_middleware.rb:11:in `call'","lib/gitlab/middleware/compressed_json.rb:26:in `call'","lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in `call'","lib/gitlab/middleware/sidekiq_web_static.rb:20:in `call'","lib/gitlab/metrics/requests_rack_middleware.rb:77:in `call'","lib/gitlab/middleware/release_env.rb:13:in `call'"],
"user.username":null,
"tags.program":"web",
"tags.locale":"en",
"tags.feature_category":"continuous_integration",
"tags.correlation_id":"01FZ8W5HSCA0V6EFBBG2NG4EGZ",
"extra.build_id":19858,
"extra.build_name":"coverage-gradle",
"extra.build_stage":"test",
"extra.pipeline_id":6058,
"extra.project_id":54
}
Parsed from Grafana Loki
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 10 Proxy: no Current User: git Using RVM: no Ruby Version: 2.7.5p203 Gem Version: 3.1.4 Bundler Version:2.2.33 Rake Version: 13.0.6 Redis Version: 6.2.6 Sidekiq Version:6.4.0 Go Version: unknown GitLab information Version: 14.9.1-ee Revision: 999a4a9a0bc Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 12.7 URL: https://host HTTP Clone URL: https://host/some-group/some-project.git SSH Clone URL: git@host:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 13.24.0 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 13.24.0 ? ... OK (13.24.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes (cluster/worker) ... 1/1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Checking Reply by email ...
IMAP server credentials are correct? ... Checking Checking yes Mailroom enabled? ... skipped MailRoom running? ... skipped
Checking Reply by email ... Finished
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Systemd unit files or init script exist? ... skipped (omnibus-gitlab has neither init script nor systemd units) Systemd unit files or init script up-to-date? ... skipped (omnibus-gitlab has neither init script nor systemd units) Projects have namespace: ... 2/1 ... yes 57/3 ... yes 7/4 ... yes 55/5 ... yes 57/6 ... yes 61/7 ... yes 55/8 ... yes 8/9 ... yes 22/10 ... yes 8/11 ... yes 7/12 ... yes 28/13 ... yes 55/15 ... yes 31/16 ... yes 33/17 ... yes 33/18 ... yes 33/19 ... yes 33/20 ... yes 57/21 ... yes 8/22 ... yes 33/23 ... yes 55/24 ... yes 50/25 ... yes 44/26 ... yes 10/27 ... yes 62/28 ... yes 10/30 ... yes 50/31 ... yes 50/32 ... yes 50/34 ... yes 50/35 ... yes 54/36 ... yes 55/39 ... yes 61/45 ... yes 58/48 ... yes 59/49 ... yes 59/50 ... yes 59/51 ... yes 59/52 ... yes 50/53 ... yes 55/54 ... yes 69/56 ... yes 50/57 ... yes 6/58 ... yes 57/59 ... yes 81/60 ... yes 62/61 ... yes 28/63 ... yes 28/64 ... yes 28/65 ... yes 28/66 ... yes 28/67 ... yes 102/68 ... yes 88/69 ... yes Redis version >= 5.0.0? ... yes Ruby version >= 2.7.2 ? ... yes (2.7.5) Git user has default SSH configuration? ... yes Active users: ... 20 Is authorized keys file accessible? ... skipped (authorized keys not enabled) GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Elasticsearch version 7.x (6.4 - 6.x deprecated to be removed in 13.8)? ... skipped (elasticsearch is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished