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

Đang mở
#895 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

  • #896 của @anth-volk — đã đóng, không merge

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api, backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
1
Fork
1
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
71

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PolicyEngine/policyengine-sim-api

Tất cả issue của PolicyEngine/policyengine-sim-api

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.