woodpecker main.yaml: serialise test-FTs-room behind test-FTs-non-room — both FT steps share the workspace AND fall back to SQLite (only test-UTs-n-ITs sets DATABASE_URL to the postgres service), so running them concurrently collided on src/test_db.sqlite3: the second-to-start container hit a half-created DB and the runner's Type 'yes' to delete the existing test database prompt EOFed under non-interactive CI stdin (pipeline run #296); fix flips test-FTs-room.depends_on from test-two-browser-FTs → test-FTs-non-room so the heavy room cluster strictly follows the non-room bucket; section comment rewritten from "Parallel FT split" → "FT split (sequential for now)" w. the run #296 EOFError documented + two re-parallelisation paths spelled out for later (per-step distinct sqlite paths via DATABASE_URL=sqlite:////tmp/test_db_<bucket>.sqlite3 OR per-step distinct postgres DBs); the two stale "parallel" mentions (collectstatic note in test-two-browser-FTs + inline comment in test-FTs-room) also updated; screendumps + build-and-push depends_on unchanged — Woodpecker resolves the transitive ordering fine
Code architected by Disco DeDisco <discodedisco@outlook.com> Git commit message Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -52,7 +52,7 @@ steps:
|
|||||||
- pip install -r requirements.dev.txt
|
- pip install -r requirements.dev.txt
|
||||||
- cd ./src
|
- cd ./src
|
||||||
# Also collectstatic'd here; output sits in the shared workspace so
|
# Also collectstatic'd here; output sits in the shared workspace so
|
||||||
# the downstream parallel FT steps don't have to repeat it.
|
# the downstream FT steps don't have to repeat it.
|
||||||
- python manage.py collectstatic --noinput
|
- python manage.py collectstatic --noinput
|
||||||
- python manage.py test functional_tests --tag=two-browser
|
- python manage.py test functional_tests --tag=two-browser
|
||||||
- python manage.py test functional_tests --tag=sequential
|
- python manage.py test functional_tests --tag=sequential
|
||||||
@@ -64,19 +64,31 @@ steps:
|
|||||||
- "requirements.txt"
|
- "requirements.txt"
|
||||||
- ".woodpecker/main.yaml"
|
- ".woodpecker/main.yaml"
|
||||||
|
|
||||||
# ── Parallel FT split ─────────────────────────────────────────────────
|
# ── FT split (sequential for now) ─────────────────────────────────────
|
||||||
#
|
#
|
||||||
# test_game_room_* is the heaviest cluster — 9 Selenium-driven room-flow
|
# test_game_room_* is the heaviest cluster — 9 Selenium-driven room-flow
|
||||||
# FTs that historically dominate the FT step wall-clock (~70% of the
|
# FTs that historically dominate the FT step wall-clock (~70% of the
|
||||||
# ~40-min single-step runs). Split off into its own step (`test-FTs-room`)
|
# ~40-min single-step runs). Split off into its own step (`test-FTs-room`)
|
||||||
# that runs in parallel with the rest (`test-FTs-non-room`). Both depend
|
# so the partition is visible in the pipeline view; the non-room bucket
|
||||||
# on test-two-browser-FTs (which leaves collectstatic'd assets in the
|
# runs first as `test-FTs-non-room`. test-FTs-non-room depends on
|
||||||
# shared workspace), so neither parallel step re-runs collectstatic.
|
# test-two-browser-FTs (collectstatic'd assets in shared workspace);
|
||||||
|
# test-FTs-room depends on test-FTs-non-room.
|
||||||
#
|
#
|
||||||
# Tradeoff: 2 concurrent Selenium/Firefox containers on the runner
|
# NOTE — currently sequential, not parallel. Both FT steps share the
|
||||||
# instead of 1, in exchange for roughly halved test-FT wall-clock when
|
# workspace AND fall back to SQLite (only test-UTs-n-ITs has
|
||||||
# the partition stays balanced. If the runner thrashes, drop the
|
# `DATABASE_URL` pointing at the postgres service). When they ran
|
||||||
# `depends_on` from one to serialize them again.
|
# concurrently (both depending on test-two-browser-FTs), the second
|
||||||
|
# step to start hit a half-created `src/test_db.sqlite3` and prompted
|
||||||
|
# "Type 'yes' to delete the existing test database" → EOFError under
|
||||||
|
# non-interactive CI stdin. See pipeline run #296.
|
||||||
|
#
|
||||||
|
# To re-parallelise later, give each step its own DB:
|
||||||
|
# - point `DATABASE_URL` at distinct sqlite paths per step
|
||||||
|
# (e.g. `sqlite:////tmp/test_db_room.sqlite3` vs `_non_room`), or
|
||||||
|
# - have each step point at its own postgres DB (the existing
|
||||||
|
# `postgres` service already exposes one; spin up a second or
|
||||||
|
# `CREATE DATABASE` per step).
|
||||||
|
# Until then, test-FTs-room runs after test-FTs-non-room.
|
||||||
|
|
||||||
- name: test-FTs-non-room
|
- name: test-FTs-non-room
|
||||||
image: gitea.earthmanrpg.me/discoman/python-tdd-ci:latest
|
image: gitea.earthmanrpg.me/discoman/python-tdd-ci:latest
|
||||||
@@ -108,7 +120,7 @@ steps:
|
|||||||
- name: test-FTs-room
|
- name: test-FTs-room
|
||||||
image: gitea.earthmanrpg.me/discoman/python-tdd-ci:latest
|
image: gitea.earthmanrpg.me/discoman/python-tdd-ci:latest
|
||||||
depends_on:
|
depends_on:
|
||||||
- test-two-browser-FTs
|
- test-FTs-non-room
|
||||||
environment:
|
environment:
|
||||||
HEADLESS: 1
|
HEADLESS: 1
|
||||||
CELERY_BROKER_URL: redis://redis:6379/0
|
CELERY_BROKER_URL: redis://redis:6379/0
|
||||||
@@ -122,8 +134,9 @@ steps:
|
|||||||
- pip install -r requirements.dev.txt
|
- pip install -r requirements.dev.txt
|
||||||
- cd ./src
|
- cd ./src
|
||||||
# Heavy Selenium room flows — 9 files (deck_contrib, gatekeeper,
|
# Heavy Selenium room flows — 9 files (deck_contrib, gatekeeper,
|
||||||
# invite, select_role/sea/sig/sky, tray, tray_tooltip) isolated into
|
# invite, select_role/sea/sig/sky, tray, tray_tooltip) isolated
|
||||||
# their own parallel sub-step.
|
# into their own sub-step. Runs after test-FTs-non-room (shared
|
||||||
|
# SQLite test DB; see split-rationale comment above).
|
||||||
- python manage.py test --parallel --exclude-tag=channels --exclude-tag=two-browser $(ls functional_tests/test_game_room_*.py | sed 's|/|.|g;s|\.py||')
|
- python manage.py test --parallel --exclude-tag=channels --exclude-tag=two-browser $(ls functional_tests/test_game_room_*.py | sed 's|/|.|g;s|\.py||')
|
||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
|
|||||||
Reference in New Issue
Block a user