Run the full-catalog integration tests only when a change can affect them
Maintainer antworten meist innerhalb von 2 Tagen
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Python
- Sterne
- 18
- Forks
- 33
- Ø Merge
- 2 T. 3 Std.
- Gemergte PRs (30 T.)
- 72
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus PolicyEngine/policyengine-api
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
PolicyEngine/policyengine-api#4037 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
PolicyEngine/policyengine-api#3911 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
PolicyEngine/policyengine-api#3910 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
service: policyengine-simulation-py telemetry-error
Schwierigkeit 4/5 1-2 Tage Anfängerfreundlichkeit 15/100
PolicyEngine/policyengine-api#4151 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Split the pull request tests into the same six shards as the release testsEvtl. vergeben @anth-volk hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
PolicyEngine/policyengine-api#4144 ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in PolicyEngine/policyengine-api
Ähnliche Issues
-
question
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
conda-forge/vc-feedstock#132 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
limitlessprojects/Go-Hybrid#3342 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
UKGovernmentBEIS/inspect_ai#6268 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
LSSTDESC/rail_sompz#42 ·
-
All tests fail with 'EXITED with status 3' on pytest 9.2.0 (TestReport._id is not marshallable)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
pytest-dev/pytest-forked#113 ·