Граф коммитов

3379 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Amsterdam 3adcef48f6 internal/proxy: fix error reporting
We weren't reporting on NotFound, but the right code is NotFetched,
since that is what is returned when proxy fetch is disabled.

Change-Id: I554d5186fb4db0346fb9456fe9fc55091066abda
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/320751
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-05-18 16:14:20 +00:00
Jonathan Amsterdam a1d3aaa84a internal/postgres: sort paths before insertion to avoid deadlock
Deadlock is rare but we have observed it when multiple versions of the
same module are inserted concurrently.

Change-Id: Idd28bd558009ff053ac198bdd310fa780af66f83
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/320750
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-05-18 16:13:44 +00:00
Jonathan Amsterdam ef87a127e3 internal/godoc: increase maxImportsPerPackage
Increase the maximum number of imports we allow a package to have.

The value was initially 1000, arbitrarily. But there is at least
one package (github.com/mgruener/iso20022tpl/internal/iso20022)
that exceeds the limit.

Change-Id: Ie9c7e449179ae2caad872a494a59fa49484b316a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/320749
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-05-18 16:09:57 +00:00
Jamal Carvalho 372f8dd214 internal/frontend: update goldmark heading extraction
This change makes removing the title header from the
markdown TOC configurable. For the styleguide we need
to preserve document titles.

Change-Id: If43a1171f44637c98c15330ff1900c4f305511c2
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/320653
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-05-18 15:33:52 +00:00
Jamal Carvalho 8d9e5baf81 content/static: create styleguide assets
The styleguide demonstrates usage of reusable components and
styles on pkg.go.dev.

Change-Id: I7aeb94a9bdc8b7fe12cc2832f8de0be0895ebd97
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/320651
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-05-18 15:01:02 +00:00
Jamal Carvalho 124ba7cd76 package.json: add marked as a dependency
Marked is used to parse markdown files in the JS tests
for the styleguide components.

Change-Id: I9b883b10a5f590977eb2c7f88ca019e1b1b20ed9
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/320571
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-05-18 14:42:57 +00:00
Jamal Carvalho f15dc4956c content/static: create gopher, icon, and logo dirs
Importing a standard set of icons from the Google Material UI
and splitting image folders by domain for better ease of use
and discovery. A future CL implements a styleguide that relies
on this directory structure to generate sections within the guide.

Change-Id: Ibc08ff5a092d1d119a85fe7c4e44e8faeafe1512
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/320570
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-05-18 14:42:47 +00:00
Jamal Carvalho 70feb4c652 e2e: update image snapshots
Change-Id: Ie92ba58fd9f289d50470c7351a9608bd788a231c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/320569
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-05-18 14:42:34 +00:00
Jamal Carvalho 99750fcb42 doc: add chrome version to browserless/chrome command
Change-Id: I918f2dc3aeae1247c9dc9adb1c314d978272b36a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/320411
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-05-18 14:42:28 +00:00
Julie Qiu 6061a5df41 internal: delete ExperimentInsertSymbolHistory
Change-Id: I801cf927c9500589f6460927aaf6c9cb61b98207
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/320450
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-05-17 18:02:11 +00:00
Julie Qiu a78ee8de00 internal: add experiment InsertSymbolSearchDocuments
Change-Id: Ia10ca6eed9f0c21f967e590aa76d050aa2353a5b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/320449
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-05-17 18:02:02 +00:00
Jamal Carvalho 43b1aaf925 e2e: update unit page snapshot tests
New versions of gcloud.dev and github.com/creack/pty
changed the latest badge to the go to latest badge.

Change-Id: I19e7b24a2198990259fc74026f032d2d1af57aa0
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/320410
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Jamal Carvalho <jamal@golang.org>
2021-05-17 17:59:07 +00:00
Julie Qiu 5f461eab33 internal/postgres: do not group results for symbol search
It doesn't make a lot of sense to group symbol searches by module, so
don't group these results.

Change-Id: I804382b0dba6871696f328f1fea96cd1f81f11f1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/319629
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-05-17 15:56:58 +00:00
Julie Qiu c2cd1f8e45 content,internal/frontend: add symbol search
The frontend now supports searching for symbols using the syntax
"identifier:<query>".

For golang/go#44142

