Remove the routes only the legacy site used, check health at /health, and stop serving Canada, Nigeria and Israel
维护者通常 3 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 重构
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 领域
- api, backend, infrastructure
调研方向
Start by reading the route definitions, health check and startup probe configuration, deployment health checks, country list and model package dependencies. Check the tests and OpenAPI document that cover the listed routes and countries. The issue is complete when the legacy routes and health endpoints are removed, /health serves the probes, only US and UK remain, and the pre-merge traffic checks pass; linked pull request #4017 is already open.
由索引模型根据 Issue 内容生成。
描述
What
Remove what only legacy.policyengine.org or the API documentation used, move Cloud Run health checks to /health, and stop serving Canada, Nigeria and Israel.
- Routes removed:
/{country_id}/user-policy(POST, GET, PUT),/{country_id}/user-profile(POST, GET, PUT),GET /{country_id}/policies,GET /simulations,GET /andGET /specification.POST /{country_id}/calculatestays: it still serves about 140,000 requests a month, and its callers move first in a later change. - Health checks:
/healthreports ready only once the startup warmup has finished and the runtime configuration is valid (503 before), taking over from/readiness-check. The Cloud Run startup probe and the deployment's health checks poll it, and/liveness-checkand/readiness-checkare removed. - Countries: the v1 routes serve only the US and the UK, their country lists derive from the one country list in code, and the Canada, Nigeria and Israel model packages are no longer installed.
Why
The legacy site is being retired, and production request logs for the 30 days to 2026-10-19 show little else calling these routes: no requests for saved policies or user profiles, 13 for the policy search, 11 for the recent-simulations list, and about 24,300 for GET /, from an uptime monitor and link previews. Keeping them means keeping code, tests and a hand-written OpenAPI document that nothing uses. Two health-check routes beside /health make it unclear which one deployments rely on. About 1,160 requests named the three countries in those 30 days, 784 of them from the legacy site and 49 from app.policyengine.org (which stops offering them first); dropping their packages lowers the API's memory use.
Before merging
- legacy.policyengine.org is no longer served, and request logs show no remaining traffic to the removed routes or the three countries.
- The external uptime monitor polling
GET /is moved to/health.
- 主要语言
- Python
- 星标
- 18
- 派生
- 33
- 平均合并
- 2 天 18 小时
- 30 天内合并 PR
- 36
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PolicyEngine/policyengine-api 的其他 Issue
-
难度 1/5 1-3 小时 新手友好度 88/100
PolicyEngine/policyengine-api#3911 ·
维护者通常 3 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
PolicyEngine/policyengine-api#3910 ·
维护者通常 3 天内回复
-
Remove the unauthenticated v2 household list可能已有人在做 @MaxGhenis 于 1 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 20/100
PolicyEngine/policyengine-api#4031 ·
维护者通常 3 天内回复
-
Remove the v1 user routes and keep complete simulation and report results final可能已有人在做 @MaxGhenis 于 3 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 45/100
PolicyEngine/policyengine-api#4028 ·
维护者通常 3 天内回复
-
Store the metadata v3 reads in the v2 catalog, from PolicyEngine.py's public records可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
PolicyEngine/policyengine-api#4022 ·
维护者通常 3 天内回复
查看 PolicyEngine/policyengine-api 的全部 Issue
相似的 Issue
-
link-rot
难度 1/5 1 小时以内 新手友好度 67/100
-
难度 2/5 1-3 小时 新手友好度 82/100
developmentseed/titiler-cmr#265 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Insecure Brotli version <1.2.1可能已有人在做 @jamescw19 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
stac-utils/stac-fastapi-pgstac#438 · 1 个 reaction ·
-
bug triage
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复