Skip to content
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

Better logging for the apply task #1663

Merged
merged 1 commit into from
Aug 27, 2020
Merged

Better logging for the apply task #1663

merged 1 commit into from
Aug 27, 2020

Conversation

zen-dog
Copy link
Contributor

@zen-dog zen-dog commented Aug 26, 2020

which includes the GVK of the object in question to speed up the debugging when applying fails.

Signed-off-by: Aleksey Dukhovniy [email protected]

which includes the GVK of the object in question to speed up debugging when applying fails.

Signed-off-by: Aleksey Dukhovniy <[email protected]>
@@ -118,7 +118,7 @@ func applyResources(rr []runtime.Object, ctx Context) ([]runtime.Object, error)
switch {
case apierrors.IsNotFound(err): // create resource if it doesn't exist
if err := addLastAppliedConfigAnnotation(r); err != nil {
return nil, fmt.Errorf("failed to add last applied config annotation to %s/%s: %w", key.Namespace, key.Name, err)
return nil, fmt.Errorf("failed to add last applied config annotation to a %s %s: %w", r.GetObjectKind().GroupVersionKind(), key, err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does GroupVersionKind() look as a string?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gerred you're making me look lazy! :DD thanks!

Copy link
Contributor

@alenkacz alenkacz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@zen-dog zen-dog merged commit ad70978 into main Aug 27, 2020
@zen-dog zen-dog deleted the ad/logging-improvements branch August 27, 2020 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants