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: inconsistent imported by numbers #39138

Closed
dotchev opened this issue May 19, 2020 · 5 comments
Closed

x/pkgsite: inconsistent imported by numbers #39138

dotchev opened this issue May 19, 2020 · 5 comments

Comments

@dotchev
Copy link

@dotchev dotchev commented May 19, 2020

What is the URL of the page with the issue?

https://pkg.go.dev/search?q=mux
https://pkg.go.dev/github.com/gorilla/mux?tab=doc

What is your user agent?

Google Chrome Version 81.0.4044.138 (Official Build) (64-bit)

Screenshot

image

image

What did you do?

Searched for "mux" in pkg.go.dev

What did you expect to see?

Expected Imported by numbers in the search result and in the package page to be the same

What did you see instead?

Different Imported by numbers for the same package - 9381 vs 12162

@gopherbot gopherbot added the pkgsite label May 19, 2020
@gopherbot gopherbot added this to the Unreleased milestone May 19, 2020
@julieqiu
Copy link
Contributor

@julieqiu julieqiu commented May 20, 2020

Thanks for the feedback! We'll look into this.

@julieqiu julieqiu added the NeedsFix label May 20, 2020
@julieqiu julieqiu changed the title go.dev: inconsistent imported by numbers x/pkgsite: inconsistent imported by numbers Jun 15, 2020
@gopherbot gopherbot added the go.dev label Sep 18, 2020
@julieqiu julieqiu removed the go.dev label Sep 22, 2020
@gopherbot gopherbot added the go.dev label Sep 22, 2020
@julieqiu julieqiu removed the go.dev label Sep 22, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Feb 2, 2021

Change https://golang.org/cl/288767 mentions this issue: internal/frontend: match importedby counts on main and search pages

@gopherbot
Copy link

@gopherbot gopherbot commented Feb 2, 2021

Change https://golang.org/cl/288849 mentions this issue: content,internal/frontend: match count on importedby page with main and search pages

gopherbot pushed a commit to golang/pkgsite that referenced this issue Feb 2, 2021
At the moment, the imported by count on the main unit page and search
page can differ on small values, where an exact count is shown.

Since we fetch search_documents.num_imported_by on every GetUnit
request, use that value consistently across the site.

For golang/go#39138

Change-Id: I61b60029626dc8ab6353886f38a6f158841147bb
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/288767
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>
@gopherbot
Copy link

@gopherbot gopherbot commented Feb 2, 2021

Change https://golang.org/cl/288909 mentions this issue: content,internal/frontend: update count on importedby page

@gopherbot
Copy link

@gopherbot gopherbot commented Feb 2, 2021

Change https://golang.org/cl/288910 mentions this issue: internal/frontend: display exact importedby count

gopherbot pushed a commit to golang/pkgsite that referenced this issue Feb 2, 2021
When loading the imported by page, fetch the imported by count from
search_documents.num_imported_by, instead of limiting at 20,000.

This will use the same logic for the imported by count with the
main page and search page.

For golang/go#39138

Change-Id: Iae188d01129b6e35cfd82b79e51a0ef12938c459
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/288849
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
3 participants