Skip to content

Revert "Merge branch 'renovate-gems/bootsnap' into 'master'"

Thong Kuah requested to merge revert-bc6e3b45 into master

What does this MR do and why?

Based on !143230 (comment 1750589800), it is likely the bootsnap update is causing issues with YAML.load_file. This is causing gdk update to fail

Revert "Merge branch 'renovate-gems/bootsnap' into 'master'"

This reverts merge request !143230 (merged)

  1. gdk update. You should see a failure that looks like:
--------------------------------------------------------------------------------
Processing gitlab rails DB migrations
--------------------------------------------------------------------------------
rake aborted!
EOFError: end of buffer reached
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/dictionary.rb:62:in `initialize'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/dictionary.rb:32:in `new'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/dictionary.rb:32:in `block in entries'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/dictionary.rb:31:in `map'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/dictionary.rb:31:in `entries'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/gitlab_schema_info.rb:123:in `all_table_allows'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/gitlab_schema_info.rb:99:in `add_table_specific_allows'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/gitlab_schema_info.rb:18:in `initialize'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/gitlab_schema_info.rb:28:in `new'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/gitlab_schema_info.rb:28:in `load_file'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database.rb:81:in `block in all_gitlab_schemas'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database.rb:81:in `map'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database.rb:81:in `all_gitlab_schemas'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database.rb:122:in `schemas_to_base_models'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database.rb:262:in `gitlab_schemas_for_connection'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/shared_model.rb:25:in `using_connection'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/each_database.rb:74:in `with_shared_connection'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/each_database.rb:68:in `with_model_connection'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/each_database.rb:31:in `block in each_model_connection'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/each_database.rb:25:in `each_model_connection'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/partitioning.rb:36:in `sync_partitions'
/Users/tkuah/code/gdk-ee/gitlab/lib/gitlab/database/partitioning.rb:24:in `sync_partitions_ignore_db_error'
/Users/tkuah/code/gdk-ee/gitlab/config/initializers/postgres_partitioning.rb:58:in `<main>'
/Users/tkuah/code/gdk-ee/gitlab/config/environment.rb:7:in `<main>'
<internal:/Users/tkuah/.rbenv/versions/3.2.3/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/Users/tkuah/.rbenv/versions/3.2.3/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/Users/tkuah/.rbenv/versions/3.2.3/bin/bundle:25:in `load'
/Users/tkuah/.rbenv/versions/3.2.3/bin/bundle:25:in `<main>'
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)
ERROR: 'bundle exec rake db:migrate db:test:prepare' failed.
  1. Try bundle exec rails console. It should fail with the same error.
  2. Try checking out this branch, then bundle exec rails console. Rails console should boot without error now.

Workaround

  1. In gitlab, rm -rf tmp/cache/bootsnap
  2. In gitlab-development-kit, edit env.runit to have export ENABLE_BOOTSNAP=0
  3. Also edit gdk.yml to have:
gitlab:
  rails:
    bootsnap: false

This should enable your gdk update to run without this error

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Thong Kuah

Merge request reports