Flows and dashboards are created by POST under an issued or superuser-pinned id; PUT only updates; deleted flows leave a tombstone with their key; the controller stores by id and runs by key, hooks live under /hooks/<flow id>; a key with state or queued work behind it is refused until cleared

This commit is contained in:
2026-11-02 17:41:23 +01:00
parent fae85f5ecb
commit 08a6376836
63 changed files with 2832 additions and 936 deletions
+3 -3
View File
@@ -36,10 +36,10 @@ def save(
) -> Callable[..., Any]:
"""Seed the flow as a superuser, then save a change as someone else."""
client.delete(f"{PREFIX}/{FLOW}", headers=superuser_token_headers)
seeded = client.put(
f"{PREFIX}/{FLOW}", headers=superuser_token_headers, json=a_flow(0)
seeded = client.post(
f"{PREFIX}/", headers=superuser_token_headers, json={**a_flow(0), "id": FLOW}
)
assert seeded.status_code == 200, seeded.text
assert seeded.status_code == 201, seeded.text
version = seeded.json()["definition"]["version"]
def put(headers: dict[str, str], **changes: Any) -> Any: