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

Development: Upgrade to Spring Boot 3, Spring 6, Hibernate 6 #7719

Merged
merged 182 commits into from
Mar 27, 2024

Conversation

julian-christl
Copy link
Member

@julian-christl julian-christl commented Dec 4, 2023

This is a high priority PR and we would like to merge it into develop until end of March. Please help with testing and reviewing!

Changelog

SQL Dialects

  • Removal of the PostgreSQL10Dialect. Replace the dialect in your config with the PostgreSQLDialect of of the same package.
  • Removal of the MySQL8Dialect. Replace the dialect in your config with the MySQLDialect of the same package.

Configuration

hibernate.dialect is deprecated and can be removed. The specified JDBC URL will select the dialect

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) database calls.
  • I strictly followed the server coding and design guidelines.
  • I documented the Java code using JavaDoc style.

Changes affecting Programming Exercises

  • High priority: I tested all changes and their related features with all corresponding user types on a test server configured with the integrated lifecycle setup (LocalVC and LocalCI).
  • I tested all changes and their related features with all corresponding user types on a test server configured with Gitlab and Jenkins.

Motivation and Context

Upgrading Spring Boot to major version 3

Description

  • Updated Spring Boot to v3.x.x, Spring Security to v6.x.x and Hibernate to v6.x.x
  • Updated multiple other dependencies that were blocked by this upgrade to their latest version
  • Replaced javax imports with jakarta imports
  • Added own derived Spring Security LTI 1.3 library as the original does not support Jakarta yet and hence creates conflicts
  • Replaced removed IMPLICIT OAuth grant type with AUTHORIZATION_CODE
  • Added own jGit HTTP server by copying the original code into our code base and replacing the javax imports
  • Replaced deprecated database configurations
  • Implemented our own EurekaClientRestTemplateConfiguration to keep Hazelcast working after the upgrade (A different template gets used as default in the new version, and this causes problems)
  • Revert the stack trace parsing to the current state as the upgrade changes the default style
  • Replace the deprecated security configurations with the recommended updated versions
  • Replace ClientForwardResource with SpaWebFilter, doing the same job earlier in the request processing
  • Removed support for filtering by courses when retrieving users. As it caused issues during the upgrade process. We added a flag to return users that have no user groups instead
    • If you use the later feature for bulk deletions of unused users, you may have to clean up first by removing all relations that use outdated user groups (e.g. DELETE FROM user_groups g WHERE NOT EXISTS (SELECT * FROM course c WHERE c.student_group_name = g OR c.teaching_assistant_group_name = g OR c.editor_group_name OR c.instructor_group_name);)
  • Reimplemented Iris save message functionality as the entity relations caused issues during the upgrade. Due to issues in Spring Boot 2.x.x with this implementation, we did not extract these changes
  • Made sure that non-existent resources return an HTTP 404 instead of a server error
  • Updated further smaller deprecations

Steps for Testing

The whole application requires testing. Please refer to your specific testing instructions during a testing session or pick an area of your choosing and investigate it.

Exam Mode Testing

The whole application requires testing. Please refer to your specific testing instructions during a testing session or pick an area of your choosing and investigate it.

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked







Review Progress

Performance Review

  • I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2
  • Test 3
  • Test 4

Exam Mode Test

  • Test 1
  • Test 2
  • Test 3
  • Test 4

Test Coverage

Omitted. No real functional changes and listing the test results for all files touched would take ages. It's a unique PR and hence reasonable.

Stephan Krusche and others added 30 commits October 8, 2023 17:14
# Conflicts:
#	src/main/java/de/tum/in/www1/artemis/domain/quiz/DragAndDropQuestion.java
#	src/test/java/de/tum/in/www1/artemis/service/programming/ProgrammingExerciseFeedbackCreationServiceTest.java
- join column defined in collection table
- element collection always cascading
@dfuchss
Copy link
Contributor

dfuchss commented Mar 26, 2024

See #8256 . We need to retrieve all users that belong to no course because we have to delete them on a regular basis.

Copy link
Contributor

@reschandreas reschandreas left a comment

Choose a reason for hiding this comment

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

I have some questions, see my comments. it would be nice if you could directly remove the star imports instead of renaming them, as we agreed in the dev team that we don't want to use them anymore.

@julian-christl
Copy link
Member Author

See #8256 . We need to retrieve all users that belong to no course because we have to delete them on a regular basis.

As discussed in the issue, I readded the capability to get users that have no user group. I also updated the description accordingly. However, implementing this in the client is out of scope for this PR.

@julian-christl
Copy link
Member Author

@reschandreas As discussed via DMs, I'd like to not include larger import changes in this PR to prevent bloating. We can do this in another PR.

Copy link
Member

@bassner bassner left a comment

Choose a reason for hiding this comment

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

@krusche krusche merged commit 9dfe7bf into develop Mar 27, 2024
23 of 32 checks passed
@krusche krusche deleted the chore/spring-boot-3.x branch March 27, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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!) docker documentation no-stale priority:high ready for review server Pull requests that update Java code. (Added Automatically!) tests too-long-open !!! This is an antipattern, we should aim for small PRs that are only open for a short time !!!
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.