core(deploy): add deployedConfigSnapshot field to Deployment model

Appends DeploymentConfigSnapshot deployedConfigSnapshot to the Deployment
record and adds a matching withDeployedConfigSnapshot wither. All
positional call sites (repository mapper, test fixture) updated to pass
null; Task 1.4 will wire real persistence and Task 1.5 will populate
the field on RUNNING transition.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-22 21:31:48 +02:00
parent 06fa7d832f
commit 7f9cfc7f18
3 changed files with 11 additions and 2 deletions

View File

@@ -172,6 +172,7 @@ public class PostgresDeploymentRepository implements DeploymentRepository {
rs.getString("container_name"),
rs.getString("error_message"),
resolvedConfig,
null, // deployedConfigSnapshot — wired in Task 1.4
deployedAt != null ? deployedAt.toInstant() : null,
stoppedAt != null ? stoppedAt.toInstant() : null,
rs.getTimestamp("created_at").toInstant()

View File

@@ -48,7 +48,7 @@ class DeploymentStateEvaluatorTest {
private Deployment deployment(DeploymentStatus status) {
return new Deployment(DEP_ID, APP_ID, UUID.randomUUID(), ENV_ID, status,
null, null, List.of(), null, null, "orders-0", null,
Map.of(), NOW.minusSeconds(60), null, NOW.minusSeconds(120));
Map.of(), null, NOW.minusSeconds(60), null, NOW.minusSeconds(120));
}
@Test