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:
@@ -89,9 +89,10 @@ def ensure_flow(api: Api) -> None:
|
||||
try:
|
||||
current = api.call("GET", f"/api/v1/flows/{BENCH_FLOW}")
|
||||
definition["version"] = current["definition"]["version"]
|
||||
api.call("PUT", f"/api/v1/flows/{BENCH_FLOW}", definition)
|
||||
except urllib.error.HTTPError:
|
||||
pass
|
||||
api.call("PUT", f"/api/v1/flows/{BENCH_FLOW}", definition)
|
||||
# Pinned to its key, so every path below can name it.
|
||||
api.call("POST", "/api/v1/flows/", {**definition, "id": BENCH_FLOW})
|
||||
api.call(
|
||||
"PUT", f"/api/v1/flows/{BENCH_FLOW}/nodes/noop/source", {"code": NODE_SOURCE}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user