feat: implement multi-zone edge application deployments (/deployments)

What this does

Implements the EAM /deployments resource end to end, adding multi-zone edge application deployment support on top of the existing single-instance flow.

Endpoints

Method Path Status in this MR
POST /deployments Implemented
GET /deployments (list) Implemented
DELETE /deployments/{id} Implemented (request + completion finalisation)
PATCH /deployments/{id} 501 stub (message only)

Key changes

  • Domain model: new AppDeployment aggregate for multi-zone deployments, with a state rollup over its child app_instances and a deployments enums module.
  • Persistence: new app_deployments table, FK'd from app_instances; AppDeploymentRepository port + SQL adapter; AppInstanceRepository gains list_by_app_deployment_id. Repo is wired through the DI chain.
  • Service layer: EdgeApplicationManagementService.create_app_deployment and get_app_deployments; multi-zone deploy command / deploy target mappers; build_app_deployment_info read mapper.
  • Completion handling: app_deployments.state is rolled up when an SRM operation completes, including multi-zone total-failure fallback (all app_instances flipped) and a guard against stale redelivered completions.
  • DELETE flow: request path issues the SRM teardown; completion path finalises the deployment (DELETED / ERROR).
  • Callbacks: CallbackDeliveryPort.deliver now takes a CloudEvent array; POST /deployments callback is delivered as a single CloudEvents array. New AppDeploymentStatusChange CloudEvent domain types + build_app_deployment_status_change_events mapper.
  • Validation / guards: POST /deployments rejects duplicate zones with 409; deployment sinkCredential is rejected with 501 rather than silently dropped.

Testing

  • New: test_app_deployment_repo.py, test_eam_endpoints.py
  • Extended: test_eam_service.py, test_eam_flows.py (e2e POST/DELETE flows), test_eam_mapper.py, test_app_instance_repo.py
  • Fakes updated: fake SRM worker + wire_app_deployment_repo for completion paths

Follow-ups (not in this MR)

  • Real PATCH /deployments logic (currently 501)
  • GET /clusters (still 501)
  • Real secret store for sinkCredential (currently 501)

Merge request reports

Loading
Loading