Repository navigation
refactor(backend): [DEMO] Experimenting with v2 API in backend - #7540
Draft
maverbiest wants to merge 3 commits into
Draft
maverbiest wants to merge 3 commits into
maverbiest wants to merge 3 commits into
Conversation
Move the v2 groups endpoint to a stacked branch: remove the v2 module, move the groups code back to v1 (unchanged from main) and drop v2 from the docs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
maverbiest
added this pull request to stack #7550
October 15, 2026 13:37
This branch has not been deployed
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.
Note
This is the first of two stacked PRs exploring how to build a new API inside the existing backend, as an alternative to the separate service in #7539. This PR only restructures the backend and doesn't change behaviour. #7549 (stacked on top) adds v2 group endpoints to show what adding a v2 endpoint looks like.
What this does
The backend becomes a multi-module Gradle build. It is still one Spring Boot application, one jar, one Docker image and one pod:
corev1appBackendApplicationand its configuration. It combines the modules and buildsbackend.jar.Why
This prepares for building a new API version next to v1:
corebut not onv1. The build enforces this, so any import from v1 is a compile error.coreonce instead of being copied, as chore(api): [DEMO – DO NOT MERGE] separate v2 API service with group management #7539 does../gradlew :v1:test.What changed
All but 21 of the changed files are pure renames. Packages are unchanged, so v1 needed no import changes. The files with real edits:
SecurityConfig: split in two. The shared JWT/Keycloak classes moved tocore/.../config/JwtAuthentication.kt; v1 keeps its path-based filter chain.BackendSpringConfig: the Exposed and Flyway setup moved tocore/.../config/CoreSpringConfig.kt. v1'sCurrentProcessingPipelineTableinitialisation is nowCurrentProcessingPipelineInit, which runs after core's migration.WebConfig: registering the user argument resolver moved to core.PublicJwtKeyConfig,SpringBootTestWithoutDatabaseand the test logging/profile config moved to core's test fixtures.BackendApplicationTestandSwaggerUiTestmoved toapp, since they need the whole application.build.gradleholds the conventions for all modules; each module's build file only lists its dependencies.app.app/build/libs/backend.jar.core/src/main/resources/db/migration, and the trigger paths inschema-dump.ymlandflyway-check.ymlare updated.bootRunruns frombackend/, so the relative paths instart_dev.shstill work.Notes
org.loculus.backend.config) now have files in bothcoreandv1. Renaming them could be a separate mechanical PR.flyway-check.ymlnever checked anything, even before this PR: itsgit diffpath doesn't match from the repo root. Only its trigger path is updated here. A working check would flag this PR's moved migrations as edited.Testing
./gradlew test: all 661 tests pass, with the same number of tests per class as onmain../gradlew ktlintCheckis clean.corejar, and v1's startup initialisation ran after themstart_dev.sh.🤖 Generated with Claude Code