Skip to content

Development: Update server dependencies to Spring Boot 3, Spring Framework 6, Spring Cloud 4, Hibernate 6 #5889

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

Closed
wants to merge 149 commits into from

Conversation

krusche
Copy link
Member

@krusche krusche commented Nov 26, 2022

CURRENTLY BLOCKED

Checklist

Motivation and Context

We should stay up to date.

Description

Steps for Testing

  1. Developers should test the development setup, starting the server and client application and communicating
  2. Testers should click through most views of the Artemis application and review if you notice issues while testing different CRUD functionality

Review Progress

Test Coverage

no changes

Screenshots

no UI changes

@krusche krusche added this to the 6.0.0 milestone Nov 26, 2022
@github-actions github-actions bot added documentation server Pull requests that update Java code. (Added Automatically!) tests labels Nov 26, 2022
@codecov-commenter
Copy link

codecov-commenter commented Nov 26, 2022

Codecov Report

Base: 84.60% // Head: 75.69% // Decreases project coverage by -8.90% ⚠️

Coverage data is based on head (0b3e187) compared to base (0bed62a).
Patch has no changes to coverable lines.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #5889      +/-   ##
=============================================
- Coverage      84.60%   75.69%   -8.91%     
=============================================
  Files           1008     1117     +109     
  Lines          39965    44297    +4332     
  Branches        4273     8363    +4090     
=============================================
- Hits           33811    33530     -281     
- Misses          3792     5599    +1807     
- Partials        2362     5168    +2806     
Flag Coverage Δ
client 75.69% <ø> (?)
server ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...c/main/java/de/tum/in/www1/artemis/ArtemisApp.java
...e/tum/in/www1/artemis/config/ApiVersionFilter.java
...tum/in/www1/artemis/config/CacheConfiguration.java
...m/in/www1/artemis/config/JacksonConfiguration.java
...in/www1/artemis/config/LiquibaseConfiguration.java
...ava/de/tum/in/www1/artemis/config/MetricsBean.java
...1/artemis/config/PublicResourcesConfiguration.java
...www1/artemis/config/RestTemplateConfiguration.java
...tum/in/www1/artemis/config/SAML2Configuration.java
...de/tum/in/www1/artemis/config/SAML2Properties.java
... and 2113 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Nov 26, 2022
@krusche krusche added dependencies Pull requests that update a dependency file chore config-change Pull requests that change the config in a way that they require a deployment via Ansible. and removed client Pull requests that update TypeScript code. (Added Automatically!) labels Nov 26, 2022
@b-fein
Copy link
Contributor

b-fein commented Nov 26, 2022

Fails to start with the gitlab profile:

org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'artemisInternalAuthenticationProvider' defined in URL [jar:file:/opt/artemis/Artemis.war!/WEB-INF/classes!/de/tum/in/www1/artemis/security/ArtemisInternalAuthenticationProvider.class]:
Unsatisfied dependency expressed through constructor parameter 2:
Error creating bean with name 'userCreationService' defined in URL [jar:file:/opt/artemis/Artemis.war!/WEB-INF/classes!/de/tum/in/www1/artemis/service/user/UserCreationService.class]:
Unsatisfied dependency expressed through constructor parameter 4:
Error creating bean with name 'gitLabUserManagementService' defined in URL [jar:file:/opt/artemis/Artemis.war!/WEB-INF/classes!/de/tum/in/www1/artemis/service/connectors/gitlab/GitLabUserManagementService.class]:
Unsatisfied dependency expressed through constructor parameter 1:
Error creating bean with name 'gitLabApi' defined in class path resource [de/tum/in/www1/artemis/config/connector/GitLabApiConfiguration.class]:
Failed to instantiate [org.gitlab4j.api.GitLabApi]:
Factory method 'gitLabApi' threw exception with message: javax/annotation/Priority

Used in the gitlab4j-library here:
https://github.com/gitlab4j/gitlab4j-api/blob/db8f9254c7b42c68522826318821be8d7bb8b075/src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java#L22

Related: gitlab4j/gitlab4j-api#841

Edit: I’ve prepared a gitlab api jar https://github.com/b-fein/gitlab4j-api/packages/1733022 (Assets > gitlab4j-api-5.0.2.jar) that uses jakarta. Not yet tested: Can probably be included by storing that in lib/ and in build.gradle: implementation files("lib/gitlab4j-api-5.0.2.jar").

@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Nov 26, 2022
@b-fein b-fein force-pushed the chore/spring-boot-3 branch from e68d6c5 to 8dd2fa7 Compare November 26, 2022 17:11
Comment on lines 8 to 17
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

import jakarta.servlet.*;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

Copy link
Contributor

@Strohgelaender Strohgelaender Nov 26, 2022

Choose a reason for hiding this comment

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

This PR contains a lot of import-order changes like here. Are these on purpose?

Copy link
Contributor

Choose a reason for hiding this comment

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

artemis-spotless.importorder probably needs to be adapted if the renamed dependencies should be placed in their own imports section like before.

Copy link
Contributor

Choose a reason for hiding this comment

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

Currently, javax has its own special case here. It would be interesting to know if this was due to the similar name to java or if these imports should generally stay on top. In the case of 2) we should probably adapt the file.
grafik

@krusche
Copy link
Member Author

krusche commented Nov 26, 2022

Fails to start with the gitlab profile:

