Skip to content

Commit

Permalink
PI-1705 upgrade to java 21 (#2858)
Browse files Browse the repository at this point in the history
* PI-1705 upgrade to java 21

* update github actions to use java 21
  • Loading branch information
anthony-britton-moj authored Dec 4, 2023
1 parent c7f50a3 commit 5482378
Show file tree
Hide file tree
Showing 51 changed files with 56 additions and 100 deletions.
2 changes: 1 addition & 1 deletion .github/actions/analyse/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ runs:
- uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'

- name: Sonar analysis
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
- uses: gradle/gradle-build-action@v2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
- uses: actions/setup-java@v3
if: startsWith(steps.check_config.outputs.api_path, 'http')
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
- uses: gradle/gradle-build-action@v2 # enables caching
if: startsWith(steps.check_config.outputs.api_path, 'http')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
- name: Setup GPG commit verification
uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # v6.0.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: 17
java-version: 21
distribution: temurin

- name: Build jars
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'

- name: Render project template
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ allprojects {

tasks {
withType<JavaCompile> {
sourceCompatibility = "17"
sourceCompatibility = "21"
}

withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "17"
jvmTarget = "21"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class JibConfigPlugin : Plugin<Project> {
user = "2000:2000"
}
from {
image = System.getenv("JIB_FROM_IMAGE") ?: "eclipse-temurin:17-jre-alpine"
image = System.getenv("JIB_FROM_IMAGE") ?: "eclipse-temurin:21-jre-alpine"
}
to {
image = "ghcr.io/ministryofjustice/hmpps-probation-integration-services/${project.name}"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spring:
provider:
hmpps-auth:
token-uri: http://localhost:${wiremock.port}/auth/oauth/token
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ spring:
provider:
ords-oasys-auth:
token-uri: http://localhost:${wiremock.port}/eor/oasys/oauth/token
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spring:
global_temporary:
create_tables: false
drop_tables: false
threads.virtual.enabled: true
springdoc.default-produces-media-type: application/json

delius.db.username: ArnsAndDelius # Should match value in [deploy/database/access.yml].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ spring:
provider:
hmpps-auth:
token-uri: http://localhost:${wiremock.port}/auth/oauth/token
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ spring:
provider:
hmpps-auth:
token-uri: http://localhost:${wiremock.port}/auth/oauth/token
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spring:
provider:
hmpps-auth:
token-uri: http://localhost:${wiremock.port}/auth/oauth/token
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ spring:
provider:
hmpps-auth:
token-uri: http://localhost:${wiremock.port}/auth/oauth/token
threads.virtual.enabled: true

delius.db.username: CustodyKeyDatesAndDelius # Should match value in [deploy/database/access.yml].

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ spring:
global_temporary:
create_tables: false
drop_tables: false
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json


Expand Down
1 change: 1 addition & 0 deletions projects/dps-and-delius/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ spring:
create_tables: false
drop_tables: false
open-in-view: false # this prevents aborted streaming requests from leaving a DB connection in-use
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spring:
global_temporary:
create_tables: false
drop_tables: false
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spring:
global_temporary:
create_tables: false
drop_tables: false
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ spring:
base: dc=moj,dc=com
base-environment:
java.naming.ldap.derefAliases: never
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ spring:
base: dc=moj,dc=com
base-environment:
java.naming.ldap.derefAliases: never
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ spring:
provider:
hmpps-auth:
token-uri: http://localhost:${wiremock.port}/auth/oauth/token
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

delius.db.username: MakeRecallDecisionsAndDelius # Should match value in [deploy/database/access.yml].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ spring:
provider:
hmpps-auth:
token-uri: http://localhost:${wiremock.port}/auth/oauth/token
threads.virtual.enabled: true

delius.db.username: ManageOffencesAndDelius # Should match value in [deploy/database/access.yml].

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spring:
provider:
hmpps-auth:
token-uri: http://localhost:${wiremock.port}/auth/oauth/token
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package uk.gov.justice.digital.hmpps
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.Arguments
import org.junit.jupiter.params.provider.MethodSource
import org.mockito.Mockito.timeout
import org.mockito.kotlin.after
import org.mockito.kotlin.any
import org.mockito.kotlin.eq
Expand Down Expand Up @@ -49,7 +50,7 @@ internal class IntegrationTest {

if (expected.isNotEmpty()) {
expected.forEach {
verify(telemetryService).trackEvent(
verify(telemetryService, timeout(30000)).trackEvent(
eq("OffenderEventPublished"),
eq(it + ("occurredAt" to ISO_ZONED_DATE_TIME.format(delta.dateChanged.truncatedTo(ChronoUnit.SECONDS)))),
any()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spring:
global_temporary:
create_tables: false
drop_tables: false
threads.virtual.enabled: true

delius.db.username: OffenderEventsAndDelius # Should match value in [deploy/database/access.yml].

Expand Down
1 change: 1 addition & 0 deletions projects/opd-and-delius/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spring:
global_temporary:
create_tables: false
drop_tables: false
threads.virtual.enabled: true

delius.db.username: OpdAndDelius # Should match value in [deploy/database/access.yml].

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ spring:
base: dc=moj,dc=com
base-environment:
java.naming.ldap.derefAliases: never
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ spring:
provider:
hmpps-auth:
token-uri: http://localhost:${wiremock.port}/auth/oauth/token
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

delius.db.username: PreSentenceService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ spring:
provider:
hmpps-auth:
token-uri: http://localhost:${wiremock.port}/auth/oauth/token
threads.virtual.enabled: true

delius.db.username: PrisonCaseNotesToProbation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ spring:
provider:
hmpps-auth:
token-uri: http://localhost:${wiremock.port}/auth/oauth/token
threads.virtual.enabled: true
profiles:
include:
- prisoner-movement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ spring:
base: dc=moj,dc=com
base-environment:
java.naming.ldap.derefAliases: never
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ spring:
provider:
hmpps-auth:
token-uri: http://localhost:${wiremock.port}/auth/oauth/token
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ spring:
base: dc=moj,dc=com
base-environment:
java.naming.ldap.derefAliases: never
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

delius.db.username: PrisonerProfileAndDelius # Should match value in [deploy/database/access.yml].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spring:
provider:
hmpps-auth:
token-uri: http://localhost:${wiremock.port}/auth/oauth/token
threads.virtual.enabled: true

springdoc.default-produces-media-type: application/json

Expand Down
Loading

0 comments on commit 5482378

Please sign in to comment.