-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add RFC to unify log output #308
base: main
Are you sure you want to change the base?
Add RFC to unify log output #308
Conversation
I agree that it's not ideal to have two different output formats. It looks disjointed and makes it harder to follow what is happening. The hard problem is what to do about it. I wasn't around for the original discussions around the output format so I don't have context on why it's like this. I'm sure there are reasons. If anyone knows and can elaborate on them, I think that would be helpful, so we can figure out a plan that tries to address all of the concerns. From visual inspection, the most notable difference is color vs no color. What other differences are there? @c0d1ngm0nk3y it might help to include sample outputs of each in the RFC, and a suggested new format as well, so we can see the present state and what we're working towards. |
The main problem for me is that the logger from
Is it? The hard part might coming to a decision, but the actual doing should be rather easy. Correct me if I am missing something. I see 3 options:
tbh, I am not so sure that there are reasons and I don't call personal preferences a valid reason.
I guess that is the main point. Together with the styling (e.g. italics), it makes the log easier to read. @c0d1ngm0nk3y it might help to include sample outputs of each in the RFC, and a suggested new format as well, so we can see the present state and what we're working towards. Good point. I have added a screenshot. |
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 like the proposal and agree that the current state is bad.
We should probably use the RFC phase to agree on a concrete implementation, shouldn't we?
Hence this is a LGTM without setting the story approved.
100%, this is the hard part.
I agree this would be ideal, but I don't see this happening until we solve the problem of having libpak & packit.
Personally, this would be the easiest :) since all the buildpacks I help maintain already use this, but it's unfair for those working on buildpacks that don't. I don't think it's reasonable to expect them to just switch (if this were commercial software we could do that, but not with OSS software). I also don't know about having libpak/packit take dependencies on each other. Maybe that would work, but it makes me concerned that you get into a weird situation where buildpacks are not consistently using one implementation (libpak or packit), and it makes them harder to understand/work with. It also makes me concerned about the possibility of circular dependencies. I'd rather see them stay totally separate.
It's a little more work up front to match the outputs, but logging never really changes so it's a one-time effort. If we just change the logging implementation to output logging in the same way as libpak, then no buildpacks have to change. Next time packit is updated, the format changes and everything looks consistent. This would be my vote, but I feel like that means very little since it doesn't impact me. We 100% need folks from @paketo-buildpacks/tooling-maintainers and the Paketo buildpacks that use packit to chime in on this RFC.
The tricky part here is that this mostly amounts to personal preference. I'm sure there are folks that like the packit output style better. If we want this to work, and not turn into a bike shedding exercise, my thought is that we need to focus on the problems solved by the two formats and see if we can agree on a single format that addresses the problems. We know that color output is one issue. The colors look nice to some people, others may not want it. Some CI systems also don't handle color output well, so you see the actual terminal characters and not the color. I think this is easy to solve though, we can set an env variable that disables color output. I think I'd invite others to chime in with problems that are solved in their respective logging format (i.e. why is the format the way it is) so that we can focus on those and make sure the result of this RFC covers those issues. Other issues that come to mind:
|
Instead of rewriting the same code, we could add a Thoughts? I could try this for |
@c0d1ngm0nk3y Who is responsible for putting together the first POC for a unified log output? I think that we need a POC to understand the size and scope of this project so that we can begin to game plan how this needs to be rolled out. |
Summary
There are 2 different ways logging is done in the buildpacks:
packit/v2
seem to usepackit/v2/scribe
libpak
seem to uselibpak/bard
Use Cases
Using a meta buildpack containing buildpacks from both approaches, e.g see npm sample
Checklist