Generator-jhipster: Add Java11 support to Google App Engine Generator

Created on 8 Aug 2019  路  11Comments  路  Source: jhipster/generator-jhipster

Overview of the feature request

Currently the GAE generator can generate deployment files for java 8 (https://cloud.google.com/appengine/docs/standard/java/runtime). However starting recently GAE supports java 11 (https://cloud.google.com/appengine/docs/standard/java/runtime). I suggest we develop a branch of our GAE generator to support java 11. My idea is to initially give the user a choice of choosing between java 8 and 11 and generate the files based on the choice.

On another note it is possible to run our jhipster project on java 11 on GAE standard as I've done on >>this<< project. The only things we need is to remove the appengine-web.xml and add a app.yml. Complete migration summary is given here; https://cloud.google.com/appengine/docs/standard/java11/java-differences

If this is something useful, I can help with doing the PR for this. Do we need to fix the current GAE generator before attempting this?

Motivation for or Use Case

jhipster supports java 11 and recently we migrated the Travis build process to java 11 as well (https://github.com/jhipster/generator-jhipster/pull/10175), it seems obvious that we need to add support for java 11 GAE generators at some point.

Related issues or PR

10175, #9605

  • [x] Checking this box is mandatory (this is just to show you read everything)
$$ bug-bounty $$ $100 area GCP

Most helpful comment

@pascalgrimaud @PierreBesson : I've created a pull request for this as well (https://github.com/jhipster/generator-jhipster/pull/10216). If you guys have any questions or issues feel free to let me know 馃槃

All 11 comments

Do we need to fix the current GAE generator before attempting this?

I think we should.

About maintaining Java8, I wonder if we should. I'd prefer to focus on Java11 but it's just my opinion

Let's drop support for java 8, especially because it requires to package the app as war. We would be really pleased to receive a PR from you for this !

@PierreBesson @pascalgrimaud : I've created a quick fix for the GAE Java 8 generator (https://github.com/jhipster/generator-jhipster/pull/10210). I also have a branch in my fork for GAE Java 11 as well (https://github.com/SudharakaP/generator-jhipster/tree/java11-gae-upgrade). I can merge this one which will drop support for GAE Java 8.

I was thinking to make some further improvements on this branch (for Java 11) to enhance the GAE generator. For example currently the GAE generator seems to force the user to create a Cloud SQL instance. This in my opinion should be given as a choice to the user. What do you think?

@SudharakaP : I'm not a GCP expert. If the user doesn't create the Cloud SQL, what is the alternative ? Will it still work out of the box ?

@pascalgrimaud : Yes, for example the user can connect to any other external database. For example one can host the db on Google Compute Engine instance (if he/she loves hosting it in Google infrastructure) or he can host it in any other cloud service provider. Cloud SQL only supports MySQL and PostgreSQL (https://cloud.google.com/sql/docs/) type databases. So if a user wants any other type of database they cannot use Cloud SQL.

We have a project where we use GAE with Mongo Atlas. There's no reason to create Cloud SQL instances when you do the deployment.

Good to know. Thanks for the explanation @SudharakaP
So yes, let's add 1 more question about Cloud SQL in the sub generator GAE, with default to yes, as what we currently have

@pascalgrimaud : Wonderful. Let me work on that. Probably this week, I'll do another pull request with the upgrade to Java 11. Just to be clear this will remove support for Java 8, which means that once this is merged the generator will create the configs as per Java 11 specification.

Or do we need to give a choice for the user to choose between Java 11 and Java 8?

@pascalgrimaud @PierreBesson : I've created a pull request for this as well (https://github.com/jhipster/generator-jhipster/pull/10216). If you guys have any questions or issues feel free to let me know 馃槃

@pascalgrimaud I think this issue should have a bug bounty to reward @SudharakaP's hard work.

@PierreBesson : agree with you

@SudharakaP : just added the bounty, can you claim it ?

@pascalgrimaud : Thanks much; claimed at https://opencollective.com/generator-jhipster/expenses/10081 :smile:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ahmedeldeeb25 picture ahmedeldeeb25  路  3Comments

kaidohallik picture kaidohallik  路  3Comments

frantzynicolas picture frantzynicolas  路  3Comments

DanielFran picture DanielFran  路  3Comments

DanielFran picture DanielFran  路  3Comments