Change-Id: Iae1db22091cf3921d47fbbdbdfbbf87e25792fd9
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318871
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-05-17 15:56:54 +00:00
Julie Qiu e9a096a2b8 internal/postgres: add symbol search
An initial version of symbol search is added. This runs separately from
regular search and is not connected to the frontend yet.

For golang/go#44142

Change-Id: I34a21a4a743a07dcfcdfeb64b52a86bc2254f62a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318870
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>
2021-05-17 15:56:47 +00:00
Julie Qiu ba9e25d687 internal/postgres: insert symbol search documents
Data is now inserted into symbol_search_documents.

For golang/go#44142

Change-Id: Icf00cd7c5e57a91465673d1828f961334abc3a48
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318652
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>
2021-05-17 15:56:41 +00:00
Jamal Carvalho 5545381a71 e2e: update e2e test setup
Removes the logic to start headless chrome
in favor of using an externally started
instance.

Change-Id: I86fc81cbfbe7361ecb27e486b73907b37d6c3fd6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/319970
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-05-17 15:03:36 +00:00
Jonathan Amsterdam 97511deff2 internal/config: lengthen statement timeout
Increase the postgres statement timeout for the session
to 30 minutes from 10 minutes.

Change-Id: Ibbe6764cb50b986aabe94cd53240fe00bb1d8705
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/320209
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-05-14 20:15:36 +00:00
Julie Qiu e42ae36c5f content,internal/godoc/dochtml: update doc TOC style
The documentation overview TOC style is updated such that it is slightly
indented, to appear more like a TOC and only split into 2 columns if
there are 5+ items.

Change-Id: I04916c4e20eb505861b02e0b321eea787b57abe6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/319151
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-05-14 17:02:18 +00:00
Jamal Carvalho 0d2ec8276a doc: update e2e test instructions
Change-Id: I94fe0c7ff2a12b4d4f333b2222cbc829e538f8e4
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/320049
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-05-14 15:40:49 +00:00
Jamal Carvalho 001853c531 e2e: update snapshots
I altered the logic that generates test names to
make them more readable and to make them static
so we can add test retries if it becomes necessary
in the future.

Change-Id: I1226c218015518768ddeaeea4117876060910373
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/319972
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Jamal Carvalho <jamal@golang.org>
2021-05-14 15:40:39 +00:00
Jamal Carvalho 9c0705e7cc e2e: reduce boilerplate and add additonal tests
- Drys up e2e test logic and adds additional
tests to mirror the compare pages set.
- Pins some unit page urls to specific versions
to reduce the frequency of updates.
- Parallelizes mobile and desktop tests to improve
performance. In my experience, overall test run takes
on average one minute.

Change-Id: I04ebd109bf2f82c2a570757fe9c124f87c092147
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/319971
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Jamal Carvalho <jamal@golang.org>
2021-05-14 15:38:08 +00:00
Jamal Carvalho 06648a580a e2e: remove obsolete snapshots
In a CL to follow the test setup will be
refactored making the current snapshots obsolete.

Change-Id: Ib4d42a757496dd951374e9cbed56d5bb6d8b14a7
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/319973
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-05-14 15:37:33 +00:00
sryoya cb617906ff internal/database: remove duplicate space from comment
Change-Id: I9685f55616dec14aa8f329c577266f77107fb5d7
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/320009
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-05-14 15:26:17 +00:00
Julie Qiu dec93ab9fd internal/postgres: refactor getPackageSymbols
getPackageSymbols is refactored using squirrel, so that it can be
modified for us in other similar queries.

For golang/go#44142

Change-Id: I974c51155d30c59cf61ded0386c5d3b2702188c5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318651
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>
2021-05-13 20:07:31 +00:00
Julie Qiu bdfe3901ab migrations: add symbol_search_documents
A table is added to contain information for searching for symbols.

Build contexts are added as a text array instead of as individual rows,
since the only use case for that information is linking users to the
correct URL if the symbol is not present in the default build context.

For golang/go#44142

Change-Id: I759b22e0ced7fec547778aba11a1b5f641530fb8
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318650
Trust: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-05-13 20:07:24 +00:00
Jonathan Amsterdam 759af54b13 internal/postgres: remove delete from documentation
Don't delete old rows from the documentation table.

Change-Id: Idd2e7d5fc02887f0fdcea4c2297b4bd499bd8ad4
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/319909
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-05-13 19:53:27 +00:00
Julie Qiu de482c9493 internal/godoc/dochtml: delete legacyExampleTmpl
Interactive playgrounds have been live for a while, so legacyExampleTmpl
and EnableInteractivePlayground is removed.

