operator-framework / operator-controller

Apache License 2.0
28 stars 47 forks source link

Upgrade status improvements given Helm as the underlying installer #985

Open bentito opened 5 days ago

bentito commented 5 days ago

In the clusterextension_controller.go we ask the underlying Helm client to upgrade a bundle. This may fail. Unfortunately, there are no error types for Helm upgrade errors.

Error messages could be parsed and branched on, they range from: useful for users of the API to ambiguous. Here is a sampling with links to the issues they are drawn from:

failed to create patch: map: map[] does not contain declared merge key: name https://github.com/helm/helm/issues/9259

has no deployed releases https://github.com/helm/helm/issues/7160

context deadline exceeded https://github.com/helm/helm/issues/9094

UPGRADE FAILED: failed to create patch: map: map[] does not contain declared merge key: name https://github.com/helm/helm/issues/9259

create: failed to create: context deadline exceeded https://github.com/helm/helm/issues/9094

Error: UPGRADE FAILED: failed to create patch: map: map[] does not contain declared merge key: name https://github.com/helm/helm/issues/9259

Looks like there are no changes for Deployment https://github.com/helm/helm/issues/5792

context deadline exceeded https://github.com/helm/helm/issues/9094

UPGRADE FAILED: failed to create patch: map: map[] does not contain declared merge key: name https://github.com/helm/helm/issues/9259

no deployed releases https://github.com/helm/helm/issues/7160

failed to create patch: map: map[] does not contain declared merge key: name https://github.com/helm/helm/issues/9259

This issue is to track the need to report properly when actionable upgrade errors are found.