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

Aperta
#895 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #896 di @anth-volk — chiusa senza merge

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
api, backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
1
Fork
1
Merge medio
1g 12h
PR unite (30g)
71

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PolicyEngine/policyengine-sim-api

Tutte le issue di PolicyEngine/policyengine-sim-api

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.