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: allow refetch on page with valid import path and status 404 #46117

Closed
julieqiu opened this issue May 12, 2021 · 3 comments
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.

Comments

@julieqiu
Copy link
Member

It's possible that a module version does not exist today, but does exist at a later time. For example, github.com/uber/cadence@v0.21.1 is an unpublished version of github.com/uber/cadence, and http://proxy.golang.org/github.com/uber/cadence/@v/v0.21.1.info will return not found: github.com/uber/cadence@v0.21.1: invalid version: unknown revision v0.21.1.

Because a user has attempted to fetch https://pkg.go.dev/github.com/uber/cadence@v0.21.1, the 404 page does not show a Request button.

We should ensure that module versions are reprocessed when they are published to the index. Additionally, after a certain period of time, users should be allowed to refetch a path via frontend fetch.

See https://gophers.slack.com/archives/C0166L4QGJV/p1620759674026900 for context.

@gopherbot gopherbot added this to the Unreleased milestone May 12, 2021
@julieqiu julieqiu added NeedsFix The path to resolution is known, but the work has not been done. and removed pkgsite labels May 12, 2021
@gopherbot
Copy link

Change https://golang.org/cl/319049 mentions this issue: internal/postgres: mark processed modules from index with status 0

@gopherbot
Copy link

Change https://golang.org/cl/319050 mentions this issue: internal/frontend: allow refetch for 404

gopherbot pushed a commit to golang/pkgsite that referenced this issue May 12, 2021
When a module is added for the first time using InsertIndexVersions,
set the status to 0, even if the module already exists in
module_version_states. That way we will prioritize reprocessing this
module, in case its previous status was a non-2xx code.

For golang/go#46117

Change-Id: Ie2c01a84449a0bb2e446a0c1388b315b580d3b12
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/319049
Trust: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
@gopherbot
Copy link

Change https://golang.org/cl/328929 mentions this issue: internal/postgres: carefully change status on index insert

gopherbot pushed a commit to golang/pkgsite that referenced this issue Jun 17, 2021
We've been updating the status to 0 on every module that comes from
the index, even if it's already in the DB with a different status.

While we do want to change the status when it's reasonable to
reprocess (see the linked issue below), we don't in most other cases.

So only update the status when we see a 404.

For golang/go#46117

Change-Id: I2774a0e5637873754cf69805bf154aaab632b0b8
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/328929
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
@golang golang locked and limited conversation to collaborators Jun 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants