Source install failed migration 14.9-stable -> 14.10-stable - did not find expected key while parsing a block mapping

We have been running a test upgrade of our 14.2.7 GitLab. We are doing it version by version and we wait for all background-migrations to complete before proceeding:

14.2.7 → 14-3-stable - no issues
14-3-stable → 14-4-stable - no issues
14-4-stable → 14-5-stable - no issues
14-5-stable → 14-6-stable - no issues
14-6-stable → 14-7-stable - no issues
14-7-stable → 14-8-stable - no issues
14-8-stable → 14-9-stable - no issues
14-9-stable → 14-10-stable - Psych::SyntaxError

The error while using --trace is

# sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production  --trace
** Invoke db:migrate (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Psych::SyntaxError: (<unknown>): did not find expected key while parsing a block mapping at line 1472 column 5
/usr/local/lib/ruby/2.7.0/psych.rb:456:in `parse'
/usr/local/lib/ruby/2.7.0/psych.rb:456:in `parse_stream'
/usr/local/lib/ruby/2.7.0/psych.rb:390:in `parse'
/usr/local/lib/ruby/2.7.0/psych.rb:277:in `load'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/settingslogic-2.0.9/lib/settingslogic.rb:103:in `initialize'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/settingslogic-2.0.9/lib/settingslogic.rb:60:in `new'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/settingslogic-2.0.9/lib/settingslogic.rb:60:in `instance'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/settingslogic-2.0.9/lib/settingslogic.rb:37:in `[]'
/home/git/gitlab/config/initializers/1_settings.rb:8:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/engine.rb:681:in `load'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/engine.rb:681:in `block in load_config_initializer'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.7/lib/active_support/notifications.rb:205:in `instrument'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/engine.rb:680:in `load_config_initializer'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/engine.rb:634:in `block (2 levels) in <class:Engine>'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/engine.rb:633:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/engine.rb:633:in `block in <class:Engine>'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/initializable.rb:32:in `instance_exec'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/initializable.rb:32:in `run'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/initializable.rb:61:in `block in run_initializers'
/usr/local/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
/usr/local/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/usr/local/lib/ruby/2.7.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
/usr/local/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
/usr/local/lib/ruby/2.7.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/initializable.rb:50:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/initializable.rb:50:in `tsort_each_child'
/usr/local/lib/ruby/2.7.0/tsort.rb:415:in `call'
/usr/local/lib/ruby/2.7.0/tsort.rb:415:in `each_strongly_connected_component_from'
/usr/local/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
/usr/local/lib/ruby/2.7.0/tsort.rb:347:in `each'
/usr/local/lib/ruby/2.7.0/tsort.rb:347:in `call'
/usr/local/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
/usr/local/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
/usr/local/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/initializable.rb:60:in `run_initializers'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/application.rb:391:in `initialize!'
/home/git/gitlab/config/environment.rb:7:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.7/lib/active_support/dependencies.rb:332:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.7/lib/active_support/dependencies.rb:299:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.7/lib/active_support/dependencies.rb:332:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/application.rb:367:in `require_environment!'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/application.rb:533:in `block in run_tasks_blocks'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/sentry-ruby-core-5.1.1/lib/sentry/rake.rb:24:in `execute'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/bin/rake:23:in `load'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/bin/rake:23:in `<top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.6/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.6/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.6/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.6/lib/bundler/cli.rb:484:in `exec'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.6/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.6/lib/bundler/cli.rb:31:in `dispatch'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.6/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.6/lib/bundler/cli.rb:25:in `start'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.6/exe/bundle:48:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.6/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.6/exe/bundle:36:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate => db:load_config => environment

Looking around, I fail to find anyone else with this issue, and I am quite stumped. Does anyone have an idea why this happened, and how I might be able to fix this issue?

Wow, talk about needing more coffee. After posting I decided to search less specific error messages, and see that this is not a migration issue, but a yml file. I had an extra space in my gitlab.yml file at line 1472 :frowning:

Apologies… again… for posting an issue with a known answer. At least this post might help someone else.

1 Like