Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v7 #14178

Closed
5 tasks done
mraible opened this issue Mar 5, 2021 · 43 comments · Fixed by #14205
Closed
5 tasks done

Release v7 #14178

mraible opened this issue Mar 5, 2021 · 43 comments · Fixed by #14205
Labels
$$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ v7 $500 https://www.jhipster.tech/bug-bounties/
Projects
Milestone

Comments

@mraible
Copy link
Contributor

mraible commented Mar 5, 2021

Overview of the feature request

This ticket is to track the release of JHipster 7 final. Things I'm looking into:

Motivation for or Use Case

Quality

@MathieuAA MathieuAA added the v7 label Mar 5, 2021
@MathieuAA MathieuAA added this to To Do in v7 via automation Mar 5, 2021
@mraible
Copy link
Contributor Author

mraible commented Mar 5, 2021

I'll update this comment with the status as I address the issues above.

Update: Couchbased removed in #14186 so the first two are no longer an issue. The 3rd item is still an issue and also might have problems on Windows.

@mraible
Copy link
Contributor Author

mraible commented Mar 5, 2021

It'd be cool if we could clean this up at the end of jhipster jdl reactive-ms:

You can launch all your infrastructure by running : docker-compose up -d
Congratulations, JHipster execution is complete!
Sponsored with ❤️  by @oktadev.
INFO! Generator docker-compose child process exited with code 0
Congratulations, JHipster execution is complete!
Congratulations, JHipster execution is complete!

I think the following would be better:

You can launch all your infrastructure by running : docker-compose up -d
Congratulations, JHipster execution is complete!
Sponsored with ❤️  by @oktadev.

Definitely a stretch goal.

@mraible mraible added $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $500 https://www.jhipster.tech/bug-bounties/ labels Mar 5, 2021
@mraible
Copy link
Contributor Author

mraible commented Mar 5, 2021

Added a bug bounty so y'all can expense beers on Okta after the release. 😄

@mshima
Copy link
Member

mshima commented Mar 5, 2021

I'll update this comment with the status as I address the issues above.

  • ❌ ngx-couchbase EJS error with primary keys
  • ❌ webflux-couchbase same as above.
  • jhipster jdl reactive-ms fails with Protractor:
Screen Shot 2021-03-05 at 3 29 37 AM

I tried changing the gateway app to use Cypress and the errors still happen. I'm not sure why. I'll dig in tomorrow (Friday).

@mshima What are we doing wrong for primaryKey?

Not sure. I take a look.

@mshima
Copy link
Member

mshima commented Mar 5, 2021

@mraible fixed couchbase primaryKey reference in your mongodb branch. Realized later that mongodb branch was not couchbase 😆 .

I can setup an environment to test if there are more problems later.

edit:
Fixed the generation problem, but there is another problem

'dependencies.dependency.version' for com.couchbase.client:encryption:jar is missing. @ line 159, column 21

https://github.com/hipster-labs/jhipster-daily-builds/runs/2039400380?check_suite_focus=true

@mraible
Copy link
Contributor Author

mraible commented Mar 5, 2021

I just realized that Couchbase + Spring Boot 2.4 is still pending in this PR.

@pascalgrimaud
Copy link
Member

@mshima : should we add yeoman 5 in the list ?

@mshima
Copy link
Member

mshima commented Mar 5, 2021

@pascalgrimaud added. Hopefully I can finish the PR today.

@pascalgrimaud
Copy link
Member

Just crazy!

Ok so I won't do the final v7 release this weekend, so probably the next weekend, to give time to finish the last items here.
I can only do release saturday or sunday as I'm too busy with my day work at the moment.

@gzsombor
Copy link
Member

gzsombor commented Mar 5, 2021

Is it possible to create a release just from the JHipster-bom/framework? A 7.0.0-beta-2 or something like that? Currently, the generator use 7.0.0-SNAPSHOT dependency, which makes local testing a bit fragile.

@mraible
Copy link
Contributor Author

mraible commented Mar 5, 2021

I believe @jdubois might've fixed things so the SNAPSHOT build is published nightly.

@jdubois
Copy link
Member

jdubois commented Mar 5, 2021

It should work automatically but I didn't test -> please mention/contact me if you don't see the snapshots

@pascalgrimaud
Copy link
Member

Is it possible to create a release just from the JHipster-bom/framework? A 7.0.0-beta-2 or something like that? Currently, the generator use 7.0.0-SNAPSHOT dependency, which makes local testing a bit fragile.

@gzsombor : you need to do these steps

  • go into your local jhipster-bom (which should be a fork)
  • update your fork
  • mvn clean install -Dgpg.skip

It can be easily done with an alias. It took less than 15sec, if you decide to skip tests:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  13.389 s
[INFO] Finished at: 2021-03-06T09:46:34+01:00
[INFO] ------------------------------------------------------------------------

@pascalgrimaud
Copy link
Member

similar to improvement suggested by Matt, after generating full microservices applications, there are some changes, which are not correctly commit with git

@mshima
Copy link
Member

mshima commented Mar 6, 2021

@pascalgrimaud can you confirm if the changes are only json files?

