fix health check error (#2447)

This commit is contained in:
Matt Hill
2023-10-06 15:25:58 -06:00
committed by GitHub
parent 3ca9035fdb
commit 01f0484a0e
2 changed files with 3 additions and 9 deletions

View File

@@ -159,7 +159,7 @@ export class AppShowPage {
errorText = 'Not running' errorText = 'Not running'
fixText = 'Start' fixText = 'Start'
} else if (depError.type === DependencyErrorType.HealthChecksFailed) { } else if (depError.type === DependencyErrorType.HealthChecksFailed) {
errorText = 'Health check failed' errorText = 'Required health check not passing'
} else if (depError.type === DependencyErrorType.Transitive) { } else if (depError.type === DependencyErrorType.Transitive) {
errorText = 'Dependency has a dependency issue' errorText = 'Dependency has a dependency issue'
} }

View File

@@ -116,11 +116,7 @@ export class DepErrorService {
// not running // not running
if ( if (
depStatus !== PackageMainStatus.Running && depStatus !== PackageMainStatus.Running &&
depStatus !== PackageMainStatus.Starting && depStatus !== PackageMainStatus.Starting
!(
depStatus === PackageMainStatus.BackingUp &&
depInstalled.status.main.started
)
) { ) {
return { return {
type: DependencyErrorType.NotRunning, type: DependencyErrorType.NotRunning,
@@ -133,11 +129,10 @@ export class DepErrorService {
'health-checks' 'health-checks'
]) { ]) {
if ( if (
depInstalled.status.main.health[id].result !== HealthResult.Success depInstalled.status.main.health[id]?.result !== HealthResult.Success
) { ) {
return { return {
type: DependencyErrorType.HealthChecksFailed, type: DependencyErrorType.HealthChecksFailed,
check: depInstalled.status.main.health[id],
} }
} }
} }
@@ -212,7 +207,6 @@ export interface DependencyErrorConfigUnsatisfied {
export interface DependencyErrorHealthChecksFailed { export interface DependencyErrorHealthChecksFailed {
type: DependencyErrorType.HealthChecksFailed type: DependencyErrorType.HealthChecksFailed
check: HealthCheckResult
} }
export interface DependencyErrorTransitive { export interface DependencyErrorTransitive {