Files
app/backend/fluksio/alembic/versions/d4a71e9c2b58_engine_event_run.py
T
stroblme 081d499edc Let a sweep run more than four at a time, and name the run a failure was in
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.
2026-08-27 14:17:51 +02:00

41 lines
1000 B
Python

"""engine_event.run
Which run an event happened in. The payload always carried it and the persist
path dropped it, so reading one run's failures meant filtering the global list.
Rows written before this carry an empty string, the same as anything that
belongs to no run at all.
Revision ID: d4a71e9c2b58
Revises: c7e2b9f34a15
Create Date: 2026-08-27
"""
import sqlalchemy as sa
import sqlmodel.sql.sqltypes
from alembic import op
# revision identifiers, used by Alembic.
revision = "d4a71e9c2b58"
down_revision = "c7e2b9f34a15"
branch_labels = None
depends_on = None
def upgrade():
op.add_column(
"engine_event",
sa.Column(
"run",
sqlmodel.sql.sqltypes.AutoString(length=64),
nullable=False,
server_default="",
),
)
op.create_index("ix_engine_event_run", "engine_event", ["run"])
def downgrade():
op.drop_index("ix_engine_event_run", table_name="engine_event")
op.drop_column("engine_event", "run")