-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Extract github.com/go-kit/kit/log to github.com/go-kit/log #1055
Comments
I support the idea in principle and would be happy to help make it happen. I have not yet thought it through enough to identify any blockers, but I have a hard time imagining any from a code or Go module perspective. If we move it to a separate repo what happens to the issue history? Clearly it can stay in the go-kit/kit repo in the short term. It would be nice to eventually have the new repo be self contained though. I have migrated git commit histories while splitting a repo in the past, but I haven't migrated issues, PRs, etc. I don't know what tooling might be available or how well it works. I have lots of questions about that. |
I really like this idea and it has been a blocker for one of my teams in the past to use Go kit's log. This can also provide us some experience if we want to refactor certain pieces to also live in their own repo's. Observability and Tracing instrumentation bridges come to mind. |
I'm sure there are tools that would let us extract and transplant the commit history from the kit repo, I'll look into that. On further thought, it might not be necessary to alias kit/log to kitlog, we could just freeze the kit/log package and point folks to the new one in the documentation. Thoughts? @basvanbeek Yep, I think the ultimate goal would be to extract all of the major units of functionality into their own repos/modules, and I think go-kit/tracing would be a good candidate for the next one. How do people feel about the name kitlog? How annoying is it to deal with the current name conflict? |
That is an option. It might be OK given the stability of the
My first reaction is negative to The existing name conflict with the stdlib log package only seems to impact me when first adding logging to some code and |
After some thought I think I'm actually -1 on |
We should also consider giving the Pros:
Cons:
Personally I think this maybe the best approach unless there is a downside I haven't thought of yet. |
There are enough caveats and complexities involved with multi-module repos that I would not willingly opt in to that unless I had no other choice. |
Thanks for the link. I hadn't read through that page in a while. I agree that in the current context there are some big downsides to making
IMO, the main show stopper is that we would have to create a fake dependency from So yes, after further consideration I agree a submodule is not such a great idea given that the |
That can easily be done with just git. I had a similar task once and I blogged about it here. If you need assistance with the split, I can help. |
With what @sagikazarmark mentioned it should be possible to transfer
rules out the mono-repo solution. In addition, What would it take to move this forward? Anything external contributors could do? |
What's the next step? Do you plan to introduce larger changes to the extracted log library? What about backwards compatibility? Do you plan to keep the log library in the main module as well? |
Imho the following is needed for a viable migration path:
Imho deprecation and possibly removal are needed to ensure we'll get the required transition to go-kit/log |
I intend to do that first step in the next few days, and I'll mark go-kit/log as deprecated in some way, but I won't be doing anything stronger than that. People who want to keep using go-kit/log in its current form may continue doing so indefinitely. |
Adding |
Yeah, and I don't think I want to do that. I'll probably just add a paragraph or something to the docs. |
If we are going to maintain both packages in perpetuity, what is the plan in terms of responding to bug reports or feature requests (which, thankfully are not high volume)? I would like to have a clearly documented plan for both packages that I understand before we pull the trigger on a full release of the new package. |
I don't intend to maintain kit/log after this. Maybe the official deprecation flag is the right thing to do. |
OK. What about the other parts of kit that import kit/log? Should we update them to import this package? Based on what's been said so far that would seem like the best plan. That would give us a sequence like:
I'm not sure which end game for go-kit/kit/log provides the best user experience. Personally I want to make sure that we don't cause a lot of problems for existing users with whatever we do there. Is it OK to ask people to change the import path at some point in the future when they upgrade to a new version of go-kit/kit? If so, when would we do that, and how would we communicate it? |
Ooh, good questions. Let me ponder. |
Note: README still contains some references to |
The only remaining references to It looks like It looks like Personally I feel like maybe we should just remove that section of the README. My sense is that the Go community has moved on from caring too much about the performance of logging packages. |
I'd like to release go-kit/log as step one, and then do any migrations in go-kit/kit afterwards. Beyond tagging a non-alpha v0.0.1 and updating the README, is there anything else that should happen? /cc @ChrisHines @sagikazarmark |
I agree with releasing the new repo before changing anything in go-kit/kit is the right approach. We'll need a proper release of the new module before anything else can depend on it anyway. I think updating the README is the only task left before making a release. What version will we call the new release? |
Quickly went through the docs and the readme, everything looks fine (apart from the notice in the readme). Any reason not to tag a minor version, eg. v0.1.0? |
|
@ChrisHines @sagikazarmark I would just do v0.0.1 by default, given the current thing is v0.0.1-alpha. But if there's a rationale for something different I'm all ears — would v0.1.0 make more sense by some rule of semver? (It will stay at major version 0 forever, if that affects the decision.) |
I don't think it matters that much. IMO v0.0.x usually means that it's a very early project tagged only to put something out there whereas a minor version sends the message that it's somewhat ready to use. In terms of semver, the last segment should only ever be used for patch releases that fixes something in a previous minor release which is not the case. tl;dr v0.1.0 sends a better message about the reliability of the package in my opinion, that's all. |
@sagikazarmark said:
I tend to agree, but I don't care that much for the initial tagging. @peterbourgon said:
👎 I understand the reluctance to tag v1.x.x as it relates to the frustration many have with forcing backwards compatibility concerns and not wanting to deal with v2+ modules. But this module seems like a good candidate for v1 since the API has been stable for years and I didn't think we had any plans to change it. I guess moving the packages to their own repo with a new module path creates an opportunity to make some changes without breaking the numerous dependents that use Please explain why you would like to keep this v0 forever? |
Don't fret — I have no plans to make any breaking changes, and would object to any breaking changes being made by others. In short, Go modules, and specifically Semantic Import Versioning, makes incorrect and invalid assumptions about what a major semantic version means. In my opinion, the consequences are severe enough that it is better, on balance, to opt out entirely. But I actually mis-spoke in my previous comment. I'll be happy to jump to a stable major version if and when SIV is made optional. |
Absent any intervention, I'll update the kit/log README to remove the giant disclaimer, and tag v0.1.0, tomorrow. |
Done. I initially intended to keep both packages around indefinitely; that may be a bad idea? Separate discussion, in any case. |
I have several use cases, now, where it would be beneficial if projects could use Go kit's package log without pulling in anything else. I would like to extract it to it's own module and package, tentatively named kitlog to avoid the name collision. And then I would like to point the existing package at it, maybe with type aliases if they are up for the task.
@ChrisHines — Do you think this is a reasonable idea, and is feasible? Can you identify any blockers?
The text was updated successfully, but these errors were encountered: