Skip to content

Commit

Permalink
fix: mark UpgradeFailed as ready=true
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe authored and moshloop committed Jun 25, 2024
1 parent 4b54dd8 commit 07fb534
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/health/health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ func TestFluxResources(t *testing.T) {
assert.Contains(t, status.Message, "err='accumulating resources from 'kubernetes_resource_ingress_fail.yaml'")

assertAppHealth(t, "./testdata/flux-helmrelease-healthy.yaml", "ReconciliationSucceeded", health.HealthHealthy, true)
assertAppHealth(t, "./testdata/flux-helmrelease-unhealthy.yaml", "UpgradeFailed", health.HealthUnhealthy, false)
assertAppHealth(t, "./testdata/flux-helmrelease-upgradefailed.yaml", "UpgradeFailed", health.HealthUnhealthy, false)
assertAppHealth(t, "./testdata/flux-helmrelease-unhealthy.yaml", "UpgradeFailed", health.HealthUnhealthy, true)
assertAppHealth(t, "./testdata/flux-helmrelease-upgradefailed.yaml", "UpgradeFailed", health.HealthUnhealthy, true)
helmreleaseStatus := getHealthStatus("./testdata/flux-helmrelease-upgradefailed.yaml", t)
assert.Contains(t, helmreleaseStatus.Message, "Helm upgrade failed for release mission-control-agent/prod-kubernetes-bundle with chart [email protected]: YAML parse error on mission-control-kubernetes/templates/topology.yaml: error converting YAML to JSON: yaml: line 171: did not find expected '-' indicator")
assert.Equal(t, helmreleaseStatus.Status, health.HealthStatusUpgradeFailed)
Expand Down
1 change: 1 addition & 0 deletions pkg/health/statusMap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ HelmRelease: &flux
UpgradeFailed:
health: unhealthy
order: 1
ready: true
onUnknown:
status: Reconciling
nonReady: true
Expand Down

0 comments on commit 07fb534

Please sign in to comment.