-
Notifications
You must be signed in to change notification settings - Fork 99
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
"rake <env> deploy" does deploy four times? #149
Comments
heroku_san knows nothing about dynos When you "deploy" what do you see? A deploy is simply a HerokuSan creates targets, "staging", "production", etc. based on what's in your heroku.yml file. Perhaps you have multiple stages with the same name? Naming one of them "deploy" would also be terribly bad. |
I'm seeing this, too. I have this in my Rakefile (we have a rails app):
If I comment out The rake task itself runs twice, and in each of those runs the target is duplicated. Or that's how it seems since there is blank line between runs 1 and 2, and runs 3 and 4 (presumably caused by this). The way I was able to fix this was to
I'm not sure my solution is the best way to get around this issue, but it seems to work for us. |
creating tasks are cumulative, so if tasks.rb is getting loaded twice, then so you don't need to load tasks.rb in your rake file , that's only for On Sat, Mar 22, 2014 at 1:41 PM, Brent Wheeldon [email protected]:
[email protected] | (808) 722-6142 (c) |
I was just following the instructions in the example. The fix I outlined above actually didn't work. I'll dig in more tomorrow and report back.
|
I think I need a better example for rails apps; they just need new objects defined. Sent from my iPhone
|
Yep, redefining I've just looked over the example again and it doesn't mention requiring/loading the gem's rake tasks, so I must have been reading the wrong section somehow. Sorry about that! |
We are using heroku_san with mongoid_rails_migrations (fixed version at git://github.com/quantopian/mongoid_rails_migrations) for a Ruby on Rails application built on top of ruby 2.0.0, rails 3.2.13, and MongoDB.
When we run "rake staging deploy" or "rake production deploy", it does the entire deploy process four times.
When we do the deploy with "-t", it claims that all four deployments are happening within a single invocation of the deploy rule.
We thought perhaps it was running the deployment separately on each dyno, but our staging environment has only 2: 1 web dyno and 1 worker. On the other hand, our production environment has 3 web dynos and 1 worker. I don't know if any of this is relevant.
Oddly, it doesn't always do this. For example, it doesn't seem to do it in automated builds run by our Jenkins server, even though those builds are using the same "rake staging deploy" command we type on the command line.
Has anyone else seen this before? Any pointers for how to troubleshoot it further?
The text was updated successfully, but these errors were encountered: