fix(lapis): upgrade to Spring boot 4#1719
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrades the LAPIS service to Spring Boot 4 / Spring Framework 7 and aligns the codebase with the updated Jackson/Spring APIs, including adapting custom (de)serialization, MVC test setup, and various response/streaming paths.
Changes:
- Upgrade to Spring Boot
4.0.6and update related dependencies (Spring Security OAuth2, springdoc). - Migrate Jackson usage to the
tools.jackson.*namespace and update custom serializers/deserializers + object mappers accordingly. - Update MVC tests and web layer configuration (MockMvc autoconfig import changes, Swagger/OpenAPI YAML parsing updates, compression/error response handling).
Reviewed changes
Copilot reviewed 78 out of 78 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lapis/build.gradle | Boot 4 + dependency upgrades |
| lapis/src/main/kotlin/org/genspectrum/lapis/LapisSpringConfig.kt | Json mapper configuration update |
| lapis/src/main/kotlin/org/genspectrum/lapis/OAuthConfig.kt | OAuth2 properties package move |
| lapis/src/main/kotlin/org/genspectrum/lapis/CorsConfiguration.kt | Register compression media types |
| lapis/src/main/kotlin/org/genspectrum/lapis/auth/DataOpennessAuthorizationFilter.kt | Jackson import migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/config/ReferenceGenome.kt | Jackson import migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/controller/ExceptionHandler.kt | Error handling + compression |
| lapis/src/main/kotlin/org/genspectrum/lapis/controller/LapisController.kt | Newick streaming behavior |
| lapis/src/main/kotlin/org/genspectrum/lapis/controller/QueriesOverTimeController.kt | Data-version header nullability |
| lapis/src/main/kotlin/org/genspectrum/lapis/controller/QueryController.kt | Data-version header nullability |
| lapis/src/main/kotlin/org/genspectrum/lapis/controller/middleware/CompressionFilter.kt | Converter/content-length adjustments |
| lapis/src/main/kotlin/org/genspectrum/lapis/controller/middleware/DataFormatParameterFilter.kt | Jackson import migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/controller/middleware/DownloadAsFileFilter.kt | Jackson import migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/controller/middleware/JacksonFormHttpMessageConverter.kt | Jackson import migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/controller/middleware/YamlHttpMessageConverter.kt | Spring converter API update |
| lapis/src/main/kotlin/org/genspectrum/lapis/health/SiloHealthIndicator.kt | Actuator API/package changes |
| lapis/src/main/kotlin/org/genspectrum/lapis/logging/RequestContext.kt | Jackson exception type update |
| lapis/src/main/kotlin/org/genspectrum/lapis/logging/StatisticsLogObjectMapper.kt | JsonMapper builder migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/model/FastaHeaderTemplate.kt | StringNode migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/openApi/OpenApiDocs.kt | OAuth2 props import move |
| lapis/src/main/kotlin/org/genspectrum/lapis/openApi/Schemas.kt | Explicit schema for Newick |
| lapis/src/main/kotlin/org/genspectrum/lapis/request/AminoAcidInsertion.kt | Deserializer API migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/request/AminoAcidMutation.kt | Deserializer API migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/request/CommonSequenceFilters.kt | Parsing via DeserializationContext |
| lapis/src/main/kotlin/org/genspectrum/lapis/request/MutationProportionsRequest.kt | Deserializer API migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/request/NucleotideInsertion.kt | Deserializer API migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/request/NucleotideMutation.kt | Deserializer API migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/request/OrderByField.kt | Deserializer API migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/request/PhyloTreeSequenceFiltersRequest.kt | Deserializer API migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/request/QueriesOverTimeRequest.kt | Deserializer API migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/request/SequenceFiltersRequest.kt | Deserializer API migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/request/SequenceFiltersRequestWithFields.kt | Deserializer API migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/request/SequenceFiltersRequestWithGenes.kt | Deserializer API migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/request/SequenceFiltersRequestWithSegments.kt | Deserializer API migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/request/SpecialProperties.kt | JsonNodeType import migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/response/LapisResponseStreamer.kt | Jackson generator API changes |
| lapis/src/main/kotlin/org/genspectrum/lapis/response/ResponseCollections.kt | Jackson import migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/response/SequencesStreamer.kt | Jackson import migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/response/SiloResponse.kt | Serializer API migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/silo/ArrowRowConverter.kt | StringNode migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/silo/SiloClient.kt | Jackson import migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/silo/SiloQuery.kt | Serializer API migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/util/CachedBodyHttpServletRequest.kt | Array node iteration update |
| lapis/src/main/kotlin/org/genspectrum/lapis/util/TryToGuessTheType.kt | StringNode migration |
| lapis/src/main/kotlin/org/genspectrum/lapis/util/YamlObjectMapper.kt | YAMLMapper builder migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/SwaggerUiTest.kt | YAML parsing + MockMvc import |
| lapis/src/test/kotlin/org/genspectrum/lapis/SwaggerUiTest.kt | YAMLMapper in tests |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/ExceptionHandlerTest.kt | MockMvc import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/InfoControllerTest.kt | MockMvc import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/LandingPageControllerTest.kt | MockMvc import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/LapisControllerCommonFieldsTest.kt | StringNode + MockMvc import |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/LapisControllerCompressionTest.kt | MockMvc import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/LapisControllerDataFormatTest.kt | StringNode + MockMvc import |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/LapisControllerDownloadAsFileTest.kt | MockMvc import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/LapisControllerFastaHeaderTemplateTest.kt | StringNode + MockMvc import |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/LapisControllerPhyloTreeTest.kt | MockMvc import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/LapisControllerTest.kt | StringNode + request JSON fix |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/MockData.kt | StringNode migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/MultiSegmentedSequenceControllerTest.kt | MockMvc import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/OAuthTest.kt | WWW-Authenticate assertion loosen |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/QueriesOverTimeControllerTest.kt | ObjectMapper + MockMvc import |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/QueryControllerTest.kt | MockMvc import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/SingleSegmentedSequenceControllerTest.kt | MockMvc import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/logging/RequestContextLoggerTest.kt | JSON field order update |
| lapis/src/test/kotlin/org/genspectrum/lapis/model/FastaHeaderTemplateTest.kt | StringNode migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/model/mutationsOverTime/AminoAcidMutationsOverTimeModelTest.kt | StringNode migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/model/mutationsOverTime/NucleotideMutationsOverTimeModelTest.kt | StringNode migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/model/mutationsOverTime/QueriesOverTimeModelTest.kt | StringNode migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/request/AminoAcidInsertionTest.kt | ObjectMapper import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/request/AminoAcidMutationTest.kt | ObjectMapper import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/request/MutationProportionsRequestTest.kt | ObjectMapper import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/request/NucleotideInsertionTest.kt | ObjectMapper import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/request/NucleotideMutationTest.kt | ObjectMapper import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/request/OrderBySpecDeserializerTest.kt | ObjectMapper import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/request/SequenceFiltersRequestWithFieldsTest.kt | ObjectMapper/readValue migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/response/MutationResponseTest.kt | ObjectMapper import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/silo/SiloClientTest.kt | StringNode migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/silo/SiloQueryTest.kt | ObjectMapper import migration |
| lapis/src/test/kotlin/org/genspectrum/lapis/util/TryToGuessTheTypeKtTest.kt | StringNode migration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #1476
Summary
Spring Boot 3.5.6 → 4.0.6, Jackson 2 → 3, springdoc 2 → 3.
com.fasterxml.jackson.module:jackson-module-kotlinkept alongside Jackson 3 — springdoc/swagger-core is still on Jackson 2 and needs it for Kotlin nullability detection (requiredfields in OpenAPI spec). Without it, all schema properties become optional. See springdoc#3172, blocked on swagger-core#4991. Can be removed once swagger-core migrates to Jackson 3.CompressionAwareMappingJackson2HttpMessageConverterdeleted — Boot 4 places custom@Componentconverter beans before defaults, which caused String responses (OpenAPI JSON, Newick) to be double-encoded. Instead of fighting converter ordering, phyloSubtree now writes directly toresponse.outputStream(like every other endpoint).Content-Encodingfor compressed error responses moved toExceptionHandler. Compression media types registered onJacksonJsonHttpMessageConverterviaconfigureMessageConvertersso error responses can serialize through the forced content type.Custom
JsonMapper.Builderbean — Jackson 3'sStreamReadConstraintsare immutable onJsonFactory, so they must be set at construction time. NoJsonMapperBuilderCustomizerhook exists for this. The bean calls all customizers manually to preserve Boot's default Jackson config.ProblemDetail.typeomitted in some cases — Spring Framework 7 no longer defaults it; Jackson 3 omits null URI fields. This occurs in some error cases. Strictly speaking, this is breaking, but IMO this is fine.PR Checklist
- [ ] All necessary documentation has been adapted.- [ ] All necessary changes are explained in thellms.txt.