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

未關閉
#895 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

  • #896 來自 @anth-volk —— 已關閉,未合併

評估

難度
4/5
預估耗時
3-5 天
新手友好度
25/100
Issue 類型
功能
描述清晰度
描述清楚
活躍度
停滯
技術堆疊
python
領域
api, backend

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
Python
星號
1
分支
1
平均合併
1 天 12 小時
30 天內合併 PR
71

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

PolicyEngine/policyengine-sim-api 的其他 Issue

查看 PolicyEngine/policyengine-sim-api 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。