@pascalgrimaud
Copy link
Member

Yes, package.json, package lock and yo rc, if I remember well

@mshima
Copy link
Member

mshima commented Mar 6, 2021

Yes, package.json, package lock and yo rc, if I remember well

I was digging into it to make sure it wasn't related to the generator5 update.
And saw that package.json changes is pretty big.
After a couple of hours on this, just realized the problem is prettier-plugin-packagejson version mismatch.
prettier-plugin-packagejson stopped sorting scripts due to a change at sort-package-json keithamus/sort-package-json#206.

So the generator generates using prettier-plugin-packagejson from generator-jhipster node_modules.
After generated and install, husky task executes prettier using prettier-plugin-packagejson from destination node_modules.
prettier-plugin-packagejson is not added the destination package.json, so the version from generator-jhipster@7.0.0.beta.1.

Including prettier-plugin-packagejson in the destination package.json may fix this issue for the package.json, yo-rc.json is a different.

@pascalgrimaud
Copy link
Member

I'm not sure for yo-rc as I'm not with my computer right now :-p
Nice catch anyway for package json

@mshima
Copy link
Member

mshima commented Mar 6, 2021

yo-rc.json is due to jdl writing it disc and generator doesn't change it, since it hasn't been changed, prettifier is not executed.
I will fix this.

@egvimo
Copy link
Contributor

egvimo commented Mar 7, 2021

Would you mind to release 7.0.0.beta.2 meanwhile? The milestone is on 100% and there are some fixes, which I really would like to migrate from the beta.1.

@mshima mshima mentioned this issue Mar 7, 2021
5 tasks
@mshima
Copy link
Member

mshima commented Mar 7, 2021

@pascalgrimaud even with the PR there will be a diff in .yo-rc.json. Docker-compose writes to it after it was committed to git.

v7 automation moved this from To Do to Done Mar 7, 2021
@pascalgrimaud
Copy link
Member

@mshima : no worry about yo rc, it's minor

@pascalgrimaud pascalgrimaud reopened this Mar 7, 2021
v7 automation moved this from Done to To Do Mar 7, 2021
@pascalgrimaud
Copy link
Member

@egvimo : the release beta.2 should be for the next week-end but I can't promise, as it's open source and we work for JHipster during our freetime. I'll do my best, just be patient :-)

@DanielFran
Copy link
Member

Added option to remove traefik support

@mraible
Copy link
Contributor Author

mraible commented Mar 11, 2021

Couchbase is removed so I'm only concerned with jhipster jdl reactive-ms and deploying it with k8s now.

@mraible
Copy link
Contributor Author

mraible commented Mar 18, 2021

I'm trying to deploy the reactive-ms stack on GCP with K8s now. When I run ./kubectl-apply.sh -f, I'm getting the following error:

Unable to connect to the server: dial tcp 35.233.152.164:443: i/o timeout

I was able to deploy my Docker images directly to my registry with commands like:

./gradlew bootJar -Pprod jib -Djib.to.image=gcr.io/ionic-social-286904/gateway

@mraible
Copy link
Contributor Author

mraible commented Mar 18, 2021

I was finally able to make things work after creating a new project and cluster. We might want to update our GCP docs with more detailed steps.

After running ./kubectl-apply.sh -f, things were looking good.

Applying default `kubectl apply -f`
configmap/application-config created
secret/registry-secret created
service/jhipster-registry created
statefulset.apps/jhipster-registry created
deployment.apps/blog created
persistentvolumeclaim/blog-neo4j-pvc created
secret/blog-neo4j created
statefulset.apps/blog-neo4j created
service/blog-neo4j created
service/blog created
deployment.apps/gateway created
persistentvolumeclaim/gateway-postgresql-pvc created
secret/gateway-postgresql created
deployment.apps/gateway-postgresql created
service/gateway-postgresql created
service/gateway created
deployment.apps/store created
configmap/store-mongodb-config created
configmap/store-mongodb-init created
statefulset.apps/store-mongodb created
service/store-mongodb created
service/store created

10 minutes later and it seems some containers failed to start.

$ kubectl get pods
NAME                                 READY   STATUS     RESTARTS   AGE
blog-69c885659-mjfs6                 0/1     Init:0/1   0          11m
blog-neo4j-0                         0/1     Pending    0          11m
gateway-d76f7bff6-9pc2g              0/1     Pending    0          11m
gateway-postgresql-f9bbb4b65-lp75b   0/1     Pending    0          11m
jhipster-registry-0                  1/1     Running    0          11m
jhipster-registry-1                  1/1     Running    0          11m
store-79fd4f88c4-9xbw8               0/1     Pending    0          11m
store-mongodb-0                      0/1     Pending    0          11m

Screenshot of workloads in Kubernetes Engine on GCP:

Screen Shot 2021-03-18 at 12 35 15 AM

Any ideas @saturnism?

@atomfrede
Copy link
Member

Can you check how the resource limits and requests are configured for blog-neo4j? Looks like the nodes are to small for the requested amount of memory or cpu.

@mraible
Copy link
Contributor Author

