chore(api): use success state for preflight failures #3211
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
StateSucceededStateAppPreflightsFailedorStateAppPreflightsSucceededfor workflow trackingstatus.state === "Succeeded"AND!hasFailures(output)to determine overall successAffected areas:
api/controllers/app/apppreflight.go)api/controllers/linux/install/hostpreflight.go)cmd/installer/cli/headless/install/orchestrator.go)AppPreflightCheck.tsx,LinuxPreflightCheck.tsx)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 stateweb/src/components/wizard/installation/tests/AppPreflightCheck.test.tsx- Updated assertionsweb/src/components/wizard/installation/tests/AppPreflightPhase.test.tsx- Updated test expectationsweb/src/components/wizard/installation/tests/LinuxPreflightCheck.test.tsx- Updated assertionsweb/src/components/wizard/installation/tests/LinuxPreflightPhase.test.tsx- Updated test expectationsDoes this PR require a release note?
Does this PR require documentation?
NONE