GoogleCloudPlatform / gradle-appengine-plugin

Gradle plugin that provides tasks for uploading, running and managing Google App Engine projects
Apache License 2.0
236 stars 60 forks source link

Can't deploy since SDK 1.9.46. Always in conflict. #268

Closed peterfortuin closed 7 years ago

peterfortuin commented 7 years ago

After updating this Gradle plugin to 1.9.46 and also the App Engine SDK to 1.9.46 every appengineUpdate call fails with a conflict message. Even a rollback doesn't work.

Beginning interaction for module admin...
0% Created staging directory at: '/var/folders/m8/6z4h4k2x11s3whxrqmd79lym0000gn/T/appcfg2292422843793738444.tmp'
5% Scanning for jsp files.
8% Generated git repository information file.
20% Scanning files on local disk.
25% Scanned 250 files.
28% Scanned 500 files.
31% Scanned 750 files.
33% Scanned 1000 files.
34% Initiating update.
Nov 13, 2016 11:11:41 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/create?module=admin&app_id=the-outdoor-game&version=dev&
409 Conflict
There is an operation pending for this application: AppLock held for "Updating engine_version_id='dev' within engine_id='default'." acquired by Peter.Fortuin at 2016-11-13 09:15:05.482616 GMT.  Please wait and try again or use 'appcfg rollback' to attempt to cleanly abort the current operation.
This is try #0

If I go back to 1.9.44 the deploy is still working. So there is really no lock on the app.

Any idea how to resolve this? Can I supply more information about this problem?

loosebazooka commented 7 years ago

@ludoch ? any idea what's going on here?

loosebazooka commented 7 years ago

Would deleting the module/version on the console help out here?

peterfortuin commented 7 years ago

I have no idea what you mean. Should I delete the staging dir?

loosebazooka commented 7 years ago

I mean definitely you could try using the ":clean" task first, but I mean on console.cloud.google.com/appengine

peterfortuin commented 7 years ago

I tried what you commented above. The clean didn't change anything. If I delete the module/version or deploy to a module/version that doesn't exist I get the following error:

Beginning interaction for module admin...
0% Created staging directory at: '/var/folders/m8/6z4h4k2x11s3whxrqmd79lym0000gn/T/appcfg2425451307288378608.tmp'
5% Scanning for jsp files.
8% Generated git repository information file.
20% Scanning files on local disk.
25% Scanned 250 files.
28% Scanned 500 files.
31% Scanned 750 files.
33% Scanned 1000 files.
34% Initiating update.
35% Cloning 458 static files.
Nov 14, 2016 10:07:25 PM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/cloneblobs?module=admin&app_id=the-outdoor-game&version=deploy-test&
409 Conflict
No transaction is in progress.
This is try #0
Nov 14, 2016 10:07:26 PM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/cloneblobs?module=admin&app_id=the-outdoor-game&version=deploy-test&
409 Conflict
No transaction is in progress.
This is try #1

This strange thing is the message that says that there is no transaction in progress. But still there is a conflict.

peterfortuin commented 7 years ago

Any idea?

patflynn commented 7 years ago

@ludoch ping.

peterfortuin commented 7 years ago

Btw, I also opened a question on Stack Overflow. http://stackoverflow.com/questions/40572757/cant-deploy-my-app-engine-since-sdk-1-9-46

peterfortuin commented 7 years ago

I also created an issue on the bugtracker => https://code.google.com/p/googleappengine/issues/detail?id=13417

ludoch commented 7 years ago

No clue so far... I would suggest we look at the diff's in the actual directory that gets deployed... Can you add this flag:

appcfg { extraOptions = ["--retain_upload_dir"] } And do a binary diff of the 2 directories (from 1944 and 1946)? But it seems to be a server side issue, and I am still investigating...

On Nov 22, 2016 04:36, "Peter" notifications@github.com wrote:

I also created an issue on the bugtracker => https://code.google.com/p/ googleappengine/issues/detail?id=13417

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/gradle-appengine-plugin/issues/268#issuecomment-262229911, or mute the thread https://github.com/notifications/unsubscribe-auth/AAE4zaHNws08PHnlaBk28iMTpDum8ejdks5rAuHGgaJpZM4KxsUR .

peterfortuin commented 7 years ago

Some response on my Stack Overflow question suggested that it can be related to the fact that my module has Endpoints included. Maybe that narrow things down?

I will check with the retain_upload_dir later. Will post the results here.

peterfortuin commented 7 years ago

I assume I should diff the directories that will be uploaded to App Engine. Where can I find that directory? Is it inside the build directory or some temporary directory on my disk?

ludoch commented 7 years ago

When using --retain_upload_dir, the tools emits the temp directory location and does not delete it.

peterfortuin commented 7 years ago

Ok. I did the diff between directories with 1.9.44 and 1.9.46. I see two differences:

  1. appengine-endpoints-1.9.44.jar in one dir and appengine-endpoints-1.9.46.jar in the other. (make sense to me)
  2. The app.yaml is the same, beside one point. 'module' is called 'service' in the 1.9.46 dir.

Beside those two differences everything is identical.

ludoch commented 7 years ago

'module' is called 'service' I guess this is the issue... service was supposed to work... What do you have in your appengine-web.xml : module or service?

peterfortuin commented 7 years ago

I changed that some time ago from module to service. Somehow this broke the deployment. I now have changed it back to module and that seems to be working.

Thanks a lot!

ludoch commented 7 years ago

Glad you are unstuck... We will fix the service issue on the backend soon, but for now, keep using module, the real name for the past 2 years at least:-)

On Wed, Nov 23, 2016 at 1:10 PM, Peter notifications@github.com wrote:

Closed #268 https://github.com/GoogleCloudPlatform/gradle-appengine-plugin/issues/268 .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/gradle-appengine-plugin/issues/268#event-870310648, or mute the thread https://github.com/notifications/unsubscribe-auth/AAE4zVNw99co1IUL7WlTuF0LhEuThSoyks5rBKvFgaJpZM4KxsUR .

peterfortuin commented 7 years ago

I was in the understanding that I had to move from modules to services. So some time ago I changed that to prevent problems ;-)