Let the v2 report coordinator return a typed result to its caller

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

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

  • #896 de @anth-volk — cerrado sin fusionar

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
python
Área
api, backend

Línea de trabajo

Read the versioned v2 Modal application and locate coordinate_report, its dispatch context, and the Stage 12 result recording path. Then inspect the linked pull request #896 for the current implementation direction and how Modal transports typed results and errors to callers. Done means the opt-in result_delivery mode returns the specified typed success or error while the default Stage 12 behavior remains unchanged.

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

Descripción

What

The v2 Modal report coordinator (coordinate_report in the versioned v2 Modal application) can today only record a report in the Stage 12 tables and write its aggregate to the Stage 12 artifact bucket. It should also be able to hand the report's result straight back to whoever called it:

  • a typed ReportExecutionResult with the report's totals inline (a SingleYearMacroOutput), the output plan, the baseline and reform artifact descriptors, and the software, data and Modal deployment that produced them;
  • or, when the report fails, a typed ReportExecutionError carrying the same redacted error code and summary a Stage 12 row would record.

A new field on the dispatch context, result_delivery, selects the mode. Leaving it out keeps today's Stage 12 behavior, so the Stage 12 comparison runs behave exactly as before.

The work also checks whether Modal raises ReportExecutionError in the caller as the same type, which the caller needs in order to tell a report failure from an infrastructure failure.

Why

The Simulation Entrypoint's v2 economy path, planned as a later change, needs to start an economy report on Modal and receive its result directly, without the Stage 12 database. This change adds the coordinator side only; nothing calls the new mode yet.

Lenguaje dominante
Python
Estrellas
1
Forks
1
Merge medio
1 d 12 h
PR fusionados (30 d)
71

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 PolicyEngine/policyengine-sim-api

Todos los issues de PolicyEngine/policyengine-sim-api

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.