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

Already on GitHub? Sign in to your account

It should be possible to continue executing task chain on NoMatchingServersError #51

Merged
merged 1 commit into from Aug 2, 2011

Conversation

Projects
None yet
4 participants

cgriego commented Jun 22, 2011

We find it somewhat illogical to halt executing the task chain when this exception is raised.

There are two ways I would assume this would work.

  1. Treat it the same as a task failing and rollback
  2. Assume that the reason no servers match is intentional and continue executing the rest of the tasks (which seemed the most logical assumption to us)

Is this a valid issue or am I missing something?

Maybe an option similar to :on_error => :continue should be available to override the default behaviour?

Cheers in advance.

Levent

levent commented Jun 8, 2011

After looking at this a bit more in depth, it seems the rollback doesn't occur because our case was after deploy so outside the transaction.

I understand the default behaviour makes sense if say rake db:migrate didn't run because no servers were matched. In that case we would definitely want a rollback.

However, if it's not currently possible, I see great value in being able to explicitly choose to continue if no servers were matched.

Contributor

cgriego commented Jun 11, 2011

+1 I like the approach of using a new option. That way it can be set at a command or task level.

rslifka commented Jun 16, 2011

+1 I also like a new option. Bonus would be a new global setting rather than a per-task option. That way I can tilt the default in the direction that makes the most sense and override when necessary (i.e. it may be that I want all of them to continue on error save for one).

Owner

leehambley commented Jun 16, 2011

I've personally never had a use for this, but I'll gladly take a patch, if it's really a bad itch for some of you guys, as long as there are tests, I will absolutely merge it.

rslifka commented Jun 18, 2011

@leehambley - We have a dozen roles in our deploy environment. When testing smaller parts of that environment in a different cap stage, we often don't setup servers for all 12 roles; instead setting up just 1 server for focused testing. This means we have to comment out major ports of the script to be able to do focused development. There may be another way to work here but for now the idea behind this patch seems to be the most obvious to us :) Thanks!

Contributor

cgriego commented Jun 22, 2011

I added a pull request.

Owner

leehambley commented Jun 22, 2011

Thanks

On 22 June 2011 04:19, cgriego <
reply@reply.github.com>wrote:

I added a pull request.

Reply to this email directly or view it on GitHub:
#51 (comment)

@leehambley leehambley added a commit that referenced this pull request Aug 2, 2011

@leehambley leehambley Merge pull request #51 from cgriego/opt-out-no-matching-servers
It should be possible to continue executing task chain on NoMatchingServersError
edf7092

@leehambley leehambley merged commit edf7092 into capistrano:master Aug 2, 2011

@mattbrictson mattbrictson pushed a commit to mattbrictson/capistrano that referenced this pull request Aug 24, 2016

@kirs kirs Merge pull request #51 from plentz/patch-1
small fix in the shell mode docs
ba3f7c7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment