capistrano/capistrano — Issue #164: deploy:symlink hooks no longer called; may fail silently.
Author: ktheory
Created: 2012-02-21 21:30:24+00:00
State: open

Since deploy:symlink is no longer called during a deploy, the task is in many ways obsolete; not deprecated.

I have some custom tasks that were only called as a before hook to deploy:symlink.

E.g., my hook to stop background jobs while the app code is changing:

before "deploy:symlink", "bg:stop"

After upgrading, I expected those tasks to show a deprecation warning. Instead, they never ran, and no warning was given.

I assumed deploy:symlink was part of the public API and fine to hook into. My pattern is to use "after deploy:update_code" for any tasks that don't depend on a fully configured environment; and "before deploy:symlink" for tasks that *do* need a fully configured environment (e.g., pre-warming caches).

It was simple enough to hook into "deploy:create_symlink" instead. But the new capistrano may seem to *fail silently* for some users, instead of warning about a deprecation.