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

SDIT-2488 Upgrade to Spring Boot 3.4.2 #350

Merged
merged 7 commits into from
Jan 24, 2025

Conversation

mikehalmamoj
Copy link
Contributor

No description provided.

Comment on lines 3 to 11
## Breaking changes

### ktlint

This Spring Boot release (3.4.2) breaks the ktlint Spring Boot Plugin as detailed in this issue: https://github.com/JLLeitschuh/ktlint-gradle/issues/809

To fix this we've upgraded the version of ktlint used to the lowest version that works around this bug. Unfortunately this has broken `ktlintCheck` on most projects.

Action required: run command `./gradlew ktlintFormat`
Copy link
Contributor Author

@mikehalmamoj mikehalmamoj Jan 24, 2025

Choose a reason for hiding this comment

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

As there is an action required by users I've gone to a new major version. I think this is appropriate but would appreciate feedback.

Comment on lines 9 to 11
// TODO The ktlint version applied by the ktlint plugin needs pinning to 1.4.1 to workaround this issue: https://github.com/JLLeitschuh/ktlint-gradle/issues/809
// TODO Once the issue is solved we should stop pinning the version and take the default version provided by the ktlint plugin
private const val KTLINT_VERSION = "1.4.1"
Copy link
Contributor Author

@mikehalmamoj mikehalmamoj Jan 24, 2025

Choose a reason for hiding this comment

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

This is the breaking change. I see that another HMPPS dev (@wood-n) had the same problem with a recent upgrade so I think I'm doing the right thing.

@@ -30,7 +30,7 @@ fun isNonStable(version: String): Boolean {
}

group = "uk.gov.justice.hmpps.gradle"
version = "6.1.2"
version = "7.0.0-beta"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As this is a breaking change I've decided to go for a beta version. I'm not sure this is totally necessary but the breaking change made me twitchy,.

build.gradle.kts Outdated
id("se.patrikerdes.use-latest-versions") version "0.2.18"
id("org.owasp.dependencycheck") version "8.4.3"
id("org.owasp.dependencycheck") version "12.0.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

I've been avoiding this upgrade as it requires API keys and a local caching strategy


### ktlint

This Spring Boot release (3.4.2) breaks the ktlint Spring Boot Plugin as detailed in this issue: https://github.com/JLLeitschuh/ktlint-gradle/issues/809
Copy link
Contributor

Choose a reason for hiding this comment

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

don't think this is the spring boot release, but more the upgrade to kotlin 2.1 - see JLLeitschuh/ktlint-gradle#815


This Spring Boot release (3.4.2) breaks the ktlint Spring Boot Plugin as detailed in this issue: https://github.com/JLLeitschuh/ktlint-gradle/issues/809

To fix this we've upgraded the version of ktlint used to the lowest version that works around this bug. Unfortunately this has broken `ktlintCheck` on most projects.
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't call ktlintCheck broken, more that it fails due to new formatting issues?

@@ -5,7 +5,7 @@ import org.gradle.api.tasks.Copy
import uk.gov.justice.digital.hmpps.gradle.ConfigManager

private const val APP_INSIGHTS_VERSION = "3.6.2"
const val OPENTELEMETRY_VERSION = "1.43.0"
const val OPENTELEMETRY_VERSION = "1.46.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

I've tended to keep this version the same as the version used by app insights - see https://github.com/microsoft/ApplicationInsights-Java/blob/3.6.2/dependencyManagement/build.gradle.kts#L14

Copy link
Contributor

@petergphillips petergphillips left a comment

Choose a reason for hiding this comment

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

LGTM

@mikehalmamoj mikehalmamoj merged commit 1d4a215 into main Jan 24, 2025
1 check passed
@mikehalmamoj mikehalmamoj deleted the mh-SDIT-2488-spring-boot-upgrade branch January 24, 2025 09:57
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.

2 participants