Skip to content

Default unavailable deployment targets to fail-fast

Placeholder ppxd requested to merge fix/unavailable-target-fail-fast-default into main

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.UnavailableDeploymentTargets initializer) 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 SkipAndContinue is 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 stays SkipAndContinue); the default is applied at the DTO, not by enum ordinal, so persisted blobs are unaffected.

Test plan

  • Unit: serializer default → FailDeployment; explicit SkipAndContinue preserved 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): GetAsync on an unconfigured project returns FailDeployment
  • Regression: full Services.Deployments unit namespace 3983/3983 green; dotnet build Squid.sln 0 errors
  • E2E: not added — only the default value changed (a serializer/persistence concern, covered by unit + integration); the FailDeployment behaviour 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.

Merge request reports

Loading