Loading
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
AppDeploymentaggregate for multi-zone deployments, with astaterollup over its childapp_instancesand adeploymentsenums module. - Persistence: new
app_deploymentstable, FK'd fromapp_instances;AppDeploymentRepositoryport + SQL adapter;AppInstanceRepositorygainslist_by_app_deployment_id. Repo is wired through the DI chain. - Service layer:
EdgeApplicationManagementService.create_app_deploymentandget_app_deployments; multi-zone deploy command / deploy target mappers;build_app_deployment_inforead mapper. - Completion handling:
app_deployments.stateis rolled up when an SRM operation completes, including multi-zone total-failure fallback (allapp_instancesflipped) and a guard against stale redelivered completions. - DELETE flow: request path issues the SRM teardown; completion path
finalises the deployment (
DELETED/ERROR). - Callbacks:
CallbackDeliveryPort.delivernow takes a CloudEvent array; POST/deploymentscallback is delivered as a single CloudEvents array. NewAppDeploymentStatusChangeCloudEvent domain types +build_app_deployment_status_change_eventsmapper. - Validation / guards: POST
/deploymentsrejects duplicate zones with 409; deploymentsinkCredentialis 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_repofor completion paths
Follow-ups (not in this MR)
- Real PATCH
/deploymentslogic (currently 501) - GET
/clusters(still 501) - Real secret store for
sinkCredential(currently 501)