Skip to content
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

Rolling back a release not working cause of "Undefined variable" #215

Closed
elfantastico opened this issue Apr 10, 2015 · 3 comments
Closed
Labels

Comments

@elfantastico
Copy link

I'm trying to rollback a release with

  • mage releases rollback --release=0 to:vm
  • mage rollback -1 to:vm

and I'm getting a

PHP Notice: Undefined variable: currentCopy in /opt/magallanes/1.0.5/Mage/Task/BuiltIn/Releases/RollbackTask.php on line 140
PHP Stack trace:
PHP 1. {main}() /opt/magallanes/1.0.5/bin/mage:0
PHP 2. Mage\Console->run() /opt/magallanes/1.0.5/bin/mage:34
PHP 3. Mage\Command\BuiltIn\RollbackCommand->run() /opt/magallanes/1.0.5/Mage/Console.php:146
PHP 4. Mage\Task\BuiltIn\Releases\RollbackTask->run() /opt/magallanes/1.0.5/Mage/Command/BuiltIn/RollbackCommand.php:69

Notice: Undefined variable: currentCopy in /opt/magallanes/1.0.5/Mage/Task/BuiltIn/Releases/RollbackTask.php on line 140

Call Stack:
0.0003 230736 1. {main}() /opt/magallanes/1.0.5/bin/mage:0
0.0013 310088 2. Mage\Console->run() /opt/magallanes/1.0.5/bin/mage:34
0.0525 734880 3. Mage\Command\BuiltIn\RollbackCommand->run() /opt/magallanes/1.0.5/Mage/Console.php:146
0.0540 859000 4. Mage\Task\BuiltIn\Releases\RollbackTask->run() /opt/magallanes/1.0.5/Mage/Command/BuiltIn/RollbackCommand.php:69

@bunin
Copy link

bunin commented Apr 10, 2015

similar issue

running ./vendor/bin/mage releases rollback --release=-1 to:production

Running Rollback Release [id=20150410123533] ... PHP Notice:  Undefined variable: currentCopy in /vendor/andres-montanez/magallanes/Mage/Task/BuiltIn/Releases/RollbackTask.php on line 140
PHP Stack trace:
PHP   1. {main}() /vendor/andres-montanez/magallanes/bin/mage:0
PHP   2. Mage\Console->run() /vendor/andres-montanez/magallanes/bin/mage:34
PHP   3. Mage\Command\BuiltIn\ReleasesCommand->run() /vendor/andres-montanez/magallanes/Mage/Console.php:146
PHP   4. Mage\Task\BuiltIn\Releases\RollbackTask->run() /vendor/andres-montanez/magallanes/Mage/Command/BuiltIn/ReleasesCommand.php:85
FAIL

from log file:

2015-04-10 13:03:15 -- Running Rollback Release [id=20150410123533] ... 
2015-04-10 13:03:15 -- Run remote command cd /var/www && ls -ld releases/20150410123533 | awk '{print \$3\":\"\$4}'
2015-04-10 13:03:15 -- ---------------------------------
2015-04-10 13:03:15 -- ---- Executing: $ ssh  -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no user@host "sh -c \"cd /var/www && ls -ld releases/20150410123533 | awk '{print \$3\":\"\$4}'\""
2015-04-10 13:03:15 -- awk: line 1: syntax error at or near :
2015-04-10 13:03:15 -- ---------------------------------
2015-04-10 13:03:15 -- Run remote command cd /var/www && ln -sfn  releases/20150410123533.tmp && mv -T releases/20150410123533.tmp current
2015-04-10 13:03:15 -- ---------------------------------
2015-04-10 13:03:15 -- ---- Executing: $ ssh  -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no user@host "sh -c \"cd /var/www && ln -sfn  releases/20150410123533.tmp && mv -T releases/20150410123533.tmp current\""
2015-04-10 13:03:16 -- mv: cannot stat `releases/20150410123533.tmp': No such file or directory
2015-04-10 13:03:16 -- ---------------------------------
2015-04-10 13:03:16 -- FAIL

@eps90
Copy link
Collaborator

eps90 commented Apr 12, 2015

@elfantastico @bunin Hey, the issue has been resolved in #209 and the fix is still on develop branch. Try to pass dev-develop in composer.json as target version. I hope this fix gonna be released to stable version soon :)

@andres-montanez
Copy link
Owner

Hi! As pointed by @eps90 the new release fixes this!
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants