Skip to content

Slim dva-api to a pure HTTP orchestrator and split dva-processing - #75

Open
MYRhouma wants to merge 6 commits into
Prometheus-X-association:yassine-refactorfrom
MYRhouma:refactor/slim-dva-api-processing
Open

Slim dva-api to a pure HTTP orchestrator and split dva-processing#75
MYRhouma wants to merge 6 commits into
Prometheus-X-association:yassine-refactorfrom
MYRhouma:refactor/slim-dva-api-processing

Conversation

@MYRhouma

Copy link
Copy Markdown
Contributor

Removes all RabbitMQ consumers and DB writes from dva-processing so the service becomes a stateless quality evaluator. dva-api becomes a pure HTTP orchestrator that calls dva-processing / vla-manager-api / vc-manager instead of publishing to RMQ and recording rows in PostgreSQL.

  • dva-processing: drops RMQ consumer and DB writer; adds /evaluate and /evaluate-from-template endpoints returning 404 on missing template; swagger UI enabled, auto-docs off
  • dva-api: aovRoutes rewritten to call downstream HTTP services; orphan RMQ block removed from application.yaml; upstream status codes are relayed instead of masking 400 as 502
  • test-env/compose.yml: one container per role
  • deletes obsolete TemplateRoutesTest.kt and VLARoutesTest.kt since those routes now live in vla-manager-api
  • :api:compileTestKotlin clean

Depends on: #72 (ACA-Py removal), #74 (vla-manager-api)

@bzp99

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the DVA services to separate concerns: dva-processing is pared down toward an HTTP-only quality evaluation service, while dva-api is streamlined by removing local template/VLA/evaluation routes and related RabbitMQ configuration from its application config and wiring.

Changes:

  • Removes RabbitMQ consumer logic from dva-processing and simplifies startup to run only the HTTP server.
  • Deletes template/VLA/evaluation routes, resources, and tests from dva-api (moving responsibility outward as described in the PR metadata).
  • Updates test-env docker-compose definitions by removing RabbitMQ services and wiring.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test-env/compose.yml Removes RabbitMQ env/deps; adjusts service composition for roles
test-env/common-services.yml Drops the shared RabbitMQ service definition
dva-processing/src/dva_processing/rmq_consumer.py Deletes RabbitMQ consumer implementation
dva-processing/src/dva_processing/processing.py Removes AoV handling + DB write path, leaving evaluation logic
dva-processing/src/dva_processing/main.py Simplifies runtime to HTTP-only startup
dva-processing/src/dva_processing/config.py Removes RMQ/PG/ACA-Py config values; keeps log level
dva-api/api/src/test/kotlin/hu/bme/mit/ftsrg/dva/api/route/VLARoutesTest.kt Deletes obsolete VLA route tests
dva-api/api/src/test/kotlin/hu/bme/mit/ftsrg/dva/api/route/TemplateRoutesTest.kt Deletes obsolete template route tests
dva-api/api/src/main/resources/application.yaml Removes RabbitMQ config block
dva-api/api/src/main/kotlin/hu/bme/mit/ftsrg/dva/api/route/vlaRoutes.kt Deletes VLA routes from dva-api
dva-api/api/src/main/kotlin/hu/bme/mit/ftsrg/dva/api/route/templateRoutes.kt Deletes template CRUD/render routes from dva-api
dva-api/api/src/main/kotlin/hu/bme/mit/ftsrg/dva/api/route/evaluationRoutes.kt Deletes evaluation routes from dva-api
dva-api/api/src/main/kotlin/hu/bme/mit/ftsrg/dva/api/route/aovRoutes.kt Adjusts ACA-Py error handling and response shaping
dva-api/api/src/main/kotlin/hu/bme/mit/ftsrg/dva/api/resource/VLAs.kt Deletes VLA resource definitions
dva-api/api/src/main/kotlin/hu/bme/mit/ftsrg/dva/api/resource/Templates.kt Deletes template resource definitions
dva-api/api/src/main/kotlin/hu/bme/mit/ftsrg/dva/api/resource/Evaluation.kt Deletes evaluation resource definitions
dva-api/api/src/main/kotlin/hu/bme/mit/ftsrg/dva/api/Application.kt Removes RabbitMQ wiring and drops removed routes from registration
Comments suppressed due to low confidence (1)

dva-processing/src/dva_processing/main.py:12

  • The dva-processing CLI no longer parses command-line arguments, so --debug/--verbose (and any legacy flags like --no-rmq) are silently ignored even though main() still accepts verbose/debug. This is a behavior regression for the published console entrypoint.
def main(verbose=False, debug=False):
    if debug:
        dva_processing.config.cfg.log_level = "debug"
    elif verbose:
        dva_processing.config.cfg.log_level = "info"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 58 to 62
fun Application.configureKoin() {
val rabbitHost = environment.config.property("rabbitmq.host").getString()

val appModule = module {
single<Connection> {
ConnectionFactory().run {
host = rabbitHost
connectWithRetry(logger = log)
}
}
single<HttpClient> {
HttpClient(CIO) {
install(ClientContentNegotiation) {
Comment thread test-env/compose.yml
Comment on lines 46 to 50
environment:
DVA_LOG_LEVEL: debug
DVA_RABBITMQ_HOST: rabbit-provider
DVA_POSTGRES_URL: postgresql://postgres-provider:5432/dva
DVA_ACA_PY_CONTROLLER_URL: http://dva-aca-py-controller-provider:8050
healthcheck:
Comment thread test-env/compose.yml
Comment on lines 61 to 65
environment:
DVA_LOG_LEVEL: debug
DVA_RABBITMQ_HOST: rabbit-consumer
DVA_POSTGRES_URL: postgresql://postgres-consumer:5432/dva
DVA_ACA_PY_CONTROLLER_URL: http://dva-aca-py-controller-consumer:8050
healthcheck:
@bzp99 bzp99 self-assigned this Jul 29, 2026
@bzp99 bzp99 changed the title refactor: slim dva-api to a pure HTTP orchestrator and split dva-processing Slim dva-api to a pure HTTP orchestrator and split dva-processing Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants