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

Am 702 #2846

Merged
merged 26 commits into from
Aug 10, 2023
Merged

Am 702 #2846

merged 26 commits into from
Aug 10, 2023

Conversation

leleueri
Copy link
Contributor

@leleueri leleueri commented Aug 7, 2023

Fix AM-702

Description

This PR upgrade AM to use the latest gravitee-bom & gravitee-parent.
It is by extension the migration to Spring 6.

This PR is split in different commit, to track the different changes made along the issues we meet during this migration.

Main impacts / changes:

  • Now AM is compiled using Java 17
  • Spring & vertx upgrade
  • Upgrade of spring data & R2DBC
  • Now R2DB driver must be compatible with the R2DBC-SPI 1.0
  • The default connection pool settings for R2DBC have been changed

How to test

please run the full non regression pack on nightly env (Mongo & JDBC one)

Documentation inputs

⚠️ This PR will introduce a Breaking change for AM 4.1 and need to be highlighted properly.

  • First starting from this PR, AM 4.1 will required Java 17 as runtime
  • The version of the R2DBC drivers must be compatible with the R2DBC-SPI 1.0 (basically, the driver version must start with 1.x see below ⬇️ )
  • The default values for RDMS connection pool have change as with the latest version of R2DBC a timeout set to 0 doesn't mean infinite anymore, we take this opportunity to change the default timeout values but also some connection pool size values. Here is the new values:
    initialSize: 1
    maxSize: 50
    maxIdleTime: 30000
    maxLifeTime: -1
    maxAcquireTime: 3000
    maxCreateConnectionTime: 5000

For information, previous values were:

    initialSize: 0
    maxSize: 10
    maxIdleTime: 30000
    maxLifeTime: 0 # not valid anymore with R2BC 1.x
    maxAcquireTime: 0 # not valid anymore with R2BC 1.x
    maxCreateConnectionTime: 0 # not valid anymore with R2BC 1.x

Here is the versions we used for the R2DBC drivers
postgresql : 1.0.2.RELEASE
mariadb: 1.1.2
mysql: 1.0.2
mssql : 1.0.0.RELEASE

WARNING ⚠️ DO NOT use the 1.0.2.RELEASE for mssql / SQLServer as this version seems to be buggy (see r2dbc/r2dbc-mssql#276)

Note: could be nice to have the new default settings and the R2DBC driver version in the Repository page

@leleueri leleueri requested a review from a team as a code owner August 7, 2023 17:07
Copy link
Contributor

@mariano-fernandez mariano-fernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just finished commit 4 so far 😅
I'll pick up from there later

@leleueri leleueri force-pushed the AM-702 branch 4 times, most recently from 6e79d66 to c3db1e8 Compare August 9, 2023 08:15
remisultan and others added 24 commits August 9, 2023 11:53
…assertEmpty.

  This will avoid flaky tests and more importantly really test what we want as a behaviour
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 9, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

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

2.8% 2.8% Coverage
0.5% 0.5% Duplication

warning The version of Java (11.0.17) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

Copy link
Contributor

@mariano-fernandez mariano-fernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I stopped half way. It's hard to review this upgrades. Since there aren't any functional improvements, in my opinion if the CI is green, we can merge.

There will be a full regression pack to make sure that we didn't miss anything else.

@leleueri leleueri merged commit d58c6ff into master Aug 10, 2023
@leleueri leleueri deleted the AM-702 branch August 10, 2023 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants