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: spurious "v1.x.y is not a tag" error when a tag's commit was previously download without the tag [1.21 backport] #64586

Closed
gopherbot opened this issue Dec 6, 2023 · 5 comments
Labels
CherryPickApproved Used during the release process for point releases GoCommand cmd/go
Milestone

Comments

@gopherbot
Copy link
Contributor

@bcmills requested issue #53955 to be considered for backport to the next 1.21 minor release.

@gopherbot, please backport to Go 1.21 and 1.20. This fixes a bug that is otherwise difficult for users to understand and diagnose, and the fix is relatively uninvasive.

@gopherbot gopherbot added CherryPickCandidate Used during the release process for point releases GoCommand cmd/go labels Dec 6, 2023
@gopherbot gopherbot added this to the Go1.21.6 milestone Dec 6, 2023
@bcmills bcmills changed the title cmd/go: Go 1.18.4 still complains "v1.x.y is not a tag" if the target (private?) module had been once downloaded before being tagged [1.21 backport] cmd/go: spurious "v1.x.y is not a tag" error when a tag's commit was previously download without the tag [1.21 backport] Dec 6, 2023
@bcmills
Copy link
Contributor

bcmills commented Dec 7, 2023

On the other hand, this has a fairly straightforward workaround: retrying the operation causes it to succeed.

@gopherbot gopherbot modified the milestones: Go1.21.6, Go1.21.7 Jan 9, 2024
@gopherbot gopherbot modified the milestones: Go1.21.7, Go1.21.8 Feb 6, 2024
@gopherbot gopherbot modified the milestones: Go1.21.8, Go1.21.9 Mar 5, 2024
@gopherbot gopherbot modified the milestones: Go1.21.9, Go1.21.10 Apr 3, 2024
@joedian
Copy link

joedian commented Apr 24, 2024

@matloob Can you please make a decision on this backport?

@gopherbot gopherbot modified the milestones: Go1.21.10, Go1.21.11 May 7, 2024
@matloob matloob added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels May 15, 2024
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/585815 mentions this issue: [release-branch.go1.21] cmd/go/internal/modfetch/codehost: add new git tags before statLocal instead of after

@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/585816 mentions this issue: [release-branch.go1.21] cmd/go: set global .gitconfig location more robustly in tests

gopherbot pushed a commit that referenced this issue May 16, 2024
…t tags before statLocal instead of after

gitRepo.statLocal reports tag and version information.
If we are statting a hash that corresponds to a tag, we need to add that tag
before calling statLocal so that it can be included in that information.

For #53955.
For #56881.
For #64586

Change-Id: I69a71428e6ed9096d4cb8ed1bb79531415ff06c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/547155
Auto-Submit: Bryan Mills <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Michael Matloob <[email protected]>
(cherry picked from commit 7b5a373)
Reviewed-on: https://go-review.googlesource.com/c/go/+/585815
Reviewed-by: Sam Thanawalla <[email protected]>
Auto-Submit: Dmitri Shuralyov <[email protected]>
@gopherbot
Copy link
Contributor Author

Closed by merging a6023db to release-branch.go1.21.

gopherbot pushed a commit that referenced this issue May 16, 2024
…obustly in tests

Also confirm that setting the location actually worked before
proceeding with the rest of the test.

This fixes a test failure with git versions older than 2.32.0.

For #53955.
For #64603.
Fixes #64586

Change-Id: I1a954975a3d8300e8b4dca045d3a15438a0407ec
Reviewed-on: https://go-review.googlesource.com/c/go/+/548215
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Russ Cox <[email protected]>
Reviewed-by: Michael Matloob <[email protected]>
Run-TryBot: Bryan Mills <[email protected]>
Reviewed-on: https://go-review.googlesource.com/c/go/+/585816
Reviewed-by: Sam Thanawalla <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Auto-Submit: Dmitri Shuralyov <[email protected]>
TryBot-Bypass: Dmitri Shuralyov <[email protected]>
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
Projects
None yet
Development

No branches or pull requests

4 participants