Change-Id: I09c03162cfc7fb52a74f21e08ff9b4ef83f4e8c5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/319149
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>
2021-05-13 19:26:44 +00:00
Julie Qiu 1bd3c468d8 migrations: fix typo in 000096 down
The down migration INDEX idx_symbol_history_sort_version is fixed to
correctly refer to idx_symbol_history_sort_version.

Change-Id: I1c4fff26223326bd9c3f958b9a23adbafffa4cc7
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318649
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>
2021-05-13 17:02:56 +00:00
Julie Qiu 1255f844e6 internal/postgres: insert search_documents path ids
The search_documents columns package_path_id and module_path_id are now
populated.

For golang/go#44142

Change-Id: I1833bfc821f3a3ebe5b71a562e616d0c6b2dc20a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318490
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>
2021-05-13 17:02:50 +00:00
Julie Qiu 1726a85eb2 internal/postgres: format upsertSearchStatement
upsertSearchStatement is formatted to condense JOINs on one line.

Change-Id: I40220c32728e924a216791321255ee4d23203294
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318491
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>
2021-05-13 17:02:44 +00:00
Julie Qiu c31e9966f1 migrations: add search_documents package_path_id and module_path_id
For golang/go#44142

Change-Id: I9d1908b07924a02153a249773d9440676a0e349a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318489
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>
2021-05-13 17:02:38 +00:00
Julie Qiu 6456b53f71 internal: rename UnitSymbol to SymbolBuildContexts
UnitSymbol now only contains a map of build contexts that apply to a
symbol meta, so it is renamed to SymbolBuildContexts.

Change-Id: I2a0360aa06c7269fdcb5eb72cb5253cf737a23f3
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/319271
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>
2021-05-12 20:28:30 +00:00
Julie Qiu a55e6d8dff internal: remove UnitSymbol.SymbolMeta
UnitSymbol.SymbolMeta is deleted since it is not necessary.

Change-Id: I6965b45fad04dfff564e2af47c8504de475afe21
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/319270
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>
2021-05-12 20:28:21 +00:00
Julie Qiu 080753ead6 internal: change stdlib source repo
The stdlib source repo is changed to https://cs.opensource.google/go/go.

Fixes golang/go#44832

Change-Id: Ie8060ab1cabccbcf9ff20c0eec42c243c1feaf9c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318873
Trust: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-05-12 20:28:05 +00:00
Julie Qiu 8e9954ac19 internal/source: delete git.pirl.io test
git.pirl.io/community/pirl no longer exists, so running
`go test -run TestModuleInfo -record` will always return a 500 for that
path.

In order to update internal/source/testdata/TestModuleInfo.replay for
future tests, this test is deleted.

Change-Id: I8978bb8a725959896c1897e4178a5b8d6f4f51c2
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318969
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>
2021-05-12 15:45:49 +00:00
Julie Qiu 1daa01ea5c internal/frontend: allow refetch for 404
If a path is stored in the version_map table as a 404, allow the path
to be refetched once the taskIDChangeInterval has passed since the
path was last updated.

Fixes golang/go#46117

Change-Id: I985f8c095d4c6af1e092cc686322023cc0abd3b6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/319050
Trust: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-05-12 15:42:19 +00:00
Julie Qiu 61b61fcc4e internal/postgres: mark processed modules from index with status 0
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>
2021-05-12 15:42:11 +00:00
Jonathan Amsterdam 31611c1a1b internal/postgres: ensure good version not later than cooked
The good latest version of a module should never be later than the
cooked latest version. If it is, then pkgsite will show a different
version than the go command will download.

One way this can happen is if a module retracts all tagged versions,
and pseudo-versions were built on top of some of them. For example,
initially it could have versions

	v0.1.0
	v0.1.0-DATE-HASH (a pseudo-version)

Then v0.1.0 is retracted and a new pseudo-version appears at
head:

	v0.1.0 (retracted)
	v0.1.0-DATE-HASH
	v0.0.0-DATE-HASH (head of default branch)

The go command will get the v0.0.0 version, but technically
the v0.1.0 is later.

For golang/go#43265

