Dask scheduler and workers for the test profile and CI; writes-overlap, cancel and remote-mode tests

The compose test profile and the CI python job run a Dask scheduler and two workers (1500 MiB each; compose caps: worker 3 GB, scheduler 512 MB) so remote mode is tested for real.
This commit is contained in:
2026-11-29 04:47:06 -06:00
parent 5859555c7b
commit 9971583a7f
4 changed files with 48 additions and 2 deletions
+16
View File
@@ -38,6 +38,9 @@ jobs:
PGHOST: postgres
FHIR_VALIDATOR_JAR: /opt/fhir/validator_cli.jar
SYNTHEA_JAR: /opt/synthea/synthea.jar
DASK_SCHEDULERS: tcp://127.0.0.1:8786
DASK_TEST_SCHEDULER: tcp://127.0.0.1:8786
DASK_EXPECTED_WORKERS: "2"
steps:
- uses: actions/checkout@v4
- run: git submodule update --init
@@ -60,6 +63,19 @@ jobs:
- run: uv run ruff check
- run: uv run ruff format --check
- run: uv run lint-imports
- name: Dask scheduler and two workers, for the remote-mode tests
run: |
uv run dask scheduler --port 8786 --dashboard-address 127.0.0.1:8787 > /tmp/dask-scheduler.log 2>&1 &
uv run dask worker tcp://127.0.0.1:8786 --nworkers 2 --nthreads 1 --memory-limit 1500MiB > /tmp/dask-workers.log 2>&1 &
uv run python -c "
import time
from distributed import Client
c = Client('tcp://127.0.0.1:8786', timeout=60)
deadline = time.time() + 60
while len(c.scheduler_info()['workers']) < 2 and time.time() < deadline:
time.sleep(1)
assert len(c.scheduler_info()['workers']) == 2
"
- run: uv run pytest -q -rs -m "not webapp" # the pages run in the web job
web:
+1 -1
Submodule WebApi updated: 25955b80e8...0a4deea370
+30
View File
@@ -101,16 +101,22 @@ services:
# `docker compose run --rm test`: the whole suite but the pages, on SQLite and PostgreSQL,
# with OCR, the HL7 validator and the SQL Server a site's documents come from.
# It also runs the Dask scheduler and workers the remote-mode tests use.
test:
build: { context: ., target: test }
image: isssteleon-rebuild:test
profiles: [test]
environment:
POSTGRES_TEST_URL: postgresql://postgres:postgres@postgres-test:5432/platform
PGHOST: postgres-test
SITE_SQL_SERVER: mssql+pymssql://sa:Test-only-Site-1@site-sql-test:1433
DASK_SCHEDULERS: tcp://dask-scheduler:8786
DASK_TEST_SCHEDULER: tcp://dask-scheduler:8786
DASK_EXPECTED_WORKERS: "2"
depends_on:
postgres-test: { condition: service_healthy }
site-sql-test: { condition: service_healthy }
dask-worker: { condition: service_started }
site-sql-test:
<<: *sql-server
@@ -126,5 +132,29 @@ services:
interval: 2s
retries: 30
dask-scheduler:
build: { context: ., target: test }
image: isssteleon-rebuild:test
profiles: [test]
command: dask scheduler --port 8786 --dashboard-address :8787
mem_limit: 512m
memswap_limit: 512m
cpus: 1
healthcheck:
test: [CMD, python, -c, "import urllib.request as u; u.urlopen('http://localhost:8787/health')"]
interval: 2s
retries: 30
dask-worker:
build: { context: ., target: test }
image: isssteleon-rebuild:test
profiles: [test]
command: dask worker tcp://dask-scheduler:8786 --nworkers 2 --nthreads 1 --memory-limit 1500MiB
mem_limit: 3g
memswap_limit: 3g
cpus: 2
depends_on:
dask-scheduler: { condition: service_healthy }
volumes:
site-sql:
+1 -1
Submodule models updated: 0b4f7593e5...8c910e7500