org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'artemisInternalAuthenticationProvider' defined in URL [jar:file:/opt/artemis/Artemis.war!/WEB-INF/classes!/de/tum/in/www1/artemis/security/ArtemisInternalAuthenticationProvider.class]:
Unsatisfied dependency expressed through constructor parameter 2:
Error creating bean with name 'userCreationService' defined in URL [jar:file:/opt/artemis/Artemis.war!/WEB-INF/classes!/de/tum/in/www1/artemis/service/user/UserCreationService.class]:
Unsatisfied dependency expressed through constructor parameter 4:
Error creating bean with name 'gitLabUserManagementService' defined in URL [jar:file:/opt/artemis/Artemis.war!/WEB-INF/classes!/de/tum/in/www1/artemis/service/connectors/gitlab/GitLabUserManagementService.class]:
Unsatisfied dependency expressed through constructor parameter 1:
Error creating bean with name 'gitLabApi' defined in class path resource [de/tum/in/www1/artemis/config/connector/GitLabApiConfiguration.class]:
Failed to instantiate [org.gitlab4j.api.GitLabApi]:
Factory method 'gitLabApi' threw exception with message: javax/annotation/Priority

Used in the gitlab4j-library here: https://github.com/gitlab4j/gitlab4j-api/blob/db8f9254c7b42c68522826318821be8d7bb8b075/src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java#L22

Related: gitlab4j/gitlab4j-api#841

Edit: I’ve prepared a gitlab api jar https://github.com/b-fein/gitlab4j-api/packages/1733022 (Assets > gitlab4j-api-5.0.2.jar) that uses jakarta. Not yet tested: Can probably be included by storing that in lib/ and in build.gradle: implementation files("lib/gitlab4j-api-5.0.2.jar").

Yes, this could be a good temporary solution until gitlab4j provides their own release.
How did you create the new jar? (I saw some tools which can do that but did not try them out yet)
We have a similar problem with org.imsglobal:basiclti-util:1.2.0
Any chance you could create a Jakarta compatible jar here as well? :-)

@b-fein
Copy link
Contributor

b-fein commented Nov 26, 2022

How did you create the new jar?

In this case just changing the dependencies and then a search-and-replace: s/javax/jakarta/g https://github.com/b-fein/gitlab4j-api/commit/4299525969b9d067dcb50d48086eea3a719ee10b

@krusche
Copy link
Member Author

krusche commented Jan 9, 2023

Great, thank you 👍🏻 these are good news.

At the moment I am not happy yet with some Hibernate 6 issues related to quizzes and the second level cache. This might delay the integration of this PR for a couple of weeks, except someone could help me fixing those issues.

In addition, we would need to get the e2e tests running successfully again and need extensive manual testing

@krusche krusche modified the milestones: 6.0.0, 6.1.0 Jan 11, 2023
@github-actions
Copy link

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

@krusche krusche mentioned this pull request Jan 25, 2023
13 tasks
@krusche
Copy link
Member Author

krusche commented Jan 26, 2023

Currently blocked by bugs in Hibernate 6.1.6, which will hopefully be resolved in the near future (either 6.1.7 or 6.2.0)

@ge65cer
Copy link
Contributor

ge65cer commented Feb 15, 2023

@krusche Hibernate Core 6.1.7 has been released, might be worthwhile to check if the bugs are fixed.

@krusche krusche modified the milestones: 6.1.0, 6.2.0 Mar 4, 2023
Comment on lines +185 to +195
// Note: gitlab4j-api does not work with jakarta yet, so we built our own custom version and declare its transitive dependencies below
// implementation "org.gitlab4j:gitlab4j-api:5.0.1"
implementation files("lib/gitlab4j-api-5.0.2.jar")
// The following 5 + 2 dependencies are explicitly integrated as transitive dependencies of gitlab4j-api-5.0.2.jar
implementation "org.glassfish.jersey.inject:jersey-hk2:${jersey_version}"
implementation "org.glassfish.jersey.core:jersey-client:${jersey_version}"
implementation "org.glassfish.jersey.connectors:jersey-apache-connector:${jersey_version}"
implementation "org.glassfish.jersey.media:jersey-media-multipart:${jersey_version}"
implementation "org.glassfish.jersey.media:jersey-media-json-jackson:${jersey_version}"
implementation "jakarta.activation:jakarta.activation-api:${activation_version}"
implementation "jakarta.platform:jakarta.jakartaee-api:${jakartaee_version}"
Copy link
Member

Choose a reason for hiding this comment

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

@krusche krusche removed this from the 6.2.2 milestone Jun 11, 2023
@krusche
Copy link
Member Author

krusche commented Jun 14, 2023

I will close this PR for now, because we are still blocked by issues with the breaking changes in Hibernate.

@krusche krusche closed this Jun 14, 2023
@julian-christl julian-christl deleted the chore/spring-boot-3 branch March 27, 2024 16:40
@julian-christl julian-christl restored the chore/spring-boot-3 branch March 27, 2024 21:12
@krusche krusche deleted the chore/spring-boot-3 branch April 28, 2024 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked chore client Pull requests that update TypeScript code. (Added Automatically!) config-change Pull requests that change the config in a way that they require a deployment via Ansible. cypress Pull requests that update cypress tests. (Added Automatically!) dependencies Pull requests that update a dependency file documentation no-stale server Pull requests that update Java code. (Added Automatically!) tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants