Skip to content

Default unavailable deployment targets to fail-fast#424

Merged
ppXD merged 1 commit into
mainfrom
fix/unavailable-target-fail-fast-default
Jun 10, 2026
Merged

Default unavailable deployment targets to fail-fast#424
ppXD merged 1 commit into
mainfrom
fix/unavailable-target-fail-fast-default

Conversation

@ppXD

@ppXD ppXD commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

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.

@ppXD ppXD added this to the 1.8.17 milestone Jun 10, 2026
An unconfigured project's "Transient Deployment Targets" policy defaulted
to SkipAndContinue: when a target was unavailable at deployment start it
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 so an unreachable target
aborts the deployment up front. The fail-fast plumbing already existed in
phase 4 and the preview path; only the default value changes. System.Text.
Json keeps the property initializer when the field is absent, so a project
that explicitly persisted SkipAndContinue is preserved and only never-
configured projects pick up the new default. The per-project setting
remains the opt-out for operators who want the lenient behaviour.

The enum wire encoding is unchanged (value 0 stays SkipAndContinue); the
default is applied at the settings DTO, not by enum ordinal, so persisted
blobs are unaffected.
@ppXD
ppXD force-pushed the fix/unavailable-target-fail-fast-default branch from 5396973 to 90e9a2a Compare June 10, 2026 07:58
@ppXD
ppXD merged commit a76daf8 into main Jun 10, 2026
14 of 15 checks passed
@ppXD
ppXD deleted the fix/unavailable-target-fail-fast-default branch June 10, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant