CI: check the catalogues and the static files once, not both as a step and as a test #725

Closed
opened 2026-10-04 20:43:14 +00:00 by tiagoagueda · 0 comments
Owner

Measured from Forgejo's task API and job logs, runs 561–710 (24 Sep – 4 Oct 2026): wall time per push about 52–55 min, up from about 15; the browser suite grew from 149 to 645 tests in five days and runs serially (29 min); the runner takes two jobs at a time, in the order the workflow file lists them, so the browser job starts 19–22 min after the push; and Forgejo cancels the older push run when a newer push lands, which stopped 18 of 56 browser jobs before they gave a verdict.

Several checks run on CI twice: as a step, and as a test the suite runs.

  • messages.py extract --check ↔ test_translations.py:205-242, whose docstring says it repeats the step.
  • messages.py check ↔ test_translations.py:187-202, 2 tests × 1,292 catalogues = 2,584 items.
  • messages.py stats --check ↔ test_messages_tool.py:411-415.
  • collectstatic with the manifest storage ↔ test_static.py:13-24.

Each re-parses the 1,292 catalogues (39.5 MB); with xdist's load distribution each worker that runs one of them parses them itself.

Proposal

Using the --durations output the CI logs gain, keep one of each pair: the in-suite test where it is cheap, because a developer running pytest before a push gets it for free; the step where the test is the slow one. Whatever is dropped is replaced by a sentence pointing at the other half.

Done when

  • Each of the four is checked once per push.
Measured from Forgejo's task API and job logs, runs 561–710 (24 Sep – 4 Oct 2026): wall time per push about 52–55 min, up from about 15; the browser suite grew from 149 to 645 tests in five days and runs serially (29 min); the runner takes **two jobs at a time, in the order the workflow file lists them**, so the browser job starts 19–22 min after the push; and Forgejo cancels the older push run when a newer push lands, which stopped 18 of 56 browser jobs before they gave a verdict. Several checks run on CI twice: as a step, and as a test the suite runs. - `messages.py extract --check` ↔ `test_translations.py:205-242`, whose docstring says it repeats the step. - `messages.py check` ↔ `test_translations.py:187-202`, 2 tests × 1,292 catalogues = 2,584 items. - `messages.py stats --check` ↔ `test_messages_tool.py:411-415`. - `collectstatic` with the manifest storage ↔ `test_static.py:13-24`. Each re-parses the 1,292 catalogues (39.5 MB); with xdist's `load` distribution each worker that runs one of them parses them itself. ## Proposal Using the `--durations` output the CI logs gain, keep one of each pair: the in-suite test where it is cheap, because a developer running `pytest` before a push gets it for free; the step where the test is the slow one. Whatever is dropped is replaced by a sentence pointing at the other half. ## Done when - Each of the four is checked once per push.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo#725
No description provided.