[iris] Consolidate scheduling context and fix SQL cache misses#5776
Conversation
|
Claude finished @rjpower's task in 11m 13s —— View job Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. Review process
Both bug-scan agents found no bugs. The CLAUDE.md agents raised three candidates (in-place mutation of
|
yonromai
left a comment
There was a problem hiding this comment.
🤖 Approved. I did not find merge-blocking issues in the shared scheduler context cleanup.
Validation:
git diff --check origin/main...HEADuv run --directory lib/iris --group dev python -m pytest --tb=short tests/cluster/controller/test_preemption.py tests/cluster/controller/test_reservation.py tests/cluster/controller/test_scheduling_fairness.py tests/test_budget.py(141 passed)uv run --directory lib/iris --group dev python -m pytest --tb=short tests/cluster/controller/test_scheduler.py -k 'soft_constraint or max_building or building_limit or diagnostics'(5 passed)uv run --with pyrefly pyrefly check lib/iris/src/iris/cluster/controller/controller.py lib/iris/src/iris/cluster/controller/scheduler.py lib/iris/src/iris/cluster/controller/reads.py lib/iris/src/iris/cluster/controller/service.py lib/iris/src/iris/cluster/controller/transitions.py lib/iris/src/iris/cluster/types.py(0 errors)
Generated with Codex.
86df161 to
5ceef81
Compare
|
🤖 Specification (PR is over 500 LOC). Problem and findings (py-spy of the running iris-controller, 10s):
Approach:
Reservation gate cleanup that fell out of (1)-(2):
Verification:
|
Profile-driven cleanup of the iris-controller scheduling loop. Merges SchedulingTickContext into SchedulingContext and deletes the create_scheduling_context wrapper layers (Controller and Scheduler methods, from_workers classmethod); Controller.last_scheduling_context now backs the dashboard diagnostics RPC. Converts 19 SQL call sites to expanding bindparam to reuse SQLAlchemy compiled statements. Drops zstd encoder level to -1. Consolidates _building_counts into reads.py with shared snapshots.