Skip to content

feat!(backend): move internal endpoints into internal controller service#6267

Open
anna-parker wants to merge 6 commits intomainfrom
internal_controller
Open

feat!(backend): move internal endpoints into internal controller service#6267
anna-parker wants to merge 6 commits intomainfrom
internal_controller

Conversation

@anna-parker
Copy link
Copy Markdown
Contributor

@anna-parker anna-parker commented Apr 12, 2026

partially resolves #855

Screenshot

image

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by appropriate, automated tests.
  • Any manual testing that has been done is documented (i.e. what exactly was tested?)

🚀 Preview: Add preview label to enable

@anna-parker anna-parker added the preview Triggers a deployment to argocd label Apr 12, 2026
@claude claude bot added the backend related to the loculus backend component label Apr 12, 2026
@anna-parker anna-parker removed preview Triggers a deployment to argocd labels Apr 13, 2026
@anna-parker anna-parker marked this pull request as ready for review April 14, 2026 07:25
@claude
Copy link
Copy Markdown
Contributor

claude bot commented Apr 14, 2026

Claude finished @anna-parker's task in 2m 11s —— View job


Code Review

  • Gather context and read changed files
  • Review InternalController.kt (new file)
  • Review SubmissionController.kt (modified)
  • Review SubmissionDatabaseService.kt (modified)
  • Post inline comments and summary

Good structural refactor overall — the endpoint split is clean and the existing tests should continue to cover the moved endpoints since the URL paths are unchanged.

Main issues (inline comments posted):

  1. InternalController constructor has 5 unused dependencies (submitModel, backendConfig, objectMapper, groupManagementPreconditionValidator, dataUseTermsPreconditionValidator) — copied from SubmissionController but not used by any method in InternalController. These should be removed.

  2. Unused log variable in InternalController — all methods delegate directly to the service with no controller-level logging.

  3. Large number of unused imports in InternalController.kt./gradlew ktlintFormat will clean these up.

  4. streamTransactioned placement (non-blocking) — moving it to SubmissionDatabaseService works but pulls HTTP streaming concerns (MDC, compression, StreamingResponseBody) into the persistence layer. Worth a follow-up to extract into a dedicated utility.

No security or correctness issues found. The access-control separation (the main goal of issue #855) is correctly deferred as a follow-up given the PR description says "partially resolves".

Comment thread backend/src/main/kotlin/org/loculus/backend/controller/InternalController.kt Outdated
Comment thread backend/src/main/kotlin/org/loculus/backend/controller/InternalController.kt Outdated
Comment thread backend/src/main/kotlin/org/loculus/backend/controller/InternalController.kt Outdated
Comment thread backend/src/main/kotlin/org/loculus/backend/controller/InternalController.kt Outdated
Comment thread backend/src/main/kotlin/org/loculus/backend/controller/InternalController.kt Outdated
Comment thread backend/src/main/kotlin/org/loculus/backend/controller/InternalController.kt Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend related to the loculus backend component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API URLs

1 participant