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: support Refresh now like godoc.org #37106

Closed
yo8 opened this issue Feb 7, 2020 · 5 comments
Closed

x/pkgsite: support Refresh now like godoc.org #37106

yo8 opened this issue Feb 7, 2020 · 5 comments

Comments

@yo8
Copy link

@yo8 yo8 commented Feb 7, 2020

What did you do?

View documents on pkg.go.dev.

What did you expect to see?

Latest documents.

What did you see instead?

Out-of-date documents, even its counterpart on godoc.org was updated a few days ago.

@cagedmantis
Copy link
Contributor

@cagedmantis cagedmantis commented Feb 7, 2020

/cc @julieqiu

@mewmew
Copy link
Contributor

@mewmew mewmew commented Feb 24, 2020

Related to #36811

@julieqiu
Copy link
Contributor

@julieqiu julieqiu commented Feb 28, 2020

Thanks for the feedback! We are currently working on a fix for this. Also related is #37002

gopherbot pushed a commit to golang/pkgsite that referenced this issue Jun 15, 2020
The logic for GetVersionMap is changed so that an explicit module path
is now required. All logic is also now the same for all
requestedVersions (as opposed to a special case for latest).

This function is only used by the frontend to check if a version exists
as part of a frontend fetch, and this behavior makes more sense for that
use case.

Updates golang/go#36811
Updates golang/go#37002
Updates golang/go#37106

Change-Id: I415a2730daa6edc023f80c0c615521047311f35b
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/744833
Reviewed-by: Jonathan Amsterdam <jba@google.com>
gopherbot pushed a commit to golang/pkgsite that referenced this issue Jun 15, 2020
The frontend server is not initiated with a queue. The frontend task
queue will be used to support frontend fetches.

frontend.FetchAndUpdateState is added, which is a copy of
worker.FetchAndUpdateState for use in testing and locally.

Updates golang/go#36811
Updates golang/go#37002
Updates golang/go#37106

Change-Id: I41922d30462d2623a061aa1f207bb2b39f7b54e2
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/743102
Reviewed-by: Jonathan Amsterdam <jba@google.com>
gopherbot pushed a commit to golang/pkgsite that referenced this issue Jun 15, 2020
This column will be used to display the canonical module path when a
frontend fetch results in fetching an alternative module path.

Updates golang/go#36811
Updates golang/go#37002
Updates golang/go#37106

Change-Id: Ie8ee6ba64ea799d264c1079c345e37d2e073da38
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/751268
Reviewed-by: Jonathan Amsterdam <jba@google.com>
gopherbot pushed a commit to golang/pkgsite that referenced this issue Jun 15, 2020
The version_map.go_mod_path column is now populated in
UpsertVersionMap.

Updates golang/go#36811
Updates golang/go#37002
Updates golang/go#37106

Change-Id: I4e474d28bee67caf7625045082df46f93394f3f6
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/751269
Reviewed-by: Jonathan Amsterdam <jba@google.com>
gopherbot pushed a commit to golang/pkgsite that referenced this issue Jun 15, 2020
FetchAndUpdateState in internal/frontend and internal/worker now
insert the GoModPath field on VersionMap.

Updates golang/go#36811
Updates golang/go#37002
Updates golang/go#37106

Change-Id: Idfce6d685d24d915608acc1748a84b9db5312ae4
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/751270
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
gopherbot pushed a commit to golang/pkgsite that referenced this issue Jun 15, 2020
A fetch endpoint is added to the frontend, which will queue a module to
be enqueued by the worker, if it doesn't already exist in the database.

After enqueuing, the fetch handler will poll the version_map table at a
constant rate, until the path returns or the request times out.

If the request fails, a corresponding statusCode and responseText will
be returned to be displayed to the user.

Updates golang/go#36811
Updates golang/go#37002
Updates golang/go#37106

Change-Id: Ic2e20146dc626bf296db05bc2abbfb50d6fd7991
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/743103
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
gopherbot pushed a commit to golang/pkgsite that referenced this issue Jun 15, 2020
When a path page 404s, it will now render the notfound.tmpl page (once
the frontend-fetch feature flag is on), which provides a button for the
user to make a request to fetch the package.

Updates golang/go#36811
Updates golang/go#37002
Updates golang/go#37106

Change-Id: I17fedd018435e8d3e51e2a2a4a972d3cf673df56
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/753606
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
gopherbot pushed a commit to golang/pkgsite that referenced this issue Jun 15, 2020
At the moment when a request for path@version 404s, but other versions
of the path exists, we will return an error message letting users know
that is the case. Once frontend fetch is live, the message will change
to provide users an option to fetch that version of the path.

This logic is moved to pathFoundAtLatestError.

Updates golang/go#36811
Updates golang/go#37002
Updates golang/go#37106

Change-Id: I1ad15ee13714a68b4b88fd353e43719fda0c0d31
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/754818
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
@julieqiu julieqiu changed the title go.dev: support Refresh now like godoc.org x/pkgsite: support Refresh now like godoc.org Jun 15, 2020
@julieqiu julieqiu self-assigned this Jun 15, 2020
@julieqiu
Copy link
Contributor

@julieqiu julieqiu commented Sep 10, 2020

This is now supported by visiting pkg.go.dev/<path>@master. There is a separate bug to update the UI to make this feature more discoverable (#41278) and support other default branches (#41312).

@jxsl13
Copy link

@jxsl13 jxsl13 commented Dec 18, 2020

I'm just wondering, why the README is not being updated with the version push like GitHub.com/1234/package@v1.2.0

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
6 participants