-
Notifications
You must be signed in to change notification settings - Fork 17.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
x/build: use new name for release branches in golang.org/x repos starting with Go 1.16 #36882
Comments
Yes, we should document that users are supposed to track The branches need to exist so we have something to backport commits to when we need to vendor them in a previous Go release, without importing everything that happened on master. See #36851 for an example of the use case. I don't understand how submodules make tracking master any harder than tracking a release branch. |
I would suggest naming them something like "internal/release-branch.go1.13" to prevent consumers from thinking they are proper release branches.
It's just because master moves ahead a lot, and afaik submodules cannot really "lock" to a specific commit when you do |
As a data point, k8s was also using the release branches of the subrepos, presumably misunderstanding them for what you are supposed to use with a certain Go version. kubernetes/kubernetes#93264 (comment) @golang/osp-team, does any subrepo have a different policy, or are they all using the release branches for vendoring into the go tree, and not for public consumption? |
The Go 1 compatibility promise's section about Sub-repositories says that
I always assumed that these release branches in the golang.org/x/* repos were these compatibility tags. Even if no common policy for the subrepos currently exists, the section should be updated if it is not current anymore. Since this is also what is linked to on the Go website its not surprising that people expect these release branches to be compatible releases. |
@jbeisswenger-cetitec I think you're right: we have not been adding the tags that the compatibility document promises. But rather than update the doc, I think we should change the release process to add those tags. CC @dmitshur for release process update. |
I agree with @jbeisswenger-cetitec that the text at https://golang.org/doc/go1compat#subrepos is either confusing or misleading, and doesn't seem to correspond to reality. As a minor side-note, we've been moving in the direction of preferring to use the term "golang.org/x repositories" instead of "sub-repositories" as of a few years ago.
@ianlancetaylor Do you have something specific in mind; if so, can you please elaborate? Or is your suggestion that we should do the work of investigating what a concrete strategy for creating tags should look like? (I imagine that the right time to create a tag indicating "this version is the last one known to support Go 1.N" is when Go 1.N+2 is released, as that's when we stop testing golang.org/x repos with Go 1.N. But I'm not sure what a good tag name would be.) |
My concrete suggestion is that when we cut a release 1.N, we add a a tag go1.N at the tip of each supported subrepo. That will indicate a location at that subrepo that supports release 1.N. We aren't promising to tag the last version of each subrepo that supports that release, just some version. (I would be fine with moving the tags forward if we know that a later version works with a particular release, but I don't think that is essential.) |
@ianlancetaylor Thanks to clarifying. I think that is a very reasonable strategy to consider. Making the change to the release process that would cause those tags to get created (and never updated) should be fairly easy and inexpensive to do, but I think it's worth considering these questions before we proceed with implementing it:
Once we create tags, especially ones we expect people to use and rely on, it's not something we can undo easily, so I think we need to be fairly confident the new strategy will be more helpful than harmful, and also sustainable to keep up, before we commit to doing it. I plan to bring this issue up and discuss it with @cagedmantis and @toothrot tomorrow. This issue had NeedsFix and Documentation labels applied back when @FiloSottile suggested documenting that users should use |
I don't think we should create these tags. First, git tags shouldn't move but we can't recommend the same commit forever, both because in general we should not encourage using old versions of the modules, and because specifically when there is a security issue we need to steer people towards the updated version. In practice, implementing this would require branches. Second, developers look at the golang.org/x modules for guidance on how to manage their own modules, and I don't think tagging per-Go version releases is something we want to bless as a best practice. The Go compatibility promise is there to keep developer updating rather than supporting them on older and older versions. Finally, I don't see the utility: all our modules should support at I think we should amend that sub-repositories paragraph, and do our best to communicate that golang.org/x modules are just any other modules, and discourage people from using the release branches which are just implementation details of how we do vendoring in the standard library. (Ideally, we'd also rename them to something else than |
Here's another example of release branch misuse: the Homebrew formula for Go builds golang.org/x/tools/cmd/godoc at Users think these branches are what they should use with the associated Go version, or at least they think they are maintained like the main repo release branches. This is a common and reasonable misconception that I don't think we are going to fix with documentation alone. It's also a real concern for security fixes, as those are only committed to I suggest starting with Go 1.16 we rename them to This will not break any current users but hopefully will cause anyone using them to migrate to |
I'm in favor of renaming our release branches in golang.org/x repos starting with Go 1.16. I think that solution has good properties. It will require some changes in testing/release infrastructure and access controls, but they should be small and easy to do.
We've had the occasional need to make additional release branches in golang.org/x repos:
(With #36852, #41409 being marked as release blockers, I expect those exact needs will not reoccur, but we may still run into a new reason to need additional internal branches.) How about a minor adjustment to your suggestion for a more scaleable pattern:
Then the access controls can be updated so that only release managers can submit CLs to branches matching the regexps (I initially considered @FiloSottile Does this minor adjustment to the naming pattern still have the properties you're looking for? @toothrot, @cagedmantis, @ianlancetaylor Does the plan above sound good to you, so we can move this issue to NeedsFix state? |
I like |
Discussed this in a release meeting, moving to NeedsFix and taking. If there are newly found concerns or suggestions, we can still adjust the plan before Go 1.16 RC 1, when release branches in golang.org/x repos will be cut. |
We've updated our release process to start creating branches that follow the new internal naming scheme, and it has been used with the Go 1.16 release. We've also updated permissions in CL 283262 (requires additional permissions to view) so that this statement from golang.org/wiki/MinorReleases continues to be true:
I think this is all done now, so closing. |
There's one more place that needs updating, opened #46154 to track it. |
Change https://golang.org/cl/319790 mentions this issue: |
Fixes golang/go#46154. Updates golang/go#36882. Change-Id: I6369d88298e0e75f4aa960f3de453dd71a794579 Reviewed-on: https://go-review.googlesource.com/c/build/+/319790 Reviewed-by: Carlos Amedee <carlos@golang.org> Run-TryBot: Carlos Amedee <carlos@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Trust: Dmitri Shuralyov <dmitshur@golang.org>
See #36842 for background. I asked this question on that thread, but didn't get an answer. If the release branches in x/crypto are not intended for public consumption, they simply should not exist. This is especially confusing because this repo (golang/go) does use release branches for their standard purpose. If clients are really just supposed to use latest master regardless of their actual Go version, that should be stated clearly in the README. Also, I don't understand why changes are getting merged to release branches instead of just master.
Note: We do not use go mod because we have found it to be incredibly cumbersome. Instead, we use git submodules. So not having a proper release branch to track is rather annoying.
The text was updated successfully, but these errors were encountered: