-
Notifications
You must be signed in to change notification settings - Fork 280
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
Notify deploy only on primary :rollbar_role server #368
Conversation
Hi @theist, I think the PR is ok, but I'll need to check the compatibility with different versions of capistrano. Have you know the behavior if the user has only one server and didn't flag the server as Thanks |
I'm used to the last version of capistrano. On 3.4 the first server defined for a role is automagically defined as primary so primary :role always return a host. But capistrano changes fast. Perhaps at weekend I be able to do some homework, and check properly this PR |
Hi @jondeandres I've checked capistrano 3.0 and 3.1 behaviour about roles/primary As in 3.4, in capistrano 3.0 the first server for a defined role is automatically considered primary. So there's always a primary and only one server for each role considered "primary" This is the current template of "stage" and the text is similar in 3.1 https://github.com/capistrano/capistrano/blob/master/lib/capistrano/templates/stage.rb.erb#L15 I think that there's the code which selects primary : I also tested capistrano 3.0/3.1 with this config
And did these tests with pry (this is cap 3.0)
|
Awesome @theist! Thanks for debugging this and resolve the doubts. I'll merge this today, thanks for this! |
@theist could you sync the branch with master? We fixed a problem with the sucker punch version and your tests are failing cause that. Thanks! |
Hi, I've seen that on every deploy on a multi app node the deploy gets noticed once for each node which get the deploy, so on a tree app node connected to rollbar there's three notifications of the same deploy which makes tree notices on a slack channel if you have slack and rollbar paired. So perhaps it's a good idea notify the deploy only on primary server. *Important note*: I've made this PR using the github editor and my knowledge of capistrano so it is not properly tested. I planed only to open an issue but the change is so small that I've created it as PR.
Took two tries but seems ok now. Sorry about the double CI cycle. Now its pushed only my change against the current master. |
awesome @theist, thanks! |
Notify deploy only on primary :rollbar_role server
Hi, I've seen that on every deploy on a multi app node the deploy gets noticed once for each node which get the deploy, so on a tree app node connected to rollbar there's three notifications of the same deploy which makes tree notices on a slack channel if you have slack and rollbar paired.
So perhaps it's a good idea notify the deploy only on primary server.
Important note: I've made this PR using the github editor and my knowledge of capistrano so it is not properly tested. I planed only to open an issue but the change is so small that I've created it as PR.