heroku / legacy-cli

Heroku CLI
https://cli.heroku.com
MIT License
1.37k stars 380 forks source link

Heroku fork apps command fails on postgres addon with ' undefined method' #796

Open davidsoul opened 11 years ago

davidsoul commented 11 years ago

Attempting to fork a Heroku org app 'heroku-data-warehouse-coresfdc' fails for me on the postgres addnon. Error message.

Davids-MacBook-Air:Development soul$ heroku fork -a heroku-data-warehouse-coresfdc heroku-data-warehouse-scripts Creating fork heroku-data-warehouse-scripts... done Copying slug... done Adding scheduler:standard... done Adding heroku-postgresql:dev... skipped (Could not communicate with vendor, please try again later)

! Heroku client internal error. ! Search for help at: https://help.heroku.com ! Or report a bug at: https://github.com/heroku/heroku/issues/new

Error:       undefined method `[]' for nil:NilClass (NoMethodError)
Backtrace:   /Users/soul/.heroku/client/lib/heroku/command/fork.rb:57:in `block in index'
             /Users/soul/.heroku/client/lib/heroku/command/fork.rb:45:in `each'
             /Users/soul/.heroku/client/lib/heroku/command/fork.rb:45:in `index'
             /Users/soul/.heroku/client/lib/heroku/command.rb:206:in `run'
             /Users/soul/.heroku/client/lib/heroku/cli.rb:28:in `start'
             /usr/bin/heroku:24:in `<main>'

Command:     heroku fork -a heroku-data-warehouse-coresfdc heroku-data-warehouse-scripts
Plugins:     heroku-orgs
             heroku-pg-extras
             heroku-pg-transfer

Version:     heroku-toolbelt/2.39.3 (x86_64-darwin10.8.0) ruby/1.9.3
gregburek commented 10 years ago

This is a confirmed bug that is most reproducible with kappa and crane dbs. Looking at the backtrace, the fork command is not getting the expected message from the addon:add command to parse. For production dbs, the wait for this message can be 5-10 seconds, and if fork is not waiting, it will fail. dev/basic and ronin up dbs are able to return faster, but may also fail.