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

Fixing error log formatting #449

Merged
merged 1 commit into from
Feb 29, 2024
Merged

Conversation

jpodivin
Copy link
Contributor

@jpodivin jpodivin commented Feb 8, 2024

No description provided.

@@ -291,7 +291,7 @@ func GetJobWithName(
job := &batchv1.Job{}
err := h.GetClient().Get(ctx, types.NamespacedName{Name: name, Namespace: namespace}, job)
if err != nil {
h.GetLogger().Info("GetJobWithName %s err: %w", name, err)
h.GetLogger().Info(fmt.Sprintf("GetJobWithName %s err: %s", name, err))
return job, err
Copy link
Contributor

Choose a reason for hiding this comment

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

I think its better to use return job, fmt.Errorf("GetJobWithName %s err: %w", name, err)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suppose.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Copy link
Contributor

@stuggi stuggi left a comment

Choose a reason for hiding this comment

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

/lgtm

@stuggi stuggi merged commit c0ef5e3 into openstack-k8s-operators:main Feb 29, 2024
2 checks passed
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.

2 participants