Change-Id: I8ff30de4eb2dcdf108205de99af93d2f31772cff
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318069
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-05-12 15:33:38 +00:00
Jamal Carvalho bb873d2a80 e2e: update global test setup
The e2e tests will only start headless chrome if
it has not already been started. The port for headless
chrome can now be set with an env variable.

Change-Id: I416527901b4401ff85af65922ae7b21a6b8c717e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318890
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Jamal Carvalho <jamal@golang.org>
2021-05-11 18:37:48 +00:00
Jamal Carvalho e1b59e31d0 package-lock.json: patch vulnerable dependency
https://www.npmjs.com/advisories/1673

Change-Id: I6664d4204779ff1f7ef86118c9a5e17a093cf73f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318889
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-05-11 18:37:15 +00:00
Jamal Carvalho 8d7f8db318 e2e: update search snapshots
The bottom border of the last search result
was removed.

Change-Id: I177900cc8f1880f2086b6966b223d68d3d22ab00
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318510
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-05-10 21:16:40 +00:00
Jamal Carvalho abfe9aec3e e2e: update e2e snapshots
Adds styles to hide blinking cursor in Jump to
modal to prevent flake in unit page test.

Change-Id: I2d78517c475aa9ce25ab935eeb1e88022b8fe7cb
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318509
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-05-10 21:16:19 +00:00
Jamal Carvalho 8bd101a1bc content/static: add detail to gtm categories
Updates gtm categories for some elements
to lead to better groupings of events.

Change-Id: I8319910afe420470d1f188d9996a34b0b365a26b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318449
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-05-10 21:15:40 +00:00
Julie Qiu 29c7f6e131 e2e: change 400 package path to non-empty string
Change-Id: I88fc1d74649782eb09013c55d5424b4c4dd96e52
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/317710
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
2021-05-10 18:30:57 +00:00
Julie Qiu 3fc0eab19b e2e: update tests for 400 bad request change
Change-Id: Ibefedfc456f123a7761cc5dac0498e6b906fbc35
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/317709
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
2021-05-10 18:30:47 +00:00
Jonathan Amsterdam 61bac80a3d internal/postgres: process new modules in arrival order
When enqueing modules for processing that we haven't seen before,
prefer the ones that arrived earliest, as determined by their index
timestamp.

Besides being "fair," this will satisfy the assumption of the Worker
Processing Lag metric, making that metric more useful.

We don't change the ordering of modules that are being reprocessed.
The arrival order no longer matters at that point, and we want to keep
the pseudo-random ordering provided by the md5 hash to avoid runs of
versions of the same (potentially large) module from gumming up the
workers.

Change-Id: I3c422eda576931110d4dbcd1db9f7199fde67e6f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/317890
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-05-10 18:17:48 +00:00
Jonathan Amsterdam e0175659d8 content/static: modify search results
All of these changes are under the "search-grouping" experiment.

- Heading is package name instead of import path.

- Version next to package name.

- Import path shown above name, de-emphasized.

- Replace vertical info label dividers with space.

- Remove bold from info labels, add bold to import count.

Change-Id: I3571570a2046a69c0df92617a35269b8d30d16ec
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/317749
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>
2021-05-07 11:45:45 +00:00
Julie Qiu 5eed0f6bc9 internal/frontend: support displaying multiple of same type
Previously on the versions page, we were not handling the case when
different identifiers are added for the same type for different build
contexts, and which build context was surfaced was based on chance.

To support this case, it is now possible to show multiple of the same
type at the same version. For example,
https://pkg.go.dev/internal/poll?tab=versions at go1.10 will show:

```
type FD — windows/amd64
+ func (fd *FD) ReadMsg(p []byte, oob []byte) (int, int, int, syscall.Sockaddr, error)
+ func (fd *FD) WriteMsg(p []byte, oob []byte, sa syscall.Sockaddr) (int, int, error)

type FD — darwin/amd64, linux/amd64
+ func (fd *FD) SetBlocking() error
+ func (fd *FD) WriteOnce(p []byte) (int, error)
```

For golang/go#37102

Change-Id: I19e6ef12f1f8f9c412aab7cea2782409eecf29f9
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/317489
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>
2021-05-06 17:43:23 +00:00
Julie Qiu 4e95d3e1ae e2e: update tests
The derrors package was changed recently, so the snapshots need to be
updated.

Change-Id: I32b14b9f9bb127af0b5489198a4c9c0cf2331be2
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/317193
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-05-06 16:55:44 +00:00