mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Clear cache command breaks deployment process #5864
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jkobus on GitHub (Jan 30, 2018).
Hello.
After merging the https://github.com/doctrine/doctrine2/pull/6655 my deployment script fails.
The problem is that the "doctrine:cache:clear-query" returns "1" if no cache entries were deleted.
I'm using deployer, therefore all exit codes > 0 are breaking the deployment process.
Exact cause of this is here:
https://github.com/doctrine/doctrine2/pull/6655/files#diff-6d7b81d245cae44e79534370561f1e5eR109
I think that
having no cache entries to removeis not an error, therefore the exit code should be set to0.@OskarStark what was the reason to add there a non-zero exit code?
Possible workaround would be to supress error code returned from that command during deployment, but then, when a real problem occurs (memcached connection problem for example) I won't be able to see it.
@jkobus commented on GitHub (Jan 30, 2018):
Well it seems that memcached service was down so the exit code was correct.
After starting the memcached service command works fine.
I think that cache clearing commands could be more verbose about the failure reason.
@lcobucci commented on GitHub (Feb 17, 2018):
@jkobus please send a PR with your suggestion 👍