Skip to content

Commit

Permalink
fix: fall back to helm error when no pods failed (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
abuchanan-airbyte authored Sep 16, 2024
1 parent 9c63a57 commit cf6fc76
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 @@ -316,7 +316,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 {
c.tel.Attr(fmt.Sprintf("pod-%s-phase", pod.Name), string(pod.Status.Phase))

Expand All @@ -338,7 +338,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 cf6fc76

Please sign in to comment.