Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Leverage quarkus features #764

Merged
merged 5 commits into from Jul 12, 2023
Merged

Leverage quarkus features #764

merged 5 commits into from Jul 12, 2023

Conversation

lburgazzoli
Copy link
Contributor

@lburgazzoli lburgazzoli commented Jul 11, 2023

This PR is aimed to leverage some quarkus native features such as:

  • Quarkus Main: to be able to run the quarkus application from the IDE
  • Quarkus Health Checks: to provide information about the application state to external systems such as k8s
  • Quarkus Container Image builder: to easilly create container images straight from Quarkus

For what concern container images, it is now possible to create container images from maven, as example by running the following commands:

➜  ./mwnw clean install -Pcontainer-image
➜  ./mwnw clean install -Pcontainer-image -Dnative

We generates the following container images:

REPOSITORY                 TAG                             IMAGE ID       CREATED         SIZE
kaotoio/backend            latest-jvm-x86_64               f7d1ed81bb8c   3 minutes ago   480MB
kaotoio/backend            quarkus-7e23aba-jvm-x86_64      f7d1ed81bb8c   3 minutes ago   480MB
kaotoio/backend            latest-native-x86_64            4d4b4062498e   6 minutes ago   249MB
kaotoio/backend            quarkus-7e23aba-native-x86_64   4d4b4062498e   6 minutes ago   249MB

Note that, the build of native image does not require anymore to have GraalVM installed on the local machine as the build happens inside a container which and would automatically use the right GraalVM according to the Quarkus version.

Everything is configured by a dedicated profile so it should not change the current behavior, however, by leveraging those new profiles, we could simplify the CI/CD pipeline and make it very symmetric to the local dev experience.

WDYT ?

@lburgazzoli lburgazzoli requested a review from a team July 11, 2023 13:35
@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Merging #764 (be5062b) into main (bc60efd) will increase coverage by 0.12%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main     #764      +/-   ##
============================================
+ Coverage     78.75%   78.88%   +0.12%     
  Complexity      159      159              
============================================
  Files            54       54              
  Lines          2980     3064      +84     
  Branches        506      534      +28     
============================================
+ Hits           2347     2417      +70     
- Misses          421      424       +3     
- Partials        212      223      +11     

see 11 files with indirect coverage changes

@Delawen
Copy link
Member

Delawen commented Jul 11, 2023

Wow, so easy to add health checks? 🥳

@lburgazzoli lburgazzoli force-pushed the quarkus branch 2 times, most recently from 7ae4f8c to b9ec093 Compare July 11, 2023 15:13
@lburgazzoli
Copy link
Contributor Author

lburgazzoli commented Jul 12, 2023

  • sonar security checks do no seem right to me as the user with id 185 must access the directory and libs and that's what quarkus generates
  • codecov failures seems to be really useless as really, do we have to provide tests for a main method ?

@Delawen @igarashitm is there a way to tweak the sonar and codecov ?

@Delawen
Copy link
Member

Delawen commented Jul 12, 2023

About codecov, I can't push this directly to your repo, but this should fix it: lburgazzoli#1

@sonarcloud
Copy link

sonarcloud bot commented Jul 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
2.2% 2.2% Duplication

@igarashitm igarashitm merged commit 8132757 into KaotoIO:main Jul 12, 2023
18 checks passed
@lburgazzoli lburgazzoli deleted the quarkus branch July 12, 2023 12:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants