Default unavailable deployment targets to fail-fast
Summary
- An unconfigured project's "Transient Deployment Targets" policy defaulted to
SkipAndContinue: an unavailable target at deployment start was silently dropped and the deployment still reported success. A failed target masquerading as a green deploy is a dangerous default. - Flip the unconfigured default to
FailDeployment(TransientDeploymentTargetsDto.UnavailableDeploymentTargetsinitializer) so an unreachable target aborts the deployment up front. The fail-fast plumbing already existed in phase 4 (PrepareDeploymentPhase) and the preview path — only the default value changes. -
Behavioural change, deliberately scoped: System.Text.Json keeps the property initializer when the field is absent, so a project that explicitly persisted
SkipAndContinueis preserved; only never-configured projects pick up fail-fast. The per-project "Transient Deployment Targets" setting remains the opt-out for operators who want the lenient behaviour. - The unhealthy-target default (
Exclude) is unchanged. The enum wire encoding is unchanged (value 0 staysSkipAndContinue); the default is applied at the DTO, not by enum ordinal, so persisted blobs are unaffected.
Test plan
-
Unit: serializer default → FailDeployment; explicitSkipAndContinuepreserved over the default (opt-out) -
Unit: evaluator ApplyProjectPolicy(null/empty/invalid)→ unavailable →FailedUnavailable, unhealthy still excluded; preview⇿deploy convergence still holds -
Unit: phase 4 — null settings + unavailable target throws DeploymentTargetException; null settings + only-unhealthy still excludes (no throw) -
Integration (real DB): GetAsyncon an unconfigured project returnsFailDeployment -
Regression: full Services.Deploymentsunit namespace 3983/3983 green;dotnet build Squid.sln0 errors -
E2E: not added — only the default value changed (a serializer/persistence concern, covered by unit + integration); the FailDeploymentbehaviour and its phase-4/preview plumbing are unchanged and already covered
Operator note
The frontend Deployment Settings UI renders the enum value the API returns, so an unconfigured project now shows "Fail deployment" preselected (the accurate new default) — no frontend change required.