Bug 45669

Summary: More than 1 row in migrator table when migrates foreman
Product: Sisyphus Reporter: Малъ Скрылевъ <3aHyga>
Component: gem-sequelAssignee: majioa <majioa>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P5 CC: cas, imz, led, majioa, mike, nbr, pav, rider, stalker
Version: unstable   
Hardware: x86_64   
OS: Linux   

Description Малъ Скрылевъ 2023-03-27 19:03:09 MSK
The exception with text More than 1 row in migrator table when database migration in foreman is thrown.

command to reproduce:
RAILS_ENV=production BUNDLE_GEMFILE=/usr/lib/foreman/Gemfile bundle exec rake db:migrate --trace

Sequel::Migrator::Error: More than 1 row in migrator table
/usr/lib/ruby/gemie/gems/sequel-5.66.0/lib/sequel/extensions/migration.rb:631:in `schema_dataset'
/usr/lib/ruby/gemie/gems/sequel-5.66.0/lib/sequel/extensions/migration.rb:462:in `initialize'
/usr/lib/ruby/gemie/gems/sequel-5.66.0/lib/sequel/extensions/migration.rb:526:in `initialize'
/usr/lib/ruby/gemie/gems/sequel-5.66.0/lib/sequel/extensions/migration.rb:409:in `new'
/usr/lib/ruby/gemie/gems/sequel-5.66.0/lib/sequel/extensions/migration.rb:409:in `run'
/usr/lib/ruby/gemie/gems/dynflow-1.6.10/lib/dynflow/persistence_adapters/sequel.rb:271:in `migrate_db'
/usr/lib/foreman/lib/tasks/dynflow.rake:23:in `block (2 levels) in <top (required)>'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/usr/lib/foreman/lib/tasks/dynflow.rake:42:in `block (2 levels) in <top (required)>'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/lib/ruby/gemie/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/var/lib/foreman/bin/rake:9:in `<top (required)>'
/usr/lib/ruby/gemie/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:63:in `load'
/usr/lib/ruby/gemie/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/lib/ruby/gemie/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:28:in `run'
/usr/lib/ruby/gemie/gems/bundler-2.2.19/lib/bundler/cli.rb:474:in `exec'
/usr/lib/ruby/gemie/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/lib/ruby/gemie/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/lib/ruby/gemie/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/lib/ruby/gemie/gems/bundler-2.2.19/lib/bundler/cli.rb:30:in `dispatch'
/usr/lib/ruby/gemie/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/lib/ruby/gemie/gems/bundler-2.2.19/lib/bundler/cli.rb:24:in `start'
/usr/bin/bundle:49:in `block in <top (required)>'
/usr/lib/ruby/gemie/gems/bundler-2.2.19/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
/usr/bin/bundle:37:in `<top (required)>'
/var/lib/foreman/bin/bundle:3:in `load'
/var/lib/foreman/bin/bundle:3:in `<main>'
Tasks: TOP => dynflow:migrate
-bash-4.4$ RAILS_ENV=production BUNDLE_GEMFILE=/usr/lib/foreman/Gemfile bundle exec rake db:migrate --trace
Comment 1 Малъ Скрылевъ 2023-03-27 19:05:09 MSK
related link is the https://gist.github.com/mccun934/b25876d81d8940be1f758370b84b4e30
Comment 2 Repository Robot 2023-03-27 19:20:04 MSK
gem-sequel-5.66.0-alt2 -> sisyphus:

 Mon Mar 27 2023 Pavel Skrylev <majioa@altlinux> 5.66.0-alt2
 - ! fixed to more than 1 row in migrator table (closes #45669)