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

x/pkgsite: redirect semver tags with build metadata #47757

Open
julieqiu opened this issue Aug 17, 2021 · 2 comments
Open

x/pkgsite: redirect semver tags with build metadata #47757

julieqiu opened this issue Aug 17, 2021 · 2 comments

Comments

@gopherbot gopherbot added this to the Unreleased milestone Aug 17, 2021
@julieqiu julieqiu removed this from the Unreleased milestone Aug 17, 2021
@julieqiu julieqiu added this to the pkgsite/unplanned milestone Aug 17, 2021
@julieqiu julieqiu self-assigned this Aug 19, 2021
@gopherbot
Copy link

@gopherbot gopherbot commented Aug 19, 2021

Change https://golang.org/cl/343649 mentions this issue: tests/e2e: add github.com/go/logr/zapr@v1.0.0+1

@gopherbot
Copy link

@gopherbot gopherbot commented Aug 19, 2021

Change https://golang.org/cl/343631 mentions this issue: internal/frontend: fix redirects

gopherbot pushed a commit to golang/pkgsite that referenced this issue Aug 19, 2021
The go command removes build metadata as part of version
canonicalization. +incompatible is the only metadata that may remain,
but that can't appear in the vcs tag itself.

As a result, a path@version like
https://pkg.go.dev/github.com/go-logr/zapr@v1.0.0+1 will resolve to
https://pkg.go.dev/github.com/go-logr/zapr@v1.0.1-0.20210809170106-a3325063a237.
See https://proxy.golang.org/github.com/go-logr/zapr/@v/v1.0.0+1.info

pkg.go.dev now redirects appropriately.

See https://groups.google.com/g/golang-dev/c/bduZuUdzM_o/m/lBX634unAQAJ
for context.

This fix also redirects other cases where the requested and resolved
versions do not match. For example, github.com/dgrijalva/jwt-go@v3.2.0
will redirect to v3.2.0+incompatible.

For golang/go#47757

Change-Id: I236fbb9e0ed8ef0b1c3928460c2908fcbd9c2033
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/343631
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants