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: search for stdlib packages doesn't work #47555

Closed
rogpeppe opened this issue Aug 5, 2021 · 10 comments
Closed

x/pkgsite: search for stdlib packages doesn't work #47555

rogpeppe opened this issue Aug 5, 2021 · 10 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite/search Issues related to pkg.go.dev search functionality pkgsite Soon This needs to be done soon. (regressions, serious bugs, outages)

Comments

@rogpeppe
Copy link
Contributor

rogpeppe commented Aug 5, 2021

What is the URL of the page with the issue?

https://pkg.go.dev/search?q=os

What is your user agent?

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36

Screenshot

image

What did you do?

Search for a standard library package.

What did you expect to see?

The standard library package as the top result.

What did you see instead?

Some other random packages that don't even have the name os.

Update: it seems to be working again now. But the above makes me feel like I can't trust it. Here are the new results:

image

@gopherbot gopherbot added this to the Unreleased milestone Aug 5, 2021
@jamalc jamalc added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 5, 2021
@jamalc jamalc modified the milestones: Unreleased, pkgsite/search Aug 5, 2021
@ALTree
Copy link
Member

ALTree commented Aug 5, 2021

I also observed some breakage on stdlib packages a few hours ago. Everyone of them had:

Imported by: 0

but if you clicked on it it would show thousands of importers (as you would expect for a stdlib package).

Now it seems to be fixed.

@cespare
Copy link
Contributor

cespare commented Aug 5, 2021

I'm seeing this right now.

screen_20210805114844
screen_20210805114852
screen_20210805114859
screen_20210805114905

@cmcpasserby
Copy link

I am experiencing the exact same thing as @cespare. I can only get to stdlib stuff if i give it the exact name of the package, like net/http for example while searching just http it's nearly impossible to find the stdlib one in the results.

@julieqiu julieqiu added the Soon This needs to be done soon. (regressions, serious bugs, outages) label Aug 5, 2021
@cespare
Copy link
Contributor

cespare commented Aug 5, 2021

It's working for me now, but I guess before closing it it would be good to hear confirmation of a fix from the team since it apparently has been toggling between these states over time.

@eliben
Copy link
Member

eliben commented Aug 5, 2021

I can confirm that https://pkg.go.dev/search?q=x509 works fine now (the problem reported in #47561, which was duped to this one)

@gopherbot
Copy link

Change https://golang.org/cl/341249 mentions this issue: internal/postgres: update imported-by counts in chunks

@gopherbot
Copy link

Change https://golang.org/cl/341269 mentions this issue: internal/postgres: on insert, delete only older packages from search

@gopherbot
Copy link

Change https://golang.org/cl/341270 mentions this issue: internal/postgres: update only changed counts in search docs

gopherbot pushed a commit to golang/pkgsite that referenced this issue Aug 10, 2021
When updating imported-by counts, only look at changed counts for
packages in search_documents.

For golang/go#47555

Change-Id: If9a03a747d11bf715de126248aa74e30098b13aa
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/341270
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
gopherbot pushed a commit to golang/pkgsite that referenced this issue Aug 11, 2021
Instead of deleting the entire module from search_documents on insert,
just delete packages that are not in the current version. That will
avoid resetting imported-by counts to zero when we reprocess the
latest version of a module.

For golang/go#47555

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

Change https://golang.org/cl/341429 mentions this issue: internal/postgres: rename function

gopherbot pushed a commit to golang/pkgsite that referenced this issue Aug 11, 2021
For golang/go#47555

Change-Id: I9e90de83d441748e70b0992f3a31a02f46f1bce9
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/341429
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
@jba
Copy link
Contributor

jba commented Aug 11, 2021

This should be permanently fixed.

@jba jba closed this as completed Aug 11, 2021
gopherbot pushed a commit to golang/pkgsite that referenced this issue Aug 16, 2021
If too many rows change imported-by counts, then the
/update-imported-by-count endpoint times out after 30 minutes, and
nothing gets inserted because it runs as one transaction.

Instead, break it into multiple smaller transactions. Since we only
update changed counts, then as long as one transaction completes we
have made some counts identical, so we will make progress.

For golang/go#47555

Change-Id: I546aaabcc5e0f99d71efe38748475274871382c4
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/341249
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Julie Qiu <julie@golang.org>
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Julie Qiu <julie@golang.org>
@hyangah hyangah added the pkgsite/search Issues related to pkg.go.dev search functionality label May 20, 2022
@golang golang locked and limited conversation to collaborators May 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite/search Issues related to pkg.go.dev search functionality pkgsite Soon This needs to be done soon. (regressions, serious bugs, outages)
Projects
None yet
Development

No branches or pull requests

10 participants