Upgrading ESR microservice libraries
Here is a list of the ESR Microservice Projects
They all depend on the rabbit-mongo-spring-boot-starter. The spring-boot-starter comes in 3 flavours:
If a project uses rabbit & mongo :
com.hee.tis.esr:hee-rabbit-mongo-transaction-spring-boot-starte
If a project uses rabbit but not mongo :
com.hee.tis.esr:hee-rabbit-spring-boot-starter
If a project uses mongo but not rabbit :
com.hee.tis.esr:hee-mongo-spring-boot-starter
The version number of the ‘spring-boot-starter' is something like 2.3.0-1.1
- the numbers before the dash refer to the base spring boot version.
It’s important that you don’t try and pull in spring boot libraries into the microservices that are not compatible with the spring boot version of the ESR ‘spring-boot-starter’.
The following libraries should have the same version when they are used in more than one ESR Microservice. They could have different versions but it’ll make maintenance easier if they are all the same.
library | version | Starter | Audit | Export | CDC | AppGen | NotGen | Reader | Writer | Recon |
---|---|---|---|---|---|---|---|---|---|---|
|
| Y | Y | Y |
| Y | Y | Y | Y | Y |
|
|
|
| Y |
|
|
| Y |
|
|
|
| Y | Y | Y |
| Y | Y | Y | Y | Y |
|
| Y | Y | Y |
| Y | Y | Y | Y | Y |
|
| Y |
| Y |
| Y |
| Y | Y | Y |
|
| Y |
|
|
|
|
|
|
|
|
|
|
| Y | Y |
| Y | Y | Y | Y | Y |
|
|
|
|
|
| Y | Y |
| Y | Y |
|
|
|
|
| Y | Y | Y |
|
|
|
c |
|
| Y | Y |
|
|
| Y | Y | Y |
|
|
| Y | Y | Y | Y | Y | Y | Y | Y |
|
| Y | Y | Y |
| Y |
| Y | Y | Y |
|
|
|
| Y |
|
|
| Y |
|
|
|
|
| Y | Y | Y | Y | Y | Y | Y | Y |
|
| Y | Y | Y | Y |
| Y | Y |
|
|
|
|
|
| Y |
|
|
|
|
|
|
|
|
| Y | Y |
|
|
| Y |
|
|
|
|
|
| Y |
| Y | Y |
| Y | Y |
|
|
|
| Y | Y | Y | Y | Y | Y | Y |
|
|
|
|
|
| Y |
|
|
| Y |
|
|
|
|
|
| Y | Y |
| Y | Y |
|
|
|
|
|
| Y | Y |
| Y | Y |
|
|
| Y | Y | Y | Y | Y | Y | Y | Y |
|
|
| Y |
|
|
|
|
|
|
|
|
|
|
| Y |
|
|
|
|
|
|
|
|
|
| Y |
|
|
|
|
|
|
| version | Starter | Audit | Export | CDC | AppGen | NotGen | Reader | Writer | Recon |
The following libraries have given us some problems (which as of 18Jun2020 need further investigation)
localstack - works on macbook with
1.14.3
but fails on Jenkins so went back to using1.13.0
. Requires further investigation.wiremock - we’re using Spring Cloud Starter
2.2.3.RELEASE
but this version fails on macbook - works ok with2.1.3.RELEASE
Requires further investigation.
The spring-boot-version 2.3.0 in the starters is pulled in by the spring-cloud-starter-parent
(Hoxton.SR5
).
Many of the libraries go hand-in-hand with a spring-boot version. You will see in the microservices that we use org.springframework.boot
@ 2.3.0.RELEASE
but 'spring-cloud-starter
' @ 2.2.3.RELEASE
. This is normal. As of 18th June 2020 - the latest version of spring-cloud-starter
is 2.2.3.RELEASE
.
TIPS
Dependabot
Don’t just accept Dependabot PR suggestions without thinking about them. Make sure that the Dependabot PR branch has worked on Jenkins before merging.
Tests
Run the tests locally before pushing code to a feature branch.
Git feature branches will be compiled and tested on Jenkins automatically.
Git PRs are also tested on Jenkins automatically.
Jenkins
Note : please keep an eye on Jenkins if you submit code. Sometimes it looks like a Jenkins job has passed but it actually failed. Sometimes a build might fail because of high load on Jenkins. If you think something should have worked but didn’t - might be worth trying again.
ESR Spring Boot Starter changes
Any changes to the esr spring-boot-starter should be associated with an increase to its version number. Once the new esr spring-boot-starter version has been pushed to master branch and built successfully on Jenkins, each microservice needs to be updated to use it.
Dependency Trees
For gradle based projects, ./gradlew dependencyReport
- will produce a dependency report.
For maven based projects, mvn dependency:tree
- will output a dependency report to console.
There will be dependencies inherited from ESR spring-boot-starters that are repeated (or overridden) in each ESR microservice's build.gradle
file. Test dependencies are NOT inherited from ESR spring-boot-starters.
Slack: https://hee-nhs-tis.slack.com/
Jira issues: https://hee-tis.atlassian.net/issues/?filter=14213