GoogleCloudPlatform / app-gradle-plugin

The library has moved to https://github.com/GoogleCloudPlatform/appengine-plugins/tree/main/app-gradle-plugin
Apache License 2.0
153 stars 40 forks source link

The deploment takes much too long #349

Closed rekire closed 5 years ago

rekire commented 5 years ago

Almost every second deployment there are updates on my Windows machine which takes a lot of time.

Here is the full censored output:

06:50:11: Executing task 'appengineDeploy'...

Configure project :core WARNING: You are a using release candidate 2.0.0-rc5. Behavior of this plugin has changed since 1.3.5. Please see release notes at: https://github.com/GoogleCloudPlatform/app-gradle-plugin. Missing a feature? Can't get it to work?, please file a bug at: https://github.com/GoogleCloudPlatform/app-gradle-plugin/issues.

Task :core:compileKotlin Task :core:compileJava NO-SOURCE Task :core:compileKonversation Task :core:processResources Task :core:classes Task :core:bootWar Task :core:war SKIPPED Task :core:explodeWar Task :core:assemble Task :core:downloadCloudSdk

Your current Cloud SDK version is: 249.0.0 You will be upgraded to version: 250.0.0

+-------------------------------------------------------+ | These components will be updated. | +------------------------------+------------+-----------+ | Name | Version | Size | +------------------------------+------------+-----------+ | Cloud SDK Core Libraries | 2019.06.07 | 10.8 MiB | | gcloud app Java Extensions | 1.9.75 | 103.3 MiB | | gcloud app Python Extensions | 1.9.86 | 6.0 MiB | +------------------------------+------------+-----------+

The following release notes are new in this upgrade. Please read carefully for information about new features, breaking changes, and bugs fixed. The latest full release notes can be viewed at: https://cloud.google.com/sdk/release_notes

250.0.0 (2019-06-11) Breaking Changes o (Compute Engine) Modified gcloud compute networks update --switch-to-custom-subnet-mode to poll and wait for operation to finish instead of returning immediately. Please use --async flag to reproduce the previous behavior of returning immediately.

Cloud SDK o Added core/disable_file_logging property to prevent the gcloud command-line tool from storing logs to a file. This may be useful if disk space is limited. To set this property, run gcloud config set core/disable_file_logging True.

App Engine o Updated the Python SDK to version 1.9.86. For more details, see https://cloud.google.com/appengine/docs/python/release-notes. o Updated the Java SDK to version 1.9.75. For more details, see https://cloud.google.com/appengine/docs/java/release-notes.

Cloud Functions o Added --clear-vpc-connector flag to gcloud beta functions deploy.

Cloud Key Management Service o Promoted the following commands to GA.

  • gcloud kms asymmetric-decrypt.
  • gcloud kms asymmetric-sign.
  • gcloud kms keys versions get-public-key. o Promoted the following flags in gcloud kms keys command group to GA.
  • --attestation-file.
  • --default-algorithm.
  • --purpose.
  • --protection-level.

    Cloud Memorystore o Added gcloud beta redis instances <import|export> to import data to or export data from a Memorystore Redis instance from or to Google Cloud Storage. o Added gcloud beta redis operations cancel to cancel a Memorystore Redis import or export operation.

    Cloud PubSub o Added the following optional flags to gcloud beta pubsub topics create to support Cloud KMS integration:

  • --topic-encryption-key
  • --topic-encryption-key-keyring
  • --topic-encryption-key-location
  • --topic-encryption-key-project

    Cloud Run o Promoted --service-account flag of gcloud run deploy and gcloud run services update to beta.

    Compute Engine o Promoted gcloud compute instances create --source-snapshot flag to beta. o Promote INTERNAL_SELF_MANAGED value of --load-balancing-scheme in gcloud compute backend-services create and gcloud compute forwarding-rules create to GA. o Modified gcloud compute backend-services create and gcloud compute backend-services update to allow toggling logging for backend services with HTTP2 protocol. o Promoted --server-binding flag of gcloud compute sole-tenancy node-templates create to GA. o Promoted --enable-logging and --log-filter flags of gcloud compute routers nats to GA.

    Kubernetes Engine o Promoted Stackdriver Kubernetes Engine Monitoring to GA. Use --enable-stackdriver-kubernetes with gcloud container clusters create or gcloud container clusters update to enable this feature. o Updated several flag names in gcloud beta container binauthz that assumed PGP as the only supported key type.

    Subscribe to these release notes at https://groups.google.com/forum/#!forum/google-cloud-sdk-announce (https://groups.google.com/forum/#!forum/google-cloud-sdk-announce).

============================================================

= Creating update staging area =

============================================================

= Uninstalling: Cloud SDK Core Libraries =

============================================================

= Uninstalling: gcloud app Java Extensions =

============================================================

= Uninstalling: gcloud app Python Extensions =

============================================================

= Installing: Cloud SDK Core Libraries =

