GoogleCloudPlatform / gcloud-maven-plugin

Cloud SDK Maven Plugin for Google App Engine (Managed VMs and non Managed VMs)
Apache License 2.0
29 stars 24 forks source link

Deployments are flaky when using gcloud plugin to deploy App Engine standard environment apps. #90

Closed tswast closed 8 years ago

tswast commented 8 years ago

I filed an internal issue number 29425008 for this. Our end-to-end / user journey tests are failing often for the Java interactive tutorial due to this issue.

Example log of failed deploy:

+ mvn gcloud:deploy -Dgcloud.gcloud_project=java-quickstart-test -Dgcloud.version=81
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building appengine-try-java 1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> gcloud-maven-plugin:2.0.9.111.v20160525:deploy (default-cli) > package @ appengine-try-java >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ appengine-try-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /workspace/appengine-try-java-e2e-gcloud/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ appengine-try-java ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /workspace/appengine-try-java-e2e-gcloud/target/appengine-try-java/WEB-INF/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ appengine-try-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /workspace/appengine-try-java-e2e-gcloud/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ appengine-try-java ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ appengine-try-java ---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-war-plugin:2.3:war (default-war) @ appengine-try-java ---
[INFO] Packaging webapp
[INFO] Assembling webapp [appengine-try-java] in [/workspace/appengine-try-java-e2e-gcloud/target/appengine-try-java-1.0]
[INFO] Processing war project
[INFO] Copying webapp webResources [/workspace/appengine-try-java-e2e-gcloud/src/main/webapp/WEB-INF] to [/workspace/appengine-try-java-e2e-gcloud/target/appengine-try-java-1.0]
[INFO] Copying webapp resources [/workspace/appengine-try-java-e2e-gcloud/src/main/webapp]
[INFO] Building jar: /workspace/appengine-try-java-e2e-gcloud/target/appengine-try-java-1.0/WEB-INF/lib/appengine-try-java-1.0.jar
[INFO] Webapp assembled in [80 msecs]
[INFO] Building war: /workspace/appengine-try-java-e2e-gcloud/target/appengine-try-java-1.0.war
[INFO] 
[INFO] <<< gcloud-maven-plugin:2.0.9.111.v20160525:deploy (default-cli) < package @ appengine-try-java <<<
[INFO] 
[INFO] --- gcloud-maven-plugin:2.0.9.111.v20160525:deploy (default-cli) @ appengine-try-java ---
[INFO] Creating staging directory in: /workspace/appengine-try-java-e2e-gcloud/target/appengine-staging
2016/06/16 01:53:33
[INFO] Running appcfg --disable_update_check -A notused -V 81 -A java-quickstart-test stage /workspace/appengine-try-java-e2e-gcloud/target/appengine-try-java-1.0 /workspace/appengine-try-java-e2e-gcloud/target/appengine-staging
Reading application configuration data...

Beginning interaction for module default...
0% Scanning for jsp files.
0% Generated git repository information file.
Success.
Temporary staging for module default directory left in /workspace/appengine-try-java-e2e-gcloud/target/appengine-staging
[INFO] Running gcloud app deploy...
[INFO] Running python -S /root/google-cloud-sdk/lib/gcloud.py --quiet --project=java-quickstart-test preview app deploy /workspace/appengine-try-java-e2e-gcloud/target/appengine-staging/app.yaml --version=81 --promote
[INFO] You are about to deploy the following services:
[INFO]  - java-quickstart-test/default/81 (from [/workspace/appengine-try-java-e2e-gcloud/target/appengine-staging/app.yaml])
[INFO]      Deployed URL: [https://java-quickstart-test.appspot.com]
[INFO] 
[INFO] Beginning deployment of service [default]...
[INFO] File upload done.
[INFO] 
[INFO] Updating service [default]...
[INFO]                              
[INFO] Updating service [default]...failed.
[INFO] ERROR: (gcloud.preview.app.deploy) Error Response: [400] Invalid request.
[INFO] 
[INFO] Details: [
[INFO]   [
[INFO]     {
[INFO]       "@type": "type.googleapis.com/google.rpc.BadRequest",
[INFO]       "fieldViolations": [
[INFO]         {
[INFO]           "description": "Version does not exist in service (module) \"default\".",
[INFO]           "field": "module.split.allocations[81]"
[INFO]         }
[INFO]       ]
[INFO]     }
[INFO]   ]
[INFO] ]
[INFO] 
[ERROR] Error: gcloud app command with exit code : 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.212 s
[INFO] Finished at: 2016-06-16T01:53:47+00:00
[INFO] Final Memory: 27M/460M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.111.v20160525:deploy (default-cli) on project appengine-try-java: Error: gcloud app command exit code is: 1 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
tswast commented 8 years ago

I believe this was fixed. I've not encountered this issue recently.