Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task deploy:migrate exists with SystemStackError (version 1.6.0) #246

Closed
Flauschbaellchen opened this issue Jul 12, 2020 · 7 comments · Fixed by #247
Closed

Task deploy:migrate exists with SystemStackError (version 1.6.0) #246

Flauschbaellchen opened this issue Jul 12, 2020 · 7 comments · Fixed by #247

Comments

@Flauschbaellchen
Copy link

Steps to reproduce

Updating to capistrano-rails 1.6.0.

Expected behavior

Task deploy:migrate should run successfully.

Actual behavior

Task deploy:migrate runs into a recursive loop, exits with "stack level too deep":

[21:23:44] % cap staging deploy:migrate
rvm 1.29.8 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
ruby-2.6.6
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]
00:00 deploy:migrate
      [deploy:migrate] Run `rake db:migrate`
#<Thread:0x000055a96b80d2b0@/usr/local/rvm/gems/ruby-2.6.6/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
        9143: from /usr/local/rvm/gems/ruby-2.6.6/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
        9142: from /usr/local/rvm/gems/ruby-2.6.6/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:31:in `run'
        9141: from /usr/local/rvm/gems/ruby-2.6.6/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:31:in `instance_exec'
        9140: from /usr/local/rvm/gems/ruby-2.6.6/gems/capistrano-rails-1.6.0/lib/capistrano/tasks/migrations.rake:23:in `block (3 levels) in <top (required)>'
        9139: from /usr/local/rvm/gems/ruby-2.6.6/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:92:in `within'
        9138: from /usr/local/rvm/gems/ruby-2.6.6/gems/capistrano-rails-1.6.0/lib/capistrano/tasks/migrations.rake:24:in `block (4 levels) in <top (required)>'
        9137: from /usr/local/rvm/gems/ruby-2.6.6/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:100:in `with'
        9136: from /usr/local/rvm/gems/ruby-2.6.6/gems/capistrano-rails-1.6.0/lib/capistrano/tasks/migrations.rake:25:in `block (5 levels) in <top (required)>'
         ... 9131 levels...
           4: from /usr/local/rvm/gems/ruby-2.6.6/gems/capistrano-rails-1.6.0/lib/capistrano/tasks/migrations.rake:39:in `block (3 levels) in <top (required)>'
           3: from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/forwardable.rb:230:in `fetch'
           2: from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/forwardable.rb:230:in `fetch'
           1: from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/delegate.rb:83:in `method_missing'
/usr/local/rvm/gems/ruby-2.6.6/gems/capistrano-3.14.1/lib/capistrano/configuration/variables.rb:46:in `fetch': stack level too deep (SystemStackError)
#<Thread:0x000055a96b7f48c8@/usr/local/rvm/gems/ruby-2.6.6/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
        9143: from /usr/local/rvm/gems/ruby-2.6.6/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
        9142: from /usr/local/rvm/gems/ruby-2.6.6/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:31:in `run'
        9141: from /usr/local/rvm/gems/ruby-2.6.6/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:31:in `instance_exec'
        9140: from /usr/local/rvm/gems/ruby-2.6.6/gems/capistrano-rails-1.6.0/lib/capistrano/tasks/migrations.rake:23:in `block (3 levels) in <top (required)>'
        9139: from /usr/local/rvm/gems/ruby-2.6.6/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:92:in `within'
        9138: from /usr/local/rvm/gems/ruby-2.6.6/gems/capistrano-rails-1.6.0/lib/capistrano/tasks/migrations.rake:24:in `block (4 levels) in <top (required)>'
        9137: from /usr/local/rvm/gems/ruby-2.6.6/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:100:in `with'
        9136: from /usr/local/rvm/gems/ruby-2.6.6/gems/capistrano-rails-1.6.0/lib/capistrano/tasks/migrations.rake:25:in `block (5 levels) in <top (required)>'
        9135: from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/forwardable.rb:230:in `fetch'
        9134: from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/forwardable.rb:230:in `fetch'
        9133: from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/delegate.rb:83:in `method_missing'
        9132: from /usr/local/rvm/gems/ruby-2.6.6/gems/capistrano-3.14.1/lib/capistrano/configuration/variables.rb:47:in `fetch'
        9131: from /usr/local/rvm/gems/ruby-2.6.6/gems/capistrano-3.14.1/lib/capistrano/configuration/variables.rb:54:in `peek'
        9130: from /usr/local/rvm/gems/ruby-2.6.6/gems/capistrano-rails-1.6.0/lib/capistrano/tasks/migrations.rake:39:in `block (3 levels) in <top (required)>'
...
...
           3: from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/forwardable.rb:230:in `fetch'
           2: from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/forwardable.rb:230:in `fetch'
           1: from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/delegate.rb:83:in `method_missing'
/usr/local/rvm/gems/ruby-2.6.6/gems/capistrano-3.14.1/lib/capistrano/configuration/variables.rb:46:in `fetch': stack level too deep (SystemStackError)
(Backtrace restricted to imported tasks)
cap aborted!
SystemStackError: stack level too deep

System configuration

Capistrano gems:

  • capistrano (3.14.1)
  • capistrano-bundler (1.6.0)
  • capistrano-rails (1.6.0)
  • capistrano-rvm (0.1.2)
  • capistrano-sidekiq (1.0.3)
  • capistrano3-puma (4.0.0)
@mattbrictson
Copy link
Member

@the-undefined this seems to be related to your changes in #242. Can you help?

@mattbrictson
Copy link
Member

@Flauschbaellchen thanks for the detailed report. I'll try to get this sorted ASAP.

@Eric-Guo
Copy link

Seems add set :migration_command, 'db:migrate' at config/deploy.rb is the quickly fix.

@mattbrictson
Copy link
Member

Alrighty I will get that fix in shortly. Thanks!

@mattbrictson
Copy link
Member

I've released 1.6.1 with a fix. Can you verify it works?

@Eric-Guo
Copy link

it works at v1.6.1 without add extra one line code now, nice!

@the-undefined
Copy link
Contributor

Sorry I missed this! I forgot to test without the override in, which I could have done on a different app now I think about it 🤦

Thank you both for reporting and turning around a fix super quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants