[Refactor]: Consolidate ingestion routes under `features/ingestion/api/`

Abierto
#481 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
api, backend

Línea de trabajo

Start with backend/app/features/ingestion/api.py and the five routers in backend/app/api/ (ingestion_summary.py, job_health.py, rejected_executions.py, source_directories.py, metadata_backfill.py), then main.py for router registration. The first step is a maintainer decision on the route-placement convention, so confirm it before moving files. Done means no /ingestions/* router remains under backend/app/api/, /openapi.json is unchanged, and make backend-test passes. The issue is blocked by #306.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

refactor
Is your feature request related to a problem?

Ingestion routes are split across two locations:

  • backend/app/features/ingestion/api.py: /ingestions (from-path, from-upload, from-hpc-upload, archive-checkpoints, discovery-results, state).
  • backend/app/api/: five more routers with /ingestions prefixes and the Ingestions tag:
    • ingestion_summary.py
    • job_health.py (/ingestions/jobs)
    • rejected_executions.py
    • source_directories.py
    • metadata_backfill.py (/ingestions/metadata-backfill)

The modules in app/api/ import private helpers from features/ingestion/api.py, so the split already crosses module boundaries.

The convention is also contradictory. AGENTS.md says "New endpoints go in backend/app/api/" and "API routes in backend/app/api/", but every feature (catalog, ingestion, machine, user, and others) owns its routes in features/*/api.py.

Blocked by #306, which adds public features/ingestion/access.py helpers.

Describe the solution you'd like
  1. Decide on the convention and update AGENTS.md. Recommended: feature routes live in features/<feature>/api/, and app/api/ keeps only cross-cutting routes (health.py, meta.py, version.py).
  2. Move the five ingestion routers into features/ingestion/api/ (for example, summary.py, job_health.py, rejected_executions.py, source_directories.py, metadata_backfill.py) and update main.py registration.
  3. Move the related tests to match.
Acceptance criteria
  • AGENTS.md states one route-placement convention, and it matches the code.
  • No /ingestions/* router is defined under backend/app/api/.
  • /openapi.json is identical before and after: same paths, methods, tags, and schemas.
  • make backend-test and make pre-commit-run pass.
Describe alternatives you've considered
  • Keep routes in app/api/ and move feature routes there. This conflicts with the feature-based architecture and would touch every feature.
  • Leave the routes as is and only fix AGENTS.md. This documents the inconsistency instead of fixing it.
Lenguaje dominante
Python
Estrellas
2
Forks
2
Merge medio
12 h 49 min
PR fusionados (30 d)
30

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de E3SM-Project/simboard

Todos los issues de E3SM-Project/simboard

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.