Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/base-java-service-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ on:
default: false
java_version:
type: string
# TODO PRM-711: Update to Java 25 once all services are compatible
default: "21"
default: "25"
required: false
image_prefix:
type: string
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/full-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ jobs:
service: pds-adaptor
environment: ${{ inputs.environment }}
is_deployment: ${{ inputs.is_deployment }}
# TODO PRM-713 REMOVE THIS LINE SO IT TAKES THE DEFAULT
java_version: "11"
ecr_alias: deductions/pds-adaptor
secrets: inherit

Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/service-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ jobs:
environment: dev
is_deployment: ${{ github.ref == 'refs/heads/main' }}
requires_localstack: true
# PRM-711: Remove the hardcoded java_versions once all services are compatible with Java 25
java_version: "25"
ecr_alias: deductions/nems-event-processor
secrets: inherit

Expand All @@ -124,7 +122,6 @@ jobs:
environment: dev
is_deployment: ${{ github.ref == 'refs/heads/main' }}
requires_localstack: true
java_version: "25"
ecr_alias: deductions/ehr-transfer-service
secrets: inherit

Expand All @@ -137,7 +134,6 @@ jobs:
service: pds-adaptor
environment: dev
is_deployment: ${{ github.ref == 'refs/heads/main' }}
java_version: "25"
ecr_alias: deductions/pds-adaptor
secrets: inherit

Expand All @@ -152,7 +148,6 @@ jobs:
is_deployment: ${{ github.ref == 'refs/heads/main' }}
requires_localstack: true
image_prefix: repo/
java_version: "25"
ecr_alias: repo/re-registration-service
secrets: inherit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

