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

Do not depend on concrete logger #389

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

luhring
Copy link
Member

@luhring luhring commented Apr 12, 2023

The Melange Pipeline type shouldn't rely on a concrete type like *logrus.Entry, because this requires users to have a concrete type or nil, and nil causes panics in the logger implementation.

Using an abstraction instead allows consumers to use other loggers (including a nopLogger) when logging isn't needed or wanted.

This caused a panic in wolfictl, and a forthcoming wolfictl PR will take advantage of this change (with tests!).

Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
@luhring luhring requested a review from a team as a code owner April 12, 2023 18:42
@luhring luhring enabled auto-merge April 12, 2023 18:46
@luhring luhring merged commit 225b6a2 into chainguard-dev:main Apr 12, 2023
@luhring luhring deleted the fix-logger-panics branch April 12, 2023 18:48
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