-
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: update x/ dependencies in untagged x/ repos when applying tags #56530
Comments
I found this issue because I wanted to ask why are we blindly updating x/ module inter-dependencies. I'm not sure consumers (us included) should be forced to update every (or, rather, an arbitrary subset) x/ repo every time they update one, if there is no actually related change. For example, v0.3.0 of x/crypto depends on v0.2.0 of x/net because of the automatic upgrades, but the standard library is on v0.1.0. CL 353849 needs to bring in a recent x/crypto change. Without that upgrade, I could have just pulled x/crypto up in CL 353849. Instead, I now have to make a separate CL that also imports unrelated http2 changes in x/net. |
@FiloSottile This question is a better fit for issue #36905, if I understand it correctly. With the 1.20 freeze coming up next week, we will be updating the |
@dmitshur I don't think it's related to #36905: first, the stdlib case is just an example of why a consumer might not want to pull in unrelated updates when updating a x/ repo. Non-stdlib modules might also want to selectively update. Second, if the This issue is about automatically updating x/ dependencies in untagged x/ repos. What I'm saying is that I don't understand why we are automatically updating x/ dependencies in any x/ repos at all. |
In general it isn't feasible to test every Keeping the dependencies within our repos reasonably up-to-date limits that skew to a smaller interval of time and a smaller of interval of changes, making it more likely that the incompatibility will be noticed (and fixed) quickly and also reducing the number of commits that may need to be bisected in order to diagnose a regression. (Note that we can update the |
As a data point, #57147 reported It would be nice if those kinds of fixes could happen automatically. |
Another data point (#57217): |
...and, here is exactly the case in point.
If we were updating the |
Change https://go.dev/cl/487615 mentions this issue: |
One more data point: x/pkgsite is untagged so its x/mod dependency wasn't automatically updated. If this issue were resolved, #62031 might've been resolved sooner or avoided. |
Change https://go.dev/cl/523155 mentions this issue: |
The TagXReposTasks.readRepo method calls ReadBranchHead and ReadFile, and handles errors matching gerrit.ErrResourceNotExist that the real Gerrit implementation returns. Improve the fakes accordingly, enough to make the upcoming changes to the tagging workflow its tests happy. For golang/go#56530. Change-Id: I4d92d578210b20752e65bdc2719b74bc5c7259ff Reviewed-on: https://go-review.googlesource.com/c/build/+/523155 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Change https://go.dev/cl/525655 mentions this issue: |
Change https://go.dev/cl/525657 mentions this issue: |
Nested modules with replace directives need to be tidied too, else they end up in an inconsistent state and their builds fail. Though it's tempting to automate the discovery of such modules, it would take some code and these situations are fairly rare. So for now add the missing ones to the hard-coded list manually; we can change our minds about it later if we want. For golang/go#56530. Change-Id: Ic622d3f0080abc17410060c77978a3917f0be0b7 Reviewed-on: https://go-review.googlesource.com/c/build/+/525657 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com>
x/vuln opted out of automatic tagging, but there's no reason for it not to receive automatic updates. Also see a motivating data point captured in https://go.dev/issue/56530#issuecomment-1342988547. Now that there's a more fine-grained method of controlling whether to tag a repo, move the decision there and stop ignoring the entire vuln repo. For golang/go#59686. For golang/go#56530. Change-Id: I32815b3d52d7bd2e601b4eae0290008b33eefbec Reviewed-on: https://go-review.googlesource.com/c/build/+/525655 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Now that we are automatically tagging releases for many of the
golang.org/x/...
repos (#48523), we are incidentally updating the otherx
-repo dependencies in theirgo.mod
files. However, some of ourx
repos that are not currently tagged (notablyx/debug
) also depend on the taggedx
repos, and those currently require manual updates (as in https://go.dev/cl/446515).When we add a new tag for an
x
repo, it would be nice to also update the untaggedx
repos that depend on it to prevent our internal dependencies from getting too stale.(As @dmitshur pointed out to me,
x
dependencies are safe to upgrade because they have necessarily gone through Go's code review process, whereas upgrading non-x
dependencies may require auditing upstream changes.)The text was updated successfully, but these errors were encountered: