Run the full-catalog integration tests only when a change can affect them
维护者通常 2 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
调研方向
Start with .github/workflows/v2-integration-check.yml and the two named full-catalog tests; review tests/fixtures/v2_catalog.py to understand the existing fixture. Add pull-request coverage for the specified value shapes in PostgreSQL, and isolate the full-catalog tests behind the described change-path conditions, nightly schedule, and manual dispatch. Done means the lightweight checks run on every pull request, the full tests run when required, and the linked pull request indicates this work is already underway.
由索引模型根据 Issue 内容生成。
描述
Problem
The check "Cross-database integration tests / MySQL, PostgreSQL, and Redis integration" (job catalog-runtime-integration in .github/workflows/v2-integration-check.yml) took 7 to 38 minutes over the last 12 successful pull request runs, with no code change between them; the spread follows the runner that picks the job up. With "Test" split into shards, it becomes the longest pull request job.
Two steps take 85 to 90% of the job. Each loads the complete installed PolicyEngine.py catalog (extract_installed_catalog(), about 1.2 million parameter values) in its own process:
- "Verify the installed PolicyEngine.py catalog interface" (
tests/integration/test_v2_catalog_installed.py): 363 s on run 41067605238, about 120 s on a fast runner. - "Qualify production-scale v2 metadata publication" (
tests/integration/test_v2_catalog_publication_qualification.py): 1,157 s on the same run, about 180 s on a fast runner.
Their outcome can change only when the installed packages, the catalog code, the v2 schema or the tests themselves change. Every other pull request repeats them for nothing.
The small catalog fixture the other publication tests use (tests/fixtures/v2_catalog.py) holds two parameter values, both plain numbers, so a pull request that skipped the full catalog would not check how PostgreSQL stores the other value shapes extraction accepts.
Change
- Add a small catalog of deliberately chosen edge cases (one parameter value of each shape extraction accepts, bracket parameters, open-ended and one-day date ranges, region filters), publish it to PostgreSQL on every pull request, and assert that each value comes back unchanged.
- Move the two full-catalog tests into their own job in the same workflow, loading the catalog once for both, with runner diagnostics (
nproc,free -m,lscpu) and--durations=10. - In that job, compare the commit with the pull request's base (or the previous push) and run the full-catalog tests only when the change touches
uv.lock,pyproject.toml, the catalog code, the catalog's database models, the v2 migrations, the two tests or the workflow. The job itself always runs and passes, so "CI complete" and the release run's check of the merge run keep working. - Run the full-catalog tests every night and on manual dispatch.
Each release still publishes the full catalog to staging and production (seed-v2-database.yml) before it deploys.
- 主要语言
- Python
- 星标
- 18
- 派生
- 33
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 72
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PolicyEngine/policyengine-api 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
PolicyEngine/policyengine-api#4037 ·
维护者通常 2 天内回复
-
难度 1/5 1-3 小时 新手友好度 88/100
PolicyEngine/policyengine-api#3911 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
PolicyEngine/policyengine-api#3910 ·
维护者通常 2 天内回复
-
Split the pull request tests into the same six shards as the release tests可能已有人在做 @anth-volk 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
PolicyEngine/policyengine-api#4144 ·
维护者通常 2 天内回复
-
service: policyengine-simulation-py telemetry-error
难度 4/5 1-2 天 新手友好度 35/100
PolicyEngine/policyengine-api#4138 ·
维护者通常 2 天内回复
查看 PolicyEngine/policyengine-api 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 86/100
NousResearch/hermes-agent#147104 ·
维护者通常 1 天内回复
-
premises-missing
难度 1/5 1 小时以内 新手友好度 88/100
WingedGuardian/GENesis-AGI#3801 ·
维护者通常 1 天内回复
-
[oblt-aw][autodoc] Document new required `shared-org-key` input for `obs-aw-dependency-review`可能已有人在做 @github-actions 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
bot-triaged module: inductor oncall: pt2 topic: fuzzer triaged
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 4 天内回复