mskcc / smile-server

2 stars 4 forks source link

Java21 #1316

Closed ao508 closed 6 days ago

ao508 commented 1 week ago

Migration to Java21 and Neo4j 5.19.0

Details:

Changes in this pull request introduce support for java21 and neo4j 5.19.0.

Deployment changes:

Some changes to the circleci configuration, jitpack, and github actions workflow were needed. Jitpack by default runs builds with an older version of java but this can be addressed with the addition of a jitpack.yml. Circleci config also needed an update to allow circlular references during the app runtime. This is okay for now but perhaps can be addressed in the future.

App configuration:

The SMILE app configuration is mostly the same. There is now an added bean in the app configuration that explicitly sets the session factory for the neo4j driver.

Model layer:

The model layer changes include updates to the annotations classes used.

Persistence layer:

Appart from updating relevant annotations used for the persistence layer, some queries were cleaned up, removed, and/or improved to consolidate additional calls that were populating child edges and nodes. Example, we were using 2 calls to (1) fetch SampleMetadata nodes and (2) fetch the related SampleStatus nodes for the SampleMetadata nodes. This is now accomplished with one single query.

Service layer:

For the most part the service layer has remained the same. Some cleanup and refactoring were done to remove unused methods and/or methods that were made redundant due to the improved/consolidated queries modified in the persistence layer.

Test layer:

This layer required the most work as in addition to updating java and the testcontainers for supporting a newer neo4j instance, we also migrated the test framework to junit-jupiter.

One of the major changes in the test classes is the use of https://github.com/SpringBootTest annotations instead of using the @DataNeo4jTest annotation. There's also additional @TestConfiguration settings that needed to be introduced to support the updated test framework and components.

Web layer:

Some relatively minor changes introduced here to migrate away from swagger by springfox to swagger by open api. Reference documentation: https://springdoc.org/#migrating-from-springfox

Signed-off-by: Angelica Ochoa 15623749+ao508@users.noreply.github.com

Update docker file for java21 (https://github.com/mskcc/smile-server/pull/1317)

Signed-off-by: Angelica Ochoa 15623749+ao508@users.noreply.github.com

Fix for correcting CMO patient IDs (https://github.com/mskcc/smile-server/pull/1319)

Fix for optional matching on sample status

Signed-off-by: Angelica Ochoa 15623749+ao508@users.noreply.github.com

Fix end date formatter (https://github.com/mskcc/smile-server/pull/1320)

Signed-off-by: Angelica Ochoa 15623749+ao508@users.noreply.github.com


Crossing T's and dotting I's

Please follow these checklists to help prevent any unexpected issues from being introduced by the changes in this pull request. If an item does not apply then indicate so by surrounding the line item with ~~ to strikethrough the text. See basic writing and formatting syntax for more information.

I. Web service and data model checklist

Please follow these checks if any changes were made to any classes in the web, service, or persistence layers.

Code checks:

II. Neo4j models and database schema checklist:

III. Message handlers checklist:

If no unit tests were updated or added, then please explain why: [insert details here]

Please describe how the workflow and messaging was tested/simulated:

Describe your testing environment:

Other: [insert details on how messages were published or simulated for testing]

IV. Configuration and/or permissions checklist: n/a

- [ ] New topics were introduced.
- [ ] The topics and appropriate permissions were updated in [smile-configuration](https://github.mskcc.org/cmo/smile-configuration).
- [ ] If applicable, a new account was set up and the account credentials and keys are checked into [smile-configuration](https://github.mskcc.org/cmo/smile-configuration).
- [ ] Account credentials and keys were shared with the appropriate parties.

Screenshots


General checklist: