Skip to content

Conversation

@emosbaugh
Copy link
Member

@emosbaugh emosbaugh commented Nov 14, 2025

What this PR does / why we need it:

This PR changes the preflight status state model to better distinguish between execution success and check results. Previously, the status state would be set to "Failed" when preflight checks failed, which conflated execution failure with check failure.

Key changes:

  • The status state now represents whether the preflight execution completed successfully, not whether the checks passed
  • When preflights complete execution successfully:
    • Status is always set to StateSucceeded
    • Description indicates whether checks passed or failed ("App preflights completed with failures" vs "App preflights succeeded")
    • The actual pass/fail results are contained in the preflight output
  • The internal state machine still transitions to StateAppPreflightsFailed or StateAppPreflightsSucceeded for workflow tracking
  • Frontend components now check status.state === "Succeeded" AND !hasFailures(output) to determine overall success

Affected areas:

  • App preflight controller (api/controllers/app/apppreflight.go)
  • Host preflight controller (api/controllers/linux/install/hostpreflight.go)
  • Headless installer orchestrator (cmd/installer/cli/headless/install/orchestrator.go)
  • Frontend components (AppPreflightCheck.tsx, LinuxPreflightCheck.tsx)
  • Tests updated to reflect new behavior

This provides clearer semantics: execution succeeded but checks may have failed, versus execution itself failing (e.g., due to an error running the preflight binary).

Which issue(s) this PR fixes:

Does this PR require a test?

Tests have been updated:

  • tests/dryrun/v3_install_preflights_test.go - Updated to check for succeeded state
  • web/src/components/wizard/installation/tests/AppPreflightCheck.test.tsx - Updated assertions
  • web/src/components/wizard/installation/tests/AppPreflightPhase.test.tsx - Updated test expectations
  • web/src/components/wizard/installation/tests/LinuxPreflightCheck.test.tsx - Updated assertions
  • web/src/components/wizard/installation/tests/LinuxPreflightPhase.test.tsx - Updated test expectations

Does this PR require a release note?

NONE

Does this PR require documentation?

NONE

@emosbaugh emosbaugh marked this pull request as ready for review November 14, 2025 22:53
@emosbaugh emosbaugh requested a review from sgalsaleh November 14, 2025 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants