Skip to content
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 [1.22 backport] #66256

Closed
gopherbot opened this issue Mar 11, 2024 · 3 comments
Closed

cmd/go: git shallow fetches broken at CL 556358 [1.22 backport] #66256

gopherbot opened this issue Mar 11, 2024 · 3 comments
Labels
CherryPickApproved Used during the release process for point releases GoCommand cmd/go modules
Milestone

Comments

@gopherbot
Copy link

@bcmills requested issue #66147 to be considered for backport to the next 1.22 minor release.

@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.

@gopherbot gopherbot added CherryPickCandidate Used during the release process for point releases GoCommand cmd/go labels Mar 11, 2024
@gopherbot gopherbot added this to the Go1.22.2 milestone Mar 11, 2024
@bcmills bcmills added CherryPickApproved Used during the release process for point releases modules labels Mar 11, 2024
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Mar 11, 2024
@gopherbot
Copy link
Author

Change https://go.dev/cl/570737 mentions this issue: cmd/go/internal/modfetch: pass "-c" arguments to git before subcommands

@bcmills
Copy link
Contributor

bcmills commented Mar 13, 2024

(CC @matloob @samthanawalla)

@gopherbot
Copy link
Author

Closed by merging 0c53f93 to release-branch.go1.22.

gopherbot pushed a commit that referenced this issue Mar 27, 2024
… 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved Used during the release process for point releases GoCommand cmd/go modules
Projects
None yet
Development

No branches or pull requests

2 participants