mraible commented Mar 18, 2021

Yes, I think that's it. I need to use better machines. Maybe I can specify the machine type when creating the cluster?

@pascalgrimaud
Copy link
Member

I was thinking we are closed to v7 but it seems a lot of things are broken - https://github.com/hipster-labs/jhipster-daily-builds
Need to wait before release v7...

@DanielFran
Copy link
Member

@pascalgrimaud I am confident the update to spring-boot 2.4.4 will fix it. It seems the issue started after I pushed the override of neo4j to 6.0.6...

@DanielFran
Copy link
Member

@pascalgrimaud In fact, looking now at the chronology of the merges, it might be that the issue started when it was merged #14365 or #14364

I already take a look and did not identify what could be the issue...

@mraible
Copy link
Contributor Author

mraible commented Mar 18, 2021

I tried creating a new cluster on GCP with bigger machines.

$ gcloud container clusters create jhipster \
--zone us-central1-a \
--machine-type n1-standard-4 \
--enable-autorepair \
--enable-autoupgrade

Then, I ran ./kubectl-apply.sh -f and deployed. For some reason, it seems there's an issue pulling my images.

$ kubectl get pods
NAME                                 READY   STATUS             RESTARTS   AGE
blog-69c885659-44phh                 0/1     ImagePullBackOff   0          14m
blog-neo4j-0                         1/1     Running            0          14m
gateway-d76f7bff6-jgwxb              0/1     ImagePullBackOff   0          14m
gateway-postgresql-f9bbb4b65-9r4k5   1/1     Running            0          14m
jhipster-registry-0                  1/1     Running            0          14m
jhipster-registry-1                  1/1     Running            0          14m
store-79fd4f88c4-cngjn               0/1     ImagePullBackOff   0          14m
store-mongodb-0                      1/1     Running            0          14m
store-mongodb-1                      1/1     Running            0          13m
store-mongodb-2                      1/1     Running            0          13m

I tried kubectl delete pod blog-69c885659-44phh (and others), then running ./kubectl-apply.sh -f again, but no luck. 🤷‍♂️

UPDATE:

Figured it out. When I ran jhipster k8s, I was pointing to my old project, which I've since deleted. kubectl describe pod blog-69c885659-wnwrt gave me the answer.

  Normal   Pulling    2m5s (x4 over 3m34s)  kubelet            Pulling image "gcr.io/ionic-social-286904/blog"
  Warning  Failed     2m5s (x4 over 3m34s)  kubelet            Failed to pull image "gcr.io/ionic-social-286904/blog": rpc error: code = Unknown desc = Error response from daemon: Get https://gcr.io/v2/ionic-social-286904/blog/manifests/latest: denied: Project ionic-social-286904 has been deleted.
  Warning  Failed     2m5s (x4 over 3m34s)  kubelet            Error: ErrImagePull
  Normal   BackOff    113s (x5 over 3m7s)   kubelet            Back-off pulling image "gcr.io/ionic-social-286904/blog"

I tried deleting pods and re-deploying, but that didn't work. Deleting and re-creating my cluster did.

@mshima
Copy link
Member

mshima commented Mar 18, 2021

The problem is with mysql, not sure if the driver or the docker image.
Every test that I've looked at has mysql server.

@DanielFran
Copy link
Member

Image has been updated 10 days ago, so it cannot be that.
I was thinking about the driver but did not found what commit would be the origin of the issue...

@mraible
Copy link
Contributor Author

mraible commented Mar 18, 2021

Does anyone know how to enable HTTPS on my apps that are deployed to GCP? I have everything running, but it's all over HTTP, which won't work with Okta.

@mshima
Copy link
Member

mshima commented Mar 18, 2021

@DanielFran I've triggered an old commit that succeed and if failed with the same error.
It should be related to jhipster-bom or an outside problem.

@mraible
Copy link
Contributor Author

mraible commented Mar 18, 2021

I figured out how to do HTTPS for my K8s cluster with @saturnism's external load balancing guide. Now that I've deployed everything successfully, I'm 👍 for releasing JHipster 7!

Of course, I created my apps last night, so recent changes might've broken things. :)

@pascalgrimaud
Copy link
Member

Ok, I'll ask a code freeze in the mailing list so let few days for daily builds

@mraible
Copy link
Contributor Author

mraible commented Mar 19, 2021

I was able to get HTTP -> HTTPS working on my K8s cluster using the following code.

// Force HTTPS
http.redirectToHttps(redirect -> redirect
    .httpsRedirectWhen(e -> e.getRequest().getHeaders().containsKey("X-Forwarded-Proto"))
);

@atomfrede
Copy link
Member

Thanks @pascalgrimaud and everyone of the team. It's a pleasure to work with you! When will we have our virtual drink? 🍻 😁

@pascalgrimaud
Copy link
Member

We should organize it, and discuss about v8 :-)

@pascalgrimaud pascalgrimaud added this to the v7.0.1 milestone Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
$$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ v7 $500 https://www.jhipster.tech/bug-bounties/
Projects
No open projects
v7
  
To Do
Development

Successfully merging a pull request may close this issue.

9 participants