deployer icon indicating copy to clipboard operation
deployer copied to clipboard

Deployer v7 error: Release name "XX" already exists

Open micvog opened this issue 5 years ago • 3 comments

  • Deployer version: 6.8 and 7.0 betaX
  • Deployment OS: Debian

This happens regardless of deploy.php.

We've been running with deployer 6.x for quite some time and recently updated a few of our projects to the latest beta. We have noticed an issue where we occasionally got errors like

[servername]  Deployer\Exception\Exception  in release.php on line 106:
[servername]
[servername]   Release name "63" already exists.
[servername]

After some debugging, turns out deployer 7.x has a new format regarding .dep/releases here

The old (6.x) release directories still exist, but deployer 7 does not recognize them, because it only looks at its own files (releases_log and latest_release) and errors out when an already existing release directory from the previous version is found.

Is this intended? It would be a big pain to coordinate the first releases with a 7.x branch with a clean-up of the 6.x release directories. Would it be possible to check for a legacy .dep/releases file and take the timestamp into account, or at least have an option to just choose the "next free" directory, thus skipping already existing ones?

micvog avatar Oct 08 '21 07:10 micvog

Solution

Run deploy with next free release_name:

dep deploy -o release_name=64

antonmedv avatar Oct 08 '21 07:10 antonmedv

Good idea. You'll only get max 10 if you left it as default for cleanup task.

My folder looks like this after upgrading so will hit this when it reaches 226;

10
11
2
226
227
228
229
230
3
4
5
6
7
8
9

bbashy avatar Oct 08 '21 14:10 bbashy

Added solution to exception message.

antonmedv avatar Oct 13 '21 19:10 antonmedv