The scheduler failed to assign job to the runner // undefined method `truncate' for nil:NilClass
Summary
CI/CD job is failing to run when commit is tagged to a release.
The following backtrace is seen from sidekiq:
"json.exception.message.keyword": [
"undefined method `truncate' for nil:NilClass"
],
"json.exception.backtrace.keyword": [
"lib/gitlab/ci/variables/builder/release.rb:24:in `block (2 levels) in variables'",
"lib/gitlab/ci/variables/builder/release.rb:20:in `tap'",
"lib/gitlab/ci/variables/builder/release.rb:20:in `block in variables'",
"lib/gitlab/utils/strong_memoize.rb:44:in `strong_memoize'",
"lib/gitlab/ci/variables/builder/release.rb:19:in `variables'",
"lib/gitlab/ci/variables/builder.rb:113:in `block in release_variables'",
"lib/gitlab/utils/strong_memoize.rb:44:in `strong_memoize'",
"lib/gitlab/ci/variables/builder.rb:112:in `release_variables'",
"lib/gitlab/ci/variables/builder.rb:32:in `block in scoped_variables'",
"lib/gitlab/ci/variables/builder.rb:18:in `tap'",
"lib/gitlab/ci/variables/builder.rb:18:in `scoped_variables'",
"app/models/concerns/ci/contextable.rb:16:in `block in scoped_variables'",
"app/models/concerns/ci/contextable.rb:22:in `track_duration'",
"app/models/concerns/ci/contextable.rb:13:in `scoped_variables'",
"app/models/ci/build.rb:577:in `block in variables'",
"lib/gitlab/utils/strong_memoize.rb:44:in `strong_memoize'",
"app/models/ci/build.rb:572:in `variables'",
"ee/app/models/ee/ci/build.rb:77:in `block in variables'",
"lib/gitlab/utils/strong_memoize.rb:44:in `strong_memoize'",
"ee/app/models/ee/ci/build.rb:76:in `variables'",
"app/presenters/ci/build_runner_presenter.rb:140:in `block in git_depth_variable'",
"lib/gitlab/utils/strong_memoize.rb:44:in `strong_memoize'",
"app/presenters/ci/build_runner_presenter.rb:139:in `git_depth_variable'",
"app/presenters/ci/build_runner_presenter.rb:28:in `git_depth'",
"app/presenters/ci/build_runner_presenter.rb:44:in `refspecs'",
"app/services/ci/register_job_service.rb:229:in `present_build!'",
"app/services/ci/register_job_service.rb:185:in `process_build'",
"app/services/ci/register_job_service.rb:84:in `block in process_queue'",
"app/services/ci/register_job_service.rb:142:in `block in each_build'",
"app/services/ci/register_job_service.rb:142:in `each'",
"app/services/ci/register_job_service.rb:142:in `each_build'",
"app/services/ci/register_job_service.rb:57:in `process_queue'",
"app/services/ci/register_job_service.rb:33:in `block in execute'",
"lib/gitlab/ci/queue/metrics.rb:97:in `observe_queue_time'",
"app/services/ci/register_job_service.rb:32:in `execute'",
"lib/api/ci/runner.rb:152:in `block (2 levels) in <class:Runner>'",
"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:215:in `call'",
"ee/lib/omni_auth/strategies/group_saml.rb:41:in `other_phase'",
"lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in `call'",
"lib/gitlab/middleware/memory_report.rb:13:in `call'",
"lib/gitlab/middleware/speedscope.rb:13:in `call'",
"lib/gitlab/database/load_balancing/rack_middleware.rb:23:in `call'",
"lib/gitlab/middleware/rails_queue_duration.rb:33: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:37: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'"
],
Steps to reproduce
I so far have been unable to reproduce the issue, however there have been reports from multiple customers.
- Create a release and do not populate
Release notes
- Tag a commit for pipeline to the release
What is the current bug behavior?
It would appear that unless text/a value is provided in the Release notes
for the tagged release the error might ensue.
What is the expected correct behavior?
The job should be picked up by a runner and complete.
Relevant logs and/or screenshots
Sentry
https://sentry.gitlab.net/gitlab/gitlabcom/issues/3800609/
Kibana
First occurrence appears to be Oct 11, 2022: Kibana link
Output of checks
This bug happens on GitLab.com
Possible fixes
Possibly related to !98447 (merged) ?
Edited by Jio Castillo