Repository navigation
Add --external-postgres to killbench.py and run its smoke mode weekly - #159
Merged
Merged
Conversation
benchmarks/killbench.py gains --external-postgres. Without it,
orchestrate() calls bench.ensure_docker() and bench.ensure_container(),
which manage a local Docker Desktop container through `docker --context
desktop-linux`, and a GitHub Actions runner has neither that context nor
a docker binary. The flag skips exactly those two calls. The rest of the
setup, ensure_databases(), migrate(), truncate() and
collect_environment(), goes through plain psycopg or Django and works
against any PostgreSQL reachable at bench.PG (127.0.0.1:54330, user
postgres, password ox), the values benchsite/settings_ox.py and its
kill-test derivatives already hard-code, so a service container that
publishes that port needs no settings change. Without the flag the
harness runs exactly as before.
.github/workflows/kill-smoke.yml is new. Its smoke job starts a
postgres:16 service container on port 54330, installs the checked-out
package with Django~=6.1.0 and django-tasks-db==0.13.0, and runs
killbench.py --smoke --external-postgres. django-tasks-db is in no
dependency group: the harness's tasksdb arm imports it directly, and the
explicit pin keeps an upstream db_worker flag change from failing this
job without a deliberate bump here. A second step reads the
results-kill-*-SMOKE.json the harness writes and fails the job if either
arm's harness_ok_all is false, or if in the django-ox arm any task never
reached a terminal state or ended FAILED or LOST. Those three counts are
not checked for the tasks-db arm: it leaves RUNNING rows behind by
design, as the README's "Worker death" disclosures record, so a check
over both arms could never pass. Results and worker logs upload as an
artifact whether the job passes or fails, matched by glob, so the
harness's own -SMOKE filename suffix is kept.
The job runs on a weekly schedule, Wednesday 05:00 UTC ("0 5 * * 3"),
clear of this repository's other two schedules at 03:17 daily and 06:00
on Mondays; on workflow_dispatch; and on a pull request that touches
what the job depends on: the workflow file itself, killbench.py,
bench.py and benchsite/**. The job reads no github.event.pull_request.*
or other pull-request-only expression, so a green run means the same
thing under any of the three triggers.
benchmarks/README.md: the opening line of the "Worker death" section
said the harness reuses bench.py for the container; it now says so for
the default path only and names --external-postgres for the other one.
A new bullet in that section's disclosure list names the weekly workflow
and states that a failing scheduled run reaches only whoever last
committed to the workflow file; nothing else in this repository watches
it. A new "Reproduce this yourself" subsection gives the commands for
the smoke run and the full run, where each writes its output, and how to
submit a run from another host: attach the JSON to an issue or pull
request here.
Nothing in django-ox itself changes, only how its worker-death harness
is exercised and reported on. benchmarks/ is not shipped in the package,
sits outside the ruff and mypy configuration, and gets no CHANGELOG
entry.
Closes #145
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
benchmarks/killbench.py gains --external-postgres. Without it,
orchestrate() calls bench.ensure_docker() and bench.ensure_container(),
which manage a local Docker Desktop container through
docker --context desktop-linux, and a GitHub Actions runner has neither that context nora docker binary. The flag skips exactly those two calls. The rest of the
setup, ensure_databases(), migrate(), truncate() and
collect_environment(), goes through plain psycopg or Django and works
against any PostgreSQL reachable at bench.PG (127.0.0.1:54330, user
postgres, password ox), the values benchsite/settings_ox.py and its
kill-test derivatives already hard-code, so a service container that
publishes that port needs no settings change. Without the flag the
harness runs exactly as before.
.github/workflows/kill-smoke.yml is new. Its smoke job starts a
postgres:16 service container on port 54330, installs the checked-out
package with Django~=6.1.0 and django-tasks-db==0.13.0, and runs
killbench.py --smoke --external-postgres. django-tasks-db is in no
dependency group: the harness's tasksdb arm imports it directly, and the
explicit pin keeps an upstream db_worker flag change from failing this
job without a deliberate bump here. A second step reads the
results-kill-*-SMOKE.json the harness writes and fails the job if either
arm's harness_ok_all is false, or if in the django-ox arm any task never
reached a terminal state or ended FAILED or LOST. Those three counts are
not checked for the tasks-db arm: it leaves RUNNING rows behind by
design, as the README's "Worker death" disclosures record, so a check
over both arms could never pass. Results and worker logs upload as an
artifact whether the job passes or fails, matched by glob, so the
harness's own -SMOKE filename suffix is kept.
The job runs on a weekly schedule, Wednesday 05:00 UTC ("0 5 * * 3"),
clear of this repository's other two schedules at 03:17 daily and 06:00
on Mondays; on workflow_dispatch; and on a pull request that touches
what the job depends on: the workflow file itself, killbench.py,
bench.py and benchsite/**. The job reads no github.event.pull_request.*
or other pull-request-only expression, so a green run means the same
thing under any of the three triggers.
benchmarks/README.md: the opening line of the "Worker death" section
said the harness reuses bench.py for the container; it now says so for
the default path only and names --external-postgres for the other one.
A new bullet in that section's disclosure list names the weekly workflow
and states that a failing scheduled run reaches only whoever last
committed to the workflow file; nothing else in this repository watches
it. A new "Reproduce this yourself" subsection gives the commands for
the smoke run and the full run, where each writes its output, and how to
submit a run from another host: attach the JSON to an issue or pull
request here.
Nothing in django-ox itself changes, only how its worker-death harness
is exercised and reported on. benchmarks/ is not shipped in the package,
sits outside the ruff and mypy configuration, and gets no CHANGELOG
entry.
Closes #145