Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Remove the routes only the legacy site used, check health at /health, and stop serving Canada, Nigeria and Israel

未关闭
#4,016 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

@anth-volk 已经在做这个了。

开始于 2026年10月22日。

  • #4017 来自 @anth-volk —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
重构
描述清晰度
描述清楚
活跃度
停滞
技术栈
fastapi, google-cloud, python

调研方向

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 / and GET /specification. POST /{country_id}/calculate stays: it still serves about 140,000 requests a month, and its callers move first in a later change.
  • Health checks: /health reports 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-check and /readiness-check are 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

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PolicyEngine/policyengine-api 的其他 Issue

查看 PolicyEngine/policyengine-api 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。