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 logMirrorChoice to ctx for log #1099
Conversation
|
LGTM |
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.
LGTM
|
LGTM |
|
I get that this is an “easy quick improvement”, and I don’t have any similarly easy suggestion, but I’m not too happy about a library just logging like this without giving the caller much say in where the log goes, especially on such a frequent path that everyone is going to hit. Conceptually this probably belongs into the |
|
Could you explain why it would be better to be in |
|
Yes, that’s the major current producer (+ one event after Notably CRI-O is using that interface already: https://github.com/cri-o/cri-o/blob/8a05a29873456911db9a5c85a8d569e4a0db0ee3/server/image_pull.go#L171 It’s, for the most part, not the job of c/image to provide an UI, but it should allow callers to create an UI. (OTOH, admittedly, “ Or maybe the mirror choice could go to Either way we’re looking at some kind of API break to I suppose one way to shut me up is to gate this behind a |
|
@mtrmac PTAL. Change to use the |
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.
LGTM. I’m not happy about this but blocking this small improvement on building infrastructure for ImageSource API changes is not proportionate.
Add DockerLogMirrorChoice to types.SystemContext for keeping log level of the physical pull source of images. Crio could set it log the image source if it's from a mirror. Signed-off-by: Qi Wang <qiwan@redhat.com>
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1881694
This BZ needs change the log level of the image pull location from the debug to info.
Add DockerLogMirrorChoice to types.SystemContext for keeping log level of the physical pull source of images.
Crio could set it to log the image source if it's from a mirror.
Signed-off-by: Qi Wang qiwan@redhat.com