Docs for key renames: ids and keys in the flow concepts, the rename routes, events and 503s in the API reference, hooks during a rename, sync and run metrics after one; a pinned restore refused for its recorded key names that key in the 409
Docs / docs (push) Successful in 3m11s
Playwright Tests / test-playwright (1, 2) (push) Successful in 11m42s
Playwright Tests / test-playwright (2, 2) (push) Successful in 2m22s
pre-commit / pre-commit (push) Successful in 3m12s
Test Backend / test-backend (3.12) (push) Successful in 6m19s
Test Backend / test-backend (3.14) (push) Successful in 5m59s
Compose Smoke Test / test-compose (push) Successful in 37s
Playwright Tests / merge-reports (push) Successful in 1m12s

This commit is contained in:
2026-11-03 08:09:35 +01:00
parent f9d5f510c2
commit b7f1d21712
7 changed files with 75 additions and 9 deletions
+5 -3
View File
@@ -67,7 +67,7 @@ from fluksio.flow.resources import (
from fluksio.flow.runs import RUN_STATE_TTL, RunService, sweep_artifacts
from fluksio.flow.secrets import init_secrets
from fluksio.flow.state import MemoryState, RedisState, StateBackend
from fluksio.flow.store import FlowStore, IdentityChange, InvalidName
from fluksio.flow.store import FlowStore, IdentityChange, InvalidName, RecordedKey
from fluksio.flow.tombstones import Tombstones
from fluksio.flow.watchdog import LoopWatchdog
from fluksio.flow.workers import PythonWorkerPool
@@ -673,8 +673,10 @@ async def invalid_name(request: Request, exc: InvalidName) -> JSONResponse: # n
@app.exception_handler(IdentityChange)
async def identity_change(request: Request, exc: IdentityChange) -> JSONResponse: # noqa: ARG001
"""A save that would change an object's id or key, which no save may."""
return JSONResponse(status_code=409, content={"detail": str(exc)})
"""A save that would change an object's id or key, which no save may. A
restore refused for its key names the one its history is filed under."""
key = {"key": exc.key} if isinstance(exc, RecordedKey) else {}
return JSONResponse(status_code=409, content={"detail": str(exc), **key})
@app.exception_handler(DeviceUnavailable)
+1 -1
View File
@@ -391,7 +391,7 @@ def test_a_pinned_restore_takes_its_history_back(
headers=superuser_token_headers,
json={**plain, "name": f"{key}_b", "id": pin},
)
assert other.status_code == 409
assert other.status_code == 409 and other.json()["key"] == key
restored = client.post(
f"{FLOWS}/", headers=superuser_token_headers, json={**plain, "id": pin}
)