Give a rate-limit flush its own run, linked to the run that held the value
A flush ran its cascade under no id, so its executions and failures belonged to no run. It now records a run with source "flush", and the holding run's id travels on the queue item into a new `flow_run.parent` column, also on the `/observability/runs` rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
"""flow_run.parent
|
||||
|
||||
A rate-limit flush is a run of its own now, and this names the run whose value
|
||||
it released. Rows written before this carry an empty string, the same as every
|
||||
run that continues no other.
|
||||
|
||||
Revision ID: 930ffa094aad
|
||||
Revises: b7d2e9c4a1f3
|
||||
Create Date: 2026-10-15
|
||||
|
||||
"""
|
||||
|
||||
import sqlalchemy as sa
|
||||
import sqlmodel.sql.sqltypes
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "930ffa094aad"
|
||||
down_revision = "b7d2e9c4a1f3"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(
|
||||
"flow_run",
|
||||
sa.Column(
|
||||
"parent",
|
||||
sqlmodel.sql.sqltypes.AutoString(length=64),
|
||||
nullable=False,
|
||||
server_default="",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_column("flow_run", "parent")
|
||||
Reference in New Issue
Block a user