Let a sweep run more than four at a time, and name the run a failure was in
Docs / docs (push) Successful in 29s
Playwright Tests / test-playwright (1, 2) (push) Successful in 3m33s
Playwright Tests / test-playwright (2, 2) (push) Successful in 2m3s
pre-commit / pre-commit (push) Failing after 3m9s
Test Backend / test-backend (push) Successful in 2m46s
Compose Smoke Test / test-compose (push) Successful in 39s
Playwright Tests / merge-reports (push) Successful in 1m47s
Docs / docs (push) Successful in 29s
Playwright Tests / test-playwright (1, 2) (push) Successful in 3m33s
Playwright Tests / test-playwright (2, 2) (push) Successful in 2m3s
pre-commit / pre-commit (push) Failing after 3m9s
Test Backend / test-backend (push) Successful in 2m46s
Compose Smoke Test / test-compose (push) Successful in 39s
Playwright Tests / merge-reports (push) Successful in 1m47s
Concurrent runs sat at 4 whatever FLOW_MAX_CASCADES said: that setting bounds cascades, and the run drivers read a hardcoded MAX_PARALLEL nobody could reach. FLOW_MAX_RUNS is the knob they read now, --max-runs/--max-cascades/--max-workers are the same three as flags on serve, and the engine says which numbers it started with — which is the only way to tell that a settings file was read. Events keep the run they happened in. The payload always carried it and the persist path dropped it, so reading one run's failures meant filtering the engine-wide list; a batch run's id reaches those events now too, since a run has no journaled item to name itself by. Also: a provisioner's 0 means "no deadline" rather than "cancel on the next reconcile", and a command that reaches no engine says how to start one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015sbYeYaVgYQqm1sbx7wPdL
This commit is contained in:
@@ -224,3 +224,27 @@ def test_a_traceback_no_failure_ever_claims_is_dropped() -> None:
|
||||
asyncio.run(collector.flush())
|
||||
|
||||
assert collector._tracebacks == {}
|
||||
|
||||
|
||||
def test_a_failure_keeps_the_run_it_happened_in(db: Session) -> None:
|
||||
"""The payload always carried it; the row used to drop it.
|
||||
|
||||
A batch run publishes no `cascade_started`, so there is no `FlowRun` beside
|
||||
this — which is exactly the case that had no way of being asked about.
|
||||
"""
|
||||
collector = MetricsCollector(EventBus())
|
||||
ts = datetime.now(UTC).replace(second=0, microsecond=0).timestamp()
|
||||
collector.handle(
|
||||
{
|
||||
"type": "node_error",
|
||||
"flow": FLOW,
|
||||
"node": NODE,
|
||||
"error": "ValueError: in a run",
|
||||
"run": "run-abc123",
|
||||
"ts": ts,
|
||||
}
|
||||
)
|
||||
asyncio.run(collector.flush())
|
||||
|
||||
failure = db.exec(select(EngineEvent).where(EngineEvent.run == "run-abc123")).one()
|
||||
assert failure.detail.startswith("ValueError: in a run")
|
||||
|
||||
Reference in New Issue
Block a user