-
Notifications
You must be signed in to change notification settings - Fork 39.7k
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
Use a forked version of glog in kubernetes #70264
Comments
/sig architecture |
/assign @thockin |
Thank you for doing this, @dims! Also:
|
I think we would also need to add verify scripts to prevent adding any new vendor dependencies that use glog. I'm actually very surprised we don't have more already:
|
I think that's because this project uses godep, not something like |
given the prevalence of glog usage in the go ecosystem, we also have to consider the impact of |
@dims I've had a look at your fork. Is there a list of specific objectives beyond flags and output? I think I'd be looking for something more pluggable overall if we commit to this pain. |
@liggitt to allow klog and glog to co-exist
|
@deads2k, there are a lot of discussions in many of the previous issues about things that can be done. I am deliberately trying to start simple here and unblock folks who want to do more things. For example, i would like to:
-- Dims |
I think allowing co-existence is a requirement if klog is referenced by our published repos. |
@liggitt agree. we should document what someone has to do if they are using glog today and want to import our stuff. |
It's not just about code directly owned by the vendorer. I vendor kube libraries and I vendor libraries from other authors that I do not own. Anything that requires me to change code to import and run with kube libraries can make that impossible.
@dims do you have a specific roadmap in mind? This feels like a switch from A to B, where B is more or less equivalent and any future direction change will face the same roadblocks as before. |
Right. klog should allow co-existence by default with no action taken by importers. The types of things required to do this are good practices anyway (don't register global flags in init blocks, etc). |
@deads2k regarding |
copying here for visibility (from kubernetes/org#195 (comment)):
|
Noting that one of the examples:
Is actually a dev-time dependency rather than being built into any k8s components. I don't think we need to worry too much about that (though we might as well migrate it too) cc @ixdy /cc |
@tallclair ack. One more data point for folks here. thanks @aledbf for showing me how Istio does this. based on his pointers here's a repo - https://github.com/dims/glog-minimal that redirects glog calls to klog This can work with some usecases like https://github.com/istio/istio/blob/master/Gopkg.toml#L61 (override the source using |
yes, migrating kazel is fine with me. |
We have 2 ways of co-existing with glog. the glog-minimal repo above or see the example in klog. So i believe we can move on to the steps listed above. @thockin @tallclair i am looking to you both to approve the org request as well :) Yes, please decide on the name as well. (klog vs glog) |
That's awesome that istio has already done this - that's exactly the route I was picturing us going. |
I'm not sure I see how this fixes conflicts with imports on "real" glog? If I have an app that uses What am I missing? |
@thockin if you are using Choice #1 - Keep Choice #2 - I don't care much about github.com/golang/glog` in charge of writing to disk, but i don't want to change all my existing code, what is my option?
|
Ahh, I see - some hackery is required.
…On Mon, Oct 29, 2018 at 1:27 PM Davanum Srinivas ***@***.***> wrote:
@thockin <https://github.com/thockin> if you are using
github.com/golang/glog pervasively and want to use client-go, then you
have 2 choices.
Choice #1 <#1> - Keep
github.com/golang/glog in charge of actual file operations using
example/pattern in:
-
https://github.com/dims/klog/blob/master/examples/coexist_glog/coexist_glog.go#L19-L22
Choice #2 <#2> - I don't
care much about github.com/golang/glog` <https://github.com/golang/glog>
in charge of writing to disk, but i don't want to change all my existing
code, what is my option?
- Use dep and override glog repository with
https://github.com/dims/glog-minimal
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#70264 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFVgVAM-0Uc1qMXnOeiqckQnS2iOlf5Bks5up2SXgaJpZM4X7XFx>
.
|
/sig instrumentation |
@kubernetes/sig-instrumentation-feature-requests @kubernetes/sig-architecture-feature-requests |
Based on the discussion in SIG-Arch on Oct 25 and previous experiment in #69333, we should start by forking glog, cleanup the code to suit our use cases and switch over to it. Also see issue #61006
Tasks:
cc @thockin @tallclair @erictune @justinsb @lavalamp
/kind feature
The text was updated successfully, but these errors were encountered: