-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
display error messages when dev-ks fails #2472
Conversation
41bd3c2
to
4933931
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried running it in a way that breaks, and the output looked like:
► Request reconciliation of dev-bucket, and dev-ks (timeout 30s) ...
✗ Kustomization flux-system/flux-system: Source 'GitRepository/flux-system' not found
✗ HelmRelease flux-system/ww-gitops: install retries exhausted
✗ HelmRelease flux-system/ww-gitops: Helm install failed: rendered manifests contain a resource that already exists. Unable to continue with install: Secret "cluster-user-auth" in namespace "flux-system" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: key "app.kubernetes.io/managed-by" must equal "Helm": current value is "tilt"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "ww-gitops"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "flux-system"
Last Helm logs:
✗ GitRepository flux-system/flux-system: failed to get secret 'flux-system/flux-system': Secret "flux-system" not found
✗ Error requesting reconciliation: timed out waiting for the condition
✔ Reconciliation is done.
So it's definitely discovering the sub-object's logs and showing them. There's some odd whitespace around Last Helm Logs
but I don't think that comes from us?
@@ -164,3 +172,66 @@ func CleanupBucketSourceAndKS(log logger.Logger, kubeClient *kube.KubeHTTP, name | |||
|
|||
return nil | |||
} | |||
|
|||
// FindConditionMessages finds the messages in the condition of objects in the inventory. | |||
func FindConditionMessages(kubeClient *kube.KubeHTTP, ks *kustomizev1.Kustomization) ([]string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be easier to understand this function with some tests serving as examples - could we add some?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure.
4933931
to
300b135
Compare
Signed-off-by: Chanwit Kaewkasi <chanwit@weave.works>
300b135
to
721a82b
Compare
Fixes #2462
Signed-off-by: Chanwit Kaewkasi chanwit@weave.works