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

Upgrade to Spring Boot 3.2.0-RC2 #4850

Merged

Conversation

JohnNiang
Copy link
Member

@JohnNiang JohnNiang commented Nov 13, 2023

What type of PR is this?

/kind cleanup
/area core
/milestone 2.11.x

What this PR does / why we need it:

  • Upgrade to Spring Boot 3.2.0-RC2.
  • Fix unit test errors due to upgrading.

See https://github.com/spring-projects/spring-boot/releases/tag/v3.2.0-RC2 for more.

Does this PR introduce a user-facing change?

Anyone who is using H2 database and wants to upgrade this version has to backup and restore Halo or upgrade old h2 database file manually.

[Action Required] 升级 Spring Boot 至 3.2.0-RC2

@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Nov 13, 2023
@f2c-ci-robot f2c-ci-robot bot added this to the 2.11.x milestone Nov 13, 2023
@f2c-ci-robot f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Nov 13, 2023
Copy link

codecov bot commented Nov 13, 2023

Codecov Report

Merging #4850 (7c32715) into main (7040299) will increase coverage by 0.00%.
The diff coverage is 94.11%.

@@            Coverage Diff            @@
##               main    #4850   +/-   ##
=========================================
  Coverage     61.54%   61.55%           
  Complexity     2810     2810           
=========================================
  Files           406      406           
  Lines         14819    14822    +3     
  Branches       1030     1030           
=========================================
+ Hits           9120     9123    +3     
  Misses         5203     5203           
  Partials        496      496           
Files Coverage Δ
...ava/run/halo/app/content/comment/ReplyService.java 100.00% <100.00%> (ø)
...me/finders/impl/CommentPublicQueryServiceImpl.java 89.78% <93.75%> (+0.22%) ⬆️

@JohnNiang
Copy link
Member Author

/hold

The upgrade seems to have damaged the h2 database.

Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: Unsupported database file version or invalid file header in file "/Users/johnniang/halo2-dev/db/halo-next.mv.db" [90048-224]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:690) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.message.DbException.get(DbException.java:212) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.mvstore.db.Store.convertMVStoreException(Store.java:158) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.mvstore.db.Store.<init>(Store.java:142) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.engine.Database.<init>(Database.java:326) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.engine.Engine.openSession(Engine.java:92) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.engine.Engine.openSession(Engine.java:222) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.engine.Engine.createSession(Engine.java:201) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) ~[h2-2.2.224.jar:2.2.224]

@f2c-ci-robot f2c-ci-robot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 13, 2023
@JohnNiang
Copy link
Member Author

JohnNiang commented Nov 13, 2023

/hold

The upgrade seems to have damaged the h2 database.

Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: Unsupported database file version or invalid file header in file "/Users/johnniang/halo2-dev/db/halo-next.mv.db" [90048-224]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:690) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.message.DbException.get(DbException.java:212) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.mvstore.db.Store.convertMVStoreException(Store.java:158) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.mvstore.db.Store.<init>(Store.java:142) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.engine.Database.<init>(Database.java:326) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.engine.Engine.openSession(Engine.java:92) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.engine.Engine.openSession(Engine.java:222) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.engine.Engine.createSession(Engine.java:201) ~[h2-2.2.224.jar:2.2.224]
	at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343) ~[h2-2.2.224.jar:2.2.224]

/unhold

Due to incompatibility between H2 2.2.224 and H2 2.1.214, we need to backup Halo, clean the working directory, restart Halo and restore data. Or just upgrade old H2 data. See h2database/h2database#3903 for more.

@f2c-ci-robot f2c-ci-robot bot added release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Nov 13, 2023
Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Nov 13, 2023
Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

f2c-ci-robot bot commented Nov 13, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 13, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit 65a7e97 into halo-dev:main Nov 13, 2023
4 checks passed
@JohnNiang JohnNiang deleted the chore/upgrade-to-springboot-3.2.0-rc2 branch November 13, 2023 09:44
@JohnNiang
Copy link
Member Author

I'm sorry for upgrading to Spring Boot 3.2.0-RC2 without testing with Halo Docker container.

After merge, we will get the following error while running Halo Docker container:

Error: Could not find or load main class org.springframework.boot.loader.JarLauncher
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.loader.JarLauncher

I will raise another PR to fix the error. See https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2.0-RC1-Release-Notes#nested-jar-support for more.

f2c-ci-robot bot pushed a commit that referenced this pull request Nov 16, 2023
…4859)

#### What type of PR is this?

/kind bug
/area core

#### What this PR does / why we need it:

See #4850 (comment) for more.

Test steps:

```bash
make -C console build
./gradlew clean build -x check
docker build -t halo:not-find-main-class .
docker run -it --rm -p 8090:8090 -v ~/.halo2:/root/.halo2 halo:not-find-main-class
```

#### Does this PR introduce a user-facing change?

```release-note
None
```
@ruibaby ruibaby modified the milestones: 2.11.x, 2.11.0 Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants