knowledgesystems / cmo-pipelines

GNU Affero General Public License v3.0
3 stars 10 forks source link

Fix CVR Requeue step-- Java 21 serialization #1183

Closed jamesqo closed 3 months ago

jamesqo commented 3 months ago

Issue

Pre-import errors from the CVR fetcher

Cause

During the migration to Java 21, we also migrated to Spring Batch 5. The default serialization behavior for ExecutionContexts was changed in this version, and the new serializer was not able to handle some of the model classes we were using. This resulted in a NotSerializableException being thrown during the CVR requeue step when there were samples that failed to requeue.

Solution

This PR changes the Spring configuration to use the JacksonExecutionContextStringSerializer, which behaves the same as the pre-Spring Batch 5 serializer and avoids this error.

/cc @averyniceday @sheridancbio @mandawilson