Describe the bug
is_conflict (libs/ferriskey-cli-core/src/import/apply.rs) recognises a conflict only from a 409, or a 400 whose body contains exist. The server answers 500 when a realm name is already taken (a raw realms_name_key unique violation), so re-running an import stops at its first line instead of converging — while the file header promises that "an import can be replayed to converge".
Expected behaviour
Replaying an import must converge. Two changes, either of which helps on its own:
- Widen
is_conflict to recognise a unique-constraint violation surfaced as a 500 (the body names the constraint), so the CLI stays usable against servers already deployed.
- Have the server answer
409 — tracked in ferriskey/ferriskey.
Point 1 should not be dropped once point 2 ships: the CLI has to keep working against older servers.
A skipped conflict should be reported in ImportReport as "already present", so a converging run is distinguishable from one that did nothing.
Environment
ferris-ctl 0.2.3, FerrisKey server 0.7.0
Describe the bug
is_conflict(libs/ferriskey-cli-core/src/import/apply.rs) recognises a conflict only from a409, or a400whose body containsexist. The server answers500when a realm name is already taken (a rawrealms_name_keyunique violation), so re-running an import stops at its first line instead of converging — while the file header promises that "an import can be replayed to converge".Expected behaviour
Replaying an import must converge. Two changes, either of which helps on its own:
is_conflictto recognise a unique-constraint violation surfaced as a500(the body names the constraint), so the CLI stays usable against servers already deployed.409— tracked inferriskey/ferriskey.Point 1 should not be dropped once point 2 ships: the CLI has to keep working against older servers.
A skipped conflict should be reported in
ImportReportas "already present", so a converging run is distinguishable from one that did nothing.Environment
ferris-ctl 0.2.3, FerrisKey server 0.7.0