opensas
opensas

Reputation: 63625

how to rollback an interrupted deploy to GAE

I interrupted a play framework deploy to gae

I deployed it with

play gae:deploy --gae=$GAE_PATH

And press ctrl-c in the middle of it

Now, when I try to redeploy it, I get the following error:

Unable to update app: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=playdoces&version=20111007&
409 Conflict
Another transaction by user opensas is already in progress for app: s~playdoces, version: 20111007. That user can undo the transaction with "appcfg rollback".

Please see the logs [/tmp/appcfg1441845586056774629.log] for further information.

I tried with

/home/sas/devel/gae/bin/appcfg.sh rollback

but there's no such option

any idea?


In the end, I've just created another version and set it as default

But I'd like to know if there's some way to cancel the previous deploy

Upvotes: 4

Views: 3713

Answers (4)

Alexandros Trepeklis
Alexandros Trepeklis

Reputation: 191

First download and install the app engine sdk if you don't have it already. In case you are using Android Studio the following command will do it:

/path-to-appengine-java-sdk/appengine-java-sdk-1.9.28/bin/appcfg.sh rollback /path-to-your-project/backend-module-folder/src/main/webapp/

Or put differently, what you need to do is to point it to the directory that has the 'WEB-INF' folder in it.

Upvotes: 0

msangel
msangel

Reputation: 10377

it is simple as:

mvn appengine:rollback

Upvotes: 12

Damo
Damo

Reputation: 11550

Go into the <play_install>/modules/<gae_module>/bin directory and edit the commands.py so that it includes the rollback command:

if command == "gae:rollback":
    print '~'
    print '~ Performing Rollback'
    print '~ ---------'

    if os.name == 'nt':
        os.system('%s/bin/appcfg.cmd rollback %s' % (gae_path, war_path))
    else:
        os.system('%s/bin/appcfg.sh rollback %s' % (gae_path, war_path))

    print "~ "
    print "~ Done!"
    print "~ "
    sys.exit(-1)

Run this like play gae:rollback --gae=$GAE_PATH then run your deploy again. Works for me with the same issue. I'll add a request to get this added to the module.

Upvotes: 2

systempuntoout
systempuntoout

Reputation: 74134

Go one directory above your application and try with:

appcfg.sh rollback your_application_directory_name

Upvotes: 3

Related Questions