============================================================

= Installing: gcloud app Java Extensions =

============================================================

= Installing: gcloud app Python Extensions =

============================================================

= Creating backup and activating new installation =

============================================================

Performing post processing steps... .......................................................................................................................................................................................................................................................done.

Update done!

To revert your SDK to the previously installed version, you may run: $ gcloud components update --version 249.0.0

WARNING: There are older versions of Google Cloud Platform tools on your system PATH. Please remove the following to avoid accidentally invoking these old tools:

C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\bq.cmd C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\java_dev_appserver.sh C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\endpointscfg.py C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\gcloud-ps.ps1 C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\dev_appserver.py C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\docker-credential-gcloud.cmd C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\gcloud.cmd C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\gcloud C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\bq-ps.ps1 C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\gsutil-ps.ps1 C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\git-credential-gcloud.cmd C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\gsutil.cmd C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\java_dev_appserver.cmd

Jun 12, 2019 7:01:53 AM java.util.prefs.WindowsPreferences WARNUNG: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5. Reading application configuration data... 2019-06-12 07:01:55.919:INFO::main: Logging initialized @2743ms to org.eclipse.jetty.util.log.StdErrLog

Beginning interaction for module default...

Task :core:appengineStage

0% Scanning for jsp files. 2019-06-12 07:02:30.449:INFO::main: Logging initialized @227ms to org.eclipse.jetty.util.log.StdErrLog 2019-06-12 07:02:30.639:INFO:oejs.Server:main: jetty-9.4.18.v20190429; built: 2019-04-29T20:42:08.989Z; git: e1bc35120a6617ee3df052294e433f3a25ce7097; jvm 1.8.0_131-b11 2019-06-12 07:02:35.086:INFO:oeja.AnnotationConfiguration:main: Scanning elapsed time=3015ms 2019-06-12 07:02:35.104:INFO:oejq.QuickStartDescriptorGenerator:main: Quickstart generating 2019-06-12 07:02:35.126:INFO:oejsh.ContextHandler:main: Started o.e.j.q.QuickStartWebApp@5649fd9b{/,file:///C:/CENSORED/build/staged-app/,AVAILABLE} 2019-06-12 07:02:35.128:INFO:oejs.Server:main: Started @4916ms 2019-06-12 07:02:35.139:INFO:oejsh.ContextHandler:main: Stopped o.e.j.q.QuickStartWebApp@5649fd9b{/,file:///C:/CENSORED/build/staged-app/,UNAVAILABLE} 0% Generated git repository information file. Jun 12, 2019 7:02:35 AM com.google.appengine.tools.admin.Application createStagingDirectory Success. INFORMATION: We detected that you have a large number of .class files in WEB-INF/classes. You may be able to reduce request latency by packaging your .class files into jars. To do this, supply true in the tag in appengine-web.xml or one of the following methods: You can supply the --enable_jar_classes flag when using appcfg on command line. If you're using the Cloud SDK based app-maven-plugin, add true</stage.enableJarClasses> in the plugin's tag. If you are using the AppCfg based appengine-maven-plugin, supply true in the plugin's tag. Note that this flag will put the jar in WEB-INF/lib rather than WEB-INF/classes. The classloader first looks in WEB-INF/classes and then WEB-INF/lib when loading a class. As a result, this flag could change classloading order, which may affect the behavior of your app. Temporary staging for module default directory left in C:\CENSORED\build\staged-app

Task :core:compileTestKotlin Task :core:compileTestJava NO-SOURCE Task :core:processTestResources UP-TO-DATE Task :core:testClasses UP-TO-DATE Task :core:test Services to deploy:

descriptor: [C:\CENSORED\build\staged-app\app.yaml] source: [C:\CENSORED\build\staged-app] target project: [CENSORED] target service: [default] target version: [20190612t070318] target url: [https://CENSORED.appspot.com]

Beginning deployment of service [default]...

============================================================

= Uploading 807 files to Google Cloud Storage =

Task :core:appengineDeploy

============================================================

File upload done. Updating service [default]... .................................................................done. Setting traffic split for service [default]... ................................................................done. Deployed service [default] to [https://CENSORED.appspot.com]

You can stream logs from the command line by running: $ gcloud app logs tail -s default

To view your application in the web browser run: $ gcloud app browse

BUILD SUCCESSFUL in 14m 23s 11 actionable tasks: 10 executed, 1 up-to-date 07:04:35: Task execution finished 'appengineDeploy'.

The build took 14 minutes! That is just crazy.

loosebazooka commented 5 years ago

Yeah, that's kind of the consequence of auto updating: See: https://github.com/GoogleCloudPlatform/app-gradle-plugin/blob/master/USER_GUIDE.md#tools on how to configure the cloud SDK to your liking.

chanseokoh commented 5 years ago

This is due to auto-updating Cloud SDK and this can be controlled as above. Closing.