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

Update rest-backend and rest-lib-utils to SpringBoot 2.5.1 #167

Merged
merged 49 commits into from
Jun 16, 2021
Merged

Conversation

serenaponta
Copy link
Contributor

Update spring services from version 1.5.20 to 2.1.4

@serenaponta serenaponta changed the title Spring2 Update rest-backend and rest-lib-utils to Spring 2.1.4 Apr 23, 2019
@Naramsim Naramsim added the wip Work in progress - Don't merge label Jun 6, 2019
@serenaponta
Copy link
Contributor Author

serenaponta commented Jun 6, 2019

We cannot use a migration to fix the checksum as (of course) spring/flyway will not do anything (apply new migrations or create a baseline) if the validation does not go through.

I think the checksum issue may be caused by the fact that the latest flyway release does not support Postgres 11. They added support in flyway 6.0 but it only exists as a beta. On top of the fact that it's not recommended to use a beta in production, we cannot even test it as we get the same error of as "Spring Boot is not yet compatible with Flyway 6.0". As far as they say it will be once they release 6.0 (no beta).

As it does not make sense to downgrade postgres, i think we need to wait for the release of 6.0 to finally move to spring2.

@serenaponta serenaponta changed the title Update rest-backend and rest-lib-utils to Spring 2.1.4 Update rest-backend and rest-lib-utils to Spring 2.1.7 Aug 23, 2019
@serenaponta
Copy link
Contributor Author

In Spring2 the default for Id generator changed:
"The spring.jpa.hibernate.use-new-id-generator-mappings property is now true by default to align with the default behaviour of Hibernate. If you need to temporarily restore this now deprecated behaviour, set the property to false."

The new default was causing our test to run awfully slow (e.g. testGetAppVulnerabilitiesForBundledLibs was running for 14 minutes instead of 2), spending most of the time in the saving of the libraries whose debug showed calls to an hibernate sequence to get the next value.

For the time being we reverted to the configuration used in Spring 1.5 (false), we will need to investigate if the new default also causes conflicts with the existing data and how to migrate.

@serenaponta serenaponta removed the wip Work in progress - Don't merge label Jun 14, 2021
rest-backend/pom.xml Outdated Show resolved Hide resolved
rest-backend/pom.xml Outdated Show resolved Hide resolved
rest-lib-utils/pom.xml Outdated Show resolved Hide resolved
Copy link
Contributor

@henrikplate henrikplate left a comment

Choose a reason for hiding this comment

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

There are some unresolved merge conflicts in license headers + JavaDoc, and I suggest to delete some stuff rather than commenting it out

@serenaponta
Copy link
Contributor Author

Review comments are addressed

@serenaponta serenaponta changed the title Update rest-backend and rest-lib-utils to Spring 2.2.4 Update rest-backend and rest-lib-utils to Spring 2.5.1 Jun 16, 2021
@serenaponta serenaponta changed the title Update rest-backend and rest-lib-utils to Spring 2.5.1 Update rest-backend and rest-lib-utils to SpringBoot 2.5.1 Jun 16, 2021
Copy link
Contributor

@henrikplate henrikplate left a comment

Choose a reason for hiding this comment

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

Well done 👍

@henrikplate henrikplate merged commit 10e0c32 into master Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants