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: invalidate cache for pkg.go.dev/<import-path> when a new latest version is available #37026

Open
myitcv opened this issue Feb 4, 2020 · 3 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite

Comments

@myitcv
Copy link
Member

myitcv commented Feb 4, 2020

What is the URL of the page with the issue?

https://pkg.go.dev/github.com/sethvargo/go-githubactions?tab=doc

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.66 Safari/537.36

Screenshot

Screen Shot 2020-02-04 at 21 02 48

What did you do?

Visited the above URL, shortly after v0.1.1 was released (at the time the screenshot was taken: 2020-02-04 21.02.48 UTC)

What did you expect to see?

Refreshing the page to take me to the latest version. v0.1.1.

What did you see instead?

I was left on the v0.1.0 page with a red link (shown in the screenshot) that prompted me to click through for the latest version.

To my mind the latest version should always be shown for the bare, non-canonical URL.

The red "latest" link should then show on the canonical version pages that are not the latest version. e.g.

https://pkg.go.dev/github.com/sethvargo/go-githubactions@v0.1.0?tab=doc

Related to #36807

@myitcv myitcv added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite labels Feb 4, 2020
@julieqiu
Copy link
Member

julieqiu commented Feb 4, 2020

https://pkg.go.dev/github.com/sethvargo/go-githubactions?tab=doc shows v0.1.1 for me:

image

@myitcv would you mind confirming if this is still an issue?

@myitcv
Copy link
Member Author

myitcv commented Feb 4, 2020

https://pkg.go.dev/github.com/sethvargo/go-githubactions?tab=doc showed v0.1.1 for me at the time of submitting this issue. The bug to my mind is that immediately after v0.1.1 was released, https://pkg.go.dev/github.com/sethvargo/go-githubactions?tab=doc showed v0.1.0 with a link to "show latest". As soon as pkg.go.dev spots the latest version, it should ensure that https://pkg.go.dev/github.com/sethvargo/go-githubactions?tab=doc shows that latest version.

@julieqiu
Copy link
Member

julieqiu commented Feb 4, 2020

Got it, thanks for clarifying. This sounds like an issue with improving our cache expiration logic. At the moment, the latest version of a package is cached for 10 minutes.

@julieqiu julieqiu changed the title go.dev: non-canonical URL does not show latest version of module go.dev: invalidate cache for pkg.go.dev/<import-path> when a new latest version is available Feb 5, 2020
@gopherbot gopherbot added this to the Unreleased milestone Feb 6, 2020
@julieqiu julieqiu changed the title go.dev: invalidate cache for pkg.go.dev/<import-path> when a new latest version is available x/pkgsite: invalidate cache for pkg.go.dev/<import-path> when a new latest version is available Jun 15, 2020
@julieqiu julieqiu removed the website label Sep 22, 2020
@julieqiu julieqiu removed the website label Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Projects
None yet
Development

No branches or pull requests

3 participants