Commit 8cf5fe40 authored by Dimitrios Gogos's avatar Dimitrios Gogos
Browse files

fix: reject duplicate application instantiation in app instance flow

parent 5cc48529
Loading
Loading
Loading
Loading
+7 −0
Changes for oeg/app-instance-flow.md: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -158,6 +158,13 @@ POST /appinstances (CAMARA NBI)
  6a. Resolve appId → app_registrations row
       (400 if unknown — createAppInstance's vendored response codes have no 404,
        see external-specs/index.md; yields the internal app_registration_id, ADR-0010)
  6b. Reject duplicate instantiation:
       if a non-terminal app_instances row already exists for
       (app_registration_id, edgeCloudZoneId) → 409 ALREADY_EXISTS
       "Application already instantiated in the given Edge Cloud Zone"
       (vendored spec's documented 409; terminal = failed/terminated, which
        do not block re-instantiation). Checked after 6 so an idempotent
        retry replays instead of conflicting.
  7. Generate operation_id (UUID)          ← internal platform operation handle
  8. Generate app_instance_id (UUID)       ← the appInstanceId (one, single zone)
  9. Write operations row → PENDING, and one app_instances row