Commit c96bcf1
committed
[iris] Simplify replay system: tests-only, drop SQL traces, flatten goldens
Address review feedback:
- Replay code lives under ``lib/iris/tests/cluster/controller/replay/``
instead of ``lib/iris/src/iris/cluster/controller/replay/``. It's
test infrastructure; belongs with the tests.
- Drop the SQLite ``set_trace_callback`` hook and the ``sql_trace``
module. The trace was dominated by 500+ migration DDL lines and the
DB-state dump already catches every behavioral drift we care about.
Reverts the ~10-line ``db.py`` addition.
- Flatten golden tree: ``golden/<scenario>/db.json`` -> ``golden/<scenario>.json``.
``sql.txt`` goldens deleted.
- Merge ``events.py`` and ``dispatcher.py`` into a single module.
- Move ``frozen_clock`` out of every scenario into a top-level context
manager entered once by the test runner, after ``ControllerDB``
construction.
- Delete the ``run.py`` CLI and ``__main__.py``. Running
``pytest lib/iris/tests/cluster/controller/replay/`` is the full
workflow; a CLI can be added back if marin-checkpoint-seeded runs
are wanted.
Also from the PR-B review:
- ``register_or_refresh_worker`` docstring updated: the attr-cache
update and audit line are scheduled as ``cur.on_commit`` hooks,
not returned to callers.
- ``service.launch_job`` closes the submit-with-replace TOCTOU by
running the existing-job check and the conditional cleanup in a
single transaction. ``submit_job`` still opens its own tx
downstream; a concurrent submitter between the two txs collides on
the jobs PK (legitimate error, not corruption).
Tests: 815 passed on the controller suite; 13 replay goldens match
exactly. pyrefly clean in the controller tree.1 parent ab4b8ba commit c96bcf1
40 files changed
Lines changed: 725 additions & 9192 deletions
File tree
- lib/iris
- src/iris/cluster/controller
- replay
- tests/cluster/controller/replay
- golden
- buffer_direct_kill
- cancel_running_job
- coscheduled_timeout
- direct_provider_cycle
- endpoint_register_remove
- preempt_task
- prune_old_data
- register_assign_run_succeed
- replace_reservation_claims
- submit_simple
- submit_with_reservation
- task_failure_with_retry
- worker_failure_cascade
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | 297 | | |
306 | 298 | | |
307 | 299 | | |
| |||
423 | 415 | | |
424 | 416 | | |
425 | 417 | | |
426 | | - | |
427 | | - | |
428 | 418 | | |
429 | 419 | | |
430 | 420 | | |
| |||
This file was deleted.
This file was deleted.
Lines changed: 0 additions & 102 deletions
This file was deleted.
This file was deleted.
0 commit comments