@Configuration
public class SqsClientSpringConfiguration {



@Bean
public SqsClient sqsClient() {
return SqsClient.create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ public class SqsListenerSpringConfiguration {
@Value("${aws.nackQueueName}")
private String negativeAckQueueName;

@Bean
public SqsClient sqsClient() {
return SqsClient.create();
}

@Bean
public SQSConnection createConnection(SqsClient sqsClient) throws JMSException {
SQSConnectionFactory connectionFactory = new SQSConnectionFactory(new ProviderConfiguration(), sqsClient);
Expand Down
2 changes: 1 addition & 1 deletion services/suspension-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:21-jre-alpine-3.23
FROM eclipse-temurin:25-jre-alpine-3.23

RUN apk update && \
apk -u list && \
Expand Down
114 changes: 36 additions & 78 deletions services/suspension-service/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
plugins {
id 'org.springframework.boot' version '3.2.2'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.springframework.boot' version '4.0.3'
id 'io.spring.dependency-management' version '1.1.7'
id 'java'
id 'jacoco'
id 'com.github.spotbugs' version '6.0.6'
id 'org.sonarqube' version '4.3.1.3277'
id 'org.sonarqube' version '7.2.2.6593'
}

group = 'uk.nhs.prm.repo'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '21'

configurations {
compileOnly {
Expand All @@ -21,61 +19,54 @@ repositories {
mavenCentral()
}

//Without this task two jars are built, the additional "-plain.jar" is not needed
// for more details refer to: https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/htmlsingle/#packaging-executable.and-plain-archives
jar {
enabled = false
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-json'

implementation 'org.yaml:snakeyaml:2.2'
implementation('io.netty:netty-buffer') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-codec') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-codec-http') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-codec-http2') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-common') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-handler') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-resolver') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-transport') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-transport-classes-epoll') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-transport-native-epoll') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-transport-native-unix-common') { version { strictly '4.1.104.Final' } }

implementation platform('software.amazon.awssdk:bom:2.18.41')
implementation 'org.springframework:spring-jms'

implementation 'org.yaml:snakeyaml:2.5'
implementation('io.netty:netty-buffer') { version { strictly '4.2.9.Final' } }
implementation('io.netty:netty-codec') { version { strictly '4.2.9.Final' } }
implementation('io.netty:netty-codec-http') { version { strictly '4.2.9.Final' } }
implementation('io.netty:netty-codec-http2') { version { strictly '4.2.9.Final' } }
implementation('io.netty:netty-common') { version { strictly '4.2.9.Final' } }
implementation('io.netty:netty-handler') { version { strictly '4.2.9.Final' } }
implementation('io.netty:netty-resolver') { version { strictly '4.2.9.Final' } }
implementation('io.netty:netty-transport') { version { strictly '4.2.9.Final' } }
implementation('io.netty:netty-transport-classes-epoll') { version { strictly '4.2.9.Final' } }
implementation('io.netty:netty-transport-native-epoll') { version { strictly '4.2.9.Final' } }
implementation('io.netty:netty-transport-native-unix-common') { version { strictly '4.2.9.Final' } }

implementation platform('software.amazon.awssdk:bom:2.41.14')
implementation 'software.amazon.awssdk:cloudwatch'
implementation 'software.amazon.awssdk:sns'
implementation 'software.amazon.awssdk:sqs'
implementation 'software.amazon.awssdk:dynamodb'

// TODO: Once we upgrade amazon-sqs-java-messaging-lib to v2 we can remove aws-java-sdk-core and sqs.
implementation 'com.amazonaws:amazon-sqs-java-messaging-lib:1.1.2'
implementation 'com.amazonaws:aws-java-sdk-core:1.12.368'
implementation 'com.amazonaws:aws-java-sdk-sqs:1.12.368'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.google.guava:guava:33.0.0-jre'
implementation 'io.github.resilience4j:resilience4j-retry:1.7.1'
implementation 'org.springframework:spring-jms:5.3.19'
implementation 'com.github.spotbugs:spotbugs-annotations:4.8.3'
implementation 'org.apache.bcel:bcel:6.6.1'
// Explicit declaration to override outdated dependency on httpclient - outdated as of Spring Boot >3.0.0
// TODO We plan to replace the HTTP calls on this service with Lambda calls soon, this can be removed at this point
implementation 'org.apache.httpcomponents.client5:httpclient5:5.3'
implementation 'commons-fileupload:commons-fileupload:1.5'
implementation 'net.logstash.logback:logstash-logback-encoder:7.0.1'

compileOnly 'org.projectlombok:lombok:1.18.30'
implementation 'com.amazonaws:amazon-sqs-java-messaging-lib:2.1.4'
implementation 'com.google.code.gson:gson:2.13.2'
implementation 'com.google.guava:guava:33.5.0-jre'
implementation 'io.github.resilience4j:resilience4j-retry:2.3.0'
implementation 'org.apache.bcel:bcel:6.12.0'
implementation 'org.apache.httpcomponents.client5:httpclient5'
implementation 'commons-fileupload:commons-fileupload:1.6.0'
implementation 'net.logstash.logback:logstash-logback-encoder:9.0'

compileOnly 'org.projectlombok:lombok:1.18.42'

annotationProcessor 'org.projectlombok:lombok'

testImplementation 'org.awaitility:awaitility:4.2.0'
testImplementation 'org.awaitility:awaitility:4.3.0'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'org.springframework.boot:spring-boot-test-autoconfigure'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.boot:spring-boot-starter-aop'
testImplementation 'org.mockito:mockito-core:3.+'
testImplementation 'org.wiremock:wiremock-standalone:3.3.1'
testImplementation 'org.wiremock:wiremock-standalone:3.13.2'
}

test {
Expand Down Expand Up @@ -132,39 +123,6 @@ jacocoTestCoverageVerification {
}
}

spotbugsMain {
ignoreFailures = true
reports {
html {
enabled = true
destination = file("$buildDir/reports/spotbugs/main/spotbugs.html")
stylesheet = 'fancy-hist.xsl'
}
}
}

spotbugsTest {
ignoreFailures = true
reports {
html {
enabled = true
destination = file("$buildDir/reports/spotbugs/test/spotbugs.html")
stylesheet = 'fancy-hist.xsl'
}
}
}

spotbugsIntegration {
ignoreFailures = true
reports {
html {
enabled = true
destination = file("$buildDir/reports/spotbugs/integration/spotbugs.html")
stylesheet = 'fancy-hist.xsl'
}
}
}

sonar {
properties {
property "sonar.projectKey", "NHSDigital_orphaned-record-continuity"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
localstack:
container_name: "localstack-suspension-service"
image: localstack/localstack
image: localstack/localstack:4.14.0
ports:
- "4566:4566"
network_mode: bridge
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public class HttpClientTest {
@BeforeEach
public void setUp() {
wireMockServer = initializeWebServer();
configureFor("localhost", wireMockServer.port());

}

@Test
Expand All @@ -51,7 +53,7 @@ void shouldPerformPutWithAuthAndReturnBodyAndResponseCode() {
"some request payload");

assertThat(responsePayload.getBody()).isEqualTo("some body");
assertThat(responsePayload.getStatusCodeValue()).isEqualTo(203);
assertThat(responsePayload.getStatusCode().value()).isEqualTo(203);
}

@Test
Expand All @@ -69,8 +71,7 @@ void shouldReturnResponseWithStatusCode() {
"bob",
"banana");

assertThat(response.getStatusCodeValue()).isEqualTo(202);
}
assertThat(response.getStatusCode().value()).isEqualTo(202); }


@Test
Expand Down
Loading
Loading