Skip to content

Commit

Permalink
fix: fallback to helm error when no pods failed
Browse files Browse the repository at this point in the history
  • Loading branch information
abuchanan-airbyte committed Sep 13, 2024
1 parent 1927aa3 commit 771c238
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/cmd/local/local/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func (c *Command) diagnoseAirbyteChartFailure(ctx context.Context, chartErr erro

if podList, err := c.k8s.PodList(ctx, airbyteNamespace); err == nil {

errors := []string{}
var errors []string
for _, pod := range podList.Items {
if pod.Status.Phase == corev1.PodFailed {
msg := "unknown"
Expand All @@ -352,7 +352,9 @@ func (c *Command) diagnoseAirbyteChartFailure(ctx context.Context, chartErr erro
errors = append(errors, fmt.Sprintf("pod %s: %s", pod.Name, msg))
}
}
return fmt.Errorf("unable to install airbyte chart:\n%s", strings.Join(errors, "\n"))
if errors != nil {
return fmt.Errorf("unable to install airbyte chart:\n%s", strings.Join(errors, "\n"))
}
}
return fmt.Errorf("unable to install airbyte chart: %w", chartErr)
}
Expand Down

0 comments on commit 771c238

Please sign in to comment.