Return a 400 for economy years the simulation service's model cannot project
Maintainer thường phản hồi trong vòng 3 ngày
Đá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
- 35/100
Hướng nghiên cứu
Start in country.py to see how economy_options.time_period is built, then inspect the API's handling of simulation service error codes, especially the SPM input codes. Check the linked PolicyEngine/policyengine-sim-api#969 for the stable error code and message contract. Done means DATASET_YEAR_UNAVAILABLE maps to a readable 400 response and UK metadata years follow the installed model projection; preserve current behavior for unknown codes and services that omit the code.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
A society-wide (economy) request for a year the simulation service's model cannot project its dataset to returns 502, and the failure is stored and replayed for 30 days as a computation failure.
- policyengine-uk projects its UK dataset (data year 2024) only to 2032 (2030 before policyengine-uk 2.130.1). A UK request for 2033 fails in the simulation service. Its job-status endpoint returns 500, and
get_economic_impactreturns 502 with "Simulation entrypoint execution failed: Simulation failed (correlation_id=…)". Every retry returns the same stored failure. - This happened on 2026-10-15 for 2031–2035 and on 2026-10-26 for 2033–2039.
- The UK years in the country metadata (
economy_options.time_period, built incountry.py) still stop at 2030. The app reads that list.
Intended change
- The simulation service will answer such a job with 400 and the stable code
DATASET_YEAR_UNAVAILABLE(PolicyEngine/policyengine-sim-api#969). Map that code to a 400 with the service's readable message, such as "UK results are available for 2024 to 2032", in the same way as the SPM input codes. - Keep today's behaviour for unknown codes, and for a simulation service that doesn't send the code yet.
- Make the UK metadata years follow the installed policyengine-uk's projection, so the list runs to 2032 now and moves with the model.
This is the Public API part of a change that also touches the simulation service and the app.
- Ngôn ngữ chính
- Python
- Star
- 18
- Fork
- 33
- Merge trung bình
- 2 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 53
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PolicyEngine/policyengine-api
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
PolicyEngine/policyengine-api#4037 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
PolicyEngine/policyengine-api#3911 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
PolicyEngine/policyengine-api#3910 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Document UK breakdown results' withheld area codes, and stop serving breakdowns cached without themCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 43/100
PolicyEngine/policyengine-api#4091 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Telemetry error report splits a simulation worker failure between its exception and the recorded copyCó thể đã có người làm @anth-volk đã nhận 1 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 20/100
PolicyEngine/policyengine-api#4088 ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của PolicyEngine/policyengine-api
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
MIT-LCP/wfdb-python#590 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
pollen-robotics/reachy_mini#1517 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
NRLMMD-GEOIPS/pluginify#41 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
scverse/spatialdata#1293 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
UKGovernmentBEIS/inspect_evals#2788 ·
Maintainer thường phản hồi trong vòng 1 ngày