-
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
cmd/go: git shallow fetches broken at CL 556358 #66147
Comments
Notably, following the commands in that
|
Change https://go.dev/cl/569422 mentions this issue: |
@gopherbot, please backport to Go 1.22. This was an accidental regression in https://go.dev/cl/556358, and may cause increased client and server load when fetching modules directly from git repositories. |
Backport issue(s) opened: #66256 (for 1.22). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Change https://go.dev/cl/570737 mentions this issue: |
… to git before subcommands I accidentally transposed the arguments in CL 556358, causing the shallow 'git fetch' attempt to always fail. That didn't break any tests because we fall back to a full fetch, which works for nearly all real Git servers, and we didn't have a test that checked for shallow fetches. Tested manually using: GOPROXY=direct go mod download -x -json gerrit.wikimedia.org/r/mediawiki@v0.0.0-20240202145822-67da0cbcfdf7 (I'm still thinking about how to add a proper regression test.) Fixes #66256. Updates #66147. Change-Id: I0bb17283bae856f369fd24f29375e507d0999933 Reviewed-on: https://go-review.googlesource.com/c/go/+/569422 Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> (cherry picked from commit 2ab9218) Reviewed-on: https://go-review.googlesource.com/c/go/+/570737 Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
Go version
go version devel go1.23-7986e26a39 Mon Mar 4 18:59:50 2024 +0000 linux/amd64
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
What did you expect to see?
Successful fetch, as with previous
go
versions.It appears that I put the arguments in the wrong order in https://go.dev/cl/556358, inadventently breaking shallow
git
fetches. That went undiagnosed, because it fixed the symptom I was testing for (#56881) and we didn't have any tests specifically probing for shallowness of git repos in the module cache.(CC @suzmue @matloob @samthanawalla)
The text was updated successfully, but these errors were encountered: