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

4776 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Amsterdam aa5dca7496 devtools/cmd/seeddb: improve logging
- Use the stdlib log package, to distinguish seeddb logs from pkgsite
  logs.

- Log events as they happen, instead of at the end.

Change-Id: Ia3877e821def72d89144ad50d2b6706bb531eb1c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/626857
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
2024-11-13 18:55:11 +00:00
Jonathan Amsterdam dbac787e7b tests/README.md: add troubleshooting advice
Add a paragraph to deal with a condition that I have encountered
on my machine.

Change-Id: Ie03a0e8ab4030973cdec8e84cd5877234830b8de
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/626856
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2024-11-13 18:55:03 +00:00
Jonathan Amsterdam 71b0feb8eb tests/screentest: improve run.sh
- Use single-hyphen flags to conform to Go style.

- Remove unnecessary quotation.

- Minor shell style nits.

- Change the "local" case to run all components, instead of assuming
  that some are already running.

The last change makes the "local" case much more useful, and faster
than the "ci" case for local testing.

Change-Id: Id3412fac8bd4a29539563e3cc568a3c7edd06c2e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/626855
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-11-13 18:54:55 +00:00
Jonathan Amsterdam de75df57e5 tests/screentest: pin screentest binary to older version
The screentest binary (golang.org/x/website/cmd/screentest) was
recently updated to use a new version of chromedp, the package that
talks to chrome in order to obtain screenshots. The new version
produces slightly different screenshots. We will eventually deal
with this when the screentest changes are finished, but for now
use an older screentest version.

Change-Id: I197501241a823f7c7ee03fab9c7312f89949af9a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/627535
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-11-13 17:50:31 +00:00
Gopher Robot 2edb6b8814 go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.

Change-Id: I61fe5c95d1067e13efd8d91fe4f1f6f79d9aeb4d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/626482
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Gopher Robot <gobot@golang.org>
2024-11-08 17:50:54 +00:00
Jonathan Amsterdam 2e3472f912 internal/godoc: increase max doc HTML limit
Double the maximum allowed size of rendered documentation.

Increase the maximum file size as well.

Also, add information about the documentation size to logs and error
messages, so we can see the amount by which the limit was exceeded
next time.

For golang/go#40576.

Change-Id: Ia2aa11915d583e8e0c5ca0e273202a57679bd5f7
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/622556
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cody Oss <codyoss@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2024-11-08 14:34:36 +00:00
Jonathan Amsterdam 2aa6c44990 test/screentest: remove unneeded seeds
Remove modules that don't matter from the list of modules used
to seed the database in ci mode.

Also combine two identical tests.

Change-Id: I979ed07ce1f3bdf0fa164e46643cffefcdce45e3
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/626003
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
2024-11-08 11:51:10 +00:00
Vamsi Avula 6386050678 screentest: enable test x/tools directories expanded
This will be useful for https://go.dev/cl/620739 --
https://go.dev/cl/413680 (the CL that disabled it) says it was failing
on the CI, maybe we'll have better luck this time?
I'd like to enable it here so cl/620739 can capture the diff.

Change-Id: Id0000000c68af80d5194e955e0df7df59f58f29d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/624475
Run-TryBot: Jonathan Amsterdam <jba@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
2024-11-07 21:56:28 +00:00
Gopher Robot 78391ec0fb go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.

Change-Id: I08c7d609a45023d6a1603f4ca75093c001429ccd
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/617666
kokoro-CI: kokoro <noreply+kokoro@google.com>
Auto-Submit: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-10-04 19:09:37 +00:00
Grégoire Détrez d90bbc5a84 internal/source: support git.glasklar.is URLs
Fixes #69638

Change-Id: I9b595bcc98d2d92895ad3d626981aa551ce75d07
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/609535
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Bypass: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2024-10-01 19:13:39 +00:00
Jonathan Amsterdam e87f2996af internal/frontend: require GET for most routes
Add a GET method to the patterns for most frontend routes.
We omitted a few where we're not totally clear on what the client
may be sending.

Change-Id: I3f300b7d3753fd4009a60855c7a15b24c5e27dd6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/616395
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
2024-09-30 19:34:39 +00:00
Tatiana Bradley 2d793c01b2 go.mod: update github.com/jackc/pgx/v4 to fix GHSA-mrww-27vc-gghv
Change-Id: I31d7706cc9d93db858cdd363147d4b42a18d5086
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/615475
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Auto-Submit: Tatiana Bradley <tatianabradley@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2024-09-24 16:17:14 +00:00
Weida Hong 7d0ea0a0e8 internal/godoc/dochtml: enhance output parsing for example func
Current logic for detecting "concluding line comment" is not strict
enough that it may cause false-positive, causing some normal comment
(and code following it) to be discarded in the rendered web page.

Ensure that "concluding line comment" can only be prefixed by spaces.
Also add corresponding test case.

Fixes golang/go#65450

Change-Id: Ief9ec5326aa94965ca02d3278398cc5663ba395f
GitHub-Last-Rev: 7312ff3dff
GitHub-Pull-Request: golang/pkgsite#93
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/600415
kokoro-CI: kokoro <noreply+kokoro@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
2024-09-13 13:08:37 +00:00
Jonathan Amsterdam 47024e5792 internal/godoc/dochtml/internal/render: unique headings redux
This CL takes an alternative approach to generate unique headings.
It builds on the work of https://go.dev/cl/573595,
which was a fix for https://go.dev/issue/64582.

- It takes a more direct approach to constructing a unique string
  from an ast.Decl.

- The function that does that is tested separately, reducing
  the test cases needed for formatDocHTML.

- It saves the generated headings, so the HTML doesn't have to
  be reparsed.

NOTE: This will break all links to headings that are not in the package
comment. Happily, such headings are rare: only 40 of the top thousand
packages have one. It might seem we could avoid any breakage by only
applying a suffix to duplicate headings. But then at any time
in the future, a unique heading could become a duplicate, causing
a break. Better one break now than an unending stream of them.

Change-Id: I379712b54c6bc9c6a9343d0006639085a40e23d9
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/608035
kokoro-CI: kokoro <noreply+kokoro@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2024-09-10 17:35:46 +00:00
Gopher Robot 46f6a4c98c go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.

Change-Id: Iae61362219640de21f3265e20a9b5b6a37db4b00
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/611938
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
2024-09-09 16:22:33 +00:00
Jonathan Amsterdam e0bd492bb7 internal/fetch,godoc: handle lint exceptions
This CL addresses the errors found by staticcheck when we upgraded
to Go 1.23. All were deprecation warnings, and they were silenced
by "ignore" directives until we could deal with them.

In all cases, ignore the lint message was the right choice.
The CL adds justifications.

Change-Id: I09d4bb96cb9913f8e35189ed3a4af9deaa092447
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/610801
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
2024-09-05 13:10:54 +00:00
Tim King 6b577b411e all: fix printf(var) mistake detected by latest printf checker
For golang/go#69267.

Change-Id: I050c167e2e3ce36541e0d71469fb3f5778f5a882
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/610517
Reviewed-by: Ian Lance Taylor <iant@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-09-05 03:04:40 +00:00
Jonathan Amsterdam 0709f9d1cc internal/godoc/codec: improve documentation
Change-Id: I7b2d5721ee5502897be4d49d8c69ed16ee33fa8d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/610715
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
2024-09-04 23:28:05 +00:00
Jonathan Amsterdam 1551f083f9 internal/postgres: insert module path even if not a package
When inserting the paths of a module into the paths table, we were
inserting all the package paths and the v1 module path (the module path
without "/vN" suffix). That is almost always sufficient. But if a module
has a version suffix and is not itself a package, then we were not
inserting its path. The module path is needed by insertSymbols, so this
was causing that function to fail.

Add the module path, refactor the code to simplify it and allow testing,
and add a test.

(For a vN module the code also adds the v1 package path for every
package. I think this is unnecessary, but it's too risky to remove
it.)

Change-Id: I8caa3dd945692a4ec0a1128199237de6b77aa719
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/609117
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
2024-09-04 17:48:17 +00:00
Jonathan Amsterdam f5afe0245f several: use stdlib functions
Replace some functions with simpler code that uses
recent functions added to the standard library.

Change-Id: Ifcd570679a897fb165a4307c7ce9f0f53fccea05
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/609116
kokoro-CI: kokoro <noreply+kokoro@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2024-09-04 12:20:54 +00:00
Jonathan Amsterdam 6851d87f22 go.mod: upgrade to go 1.23
The go.mod major version now matches what we use for Dockerfiles.

The version of staticcheck that works with Go 1.23 revealed several
uses of deprecated functions. Some of these were easy to change,
but other require more care and will be addressed in some later CLs.

Change-Id: I7f8344e419b8be6351d51db90faa64cef04057a0
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/609142
Reviewed-by: Robert Findley <rfindley@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-09-04 11:03:35 +00:00
Jonathan Amsterdam 676c19eae9 all: get all.bash to work
- Fix npm vulns.
- Fix the minimized-css check to look only at the working dir.

Change-Id: Iecf2c5ef35813fef16df22147f795cda814fef2b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/608037
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
2024-08-24 13:58:12 +00:00
Jonathan Amsterdam 9b36df45a0 Revert "static/frontend: made cancel button in search field keyboard accessible"
This reverts commit a224e846c9.

Reason for revert: breaks the UI (#68538)

Fixes #68538.

Change-Id: I23a6acaf741e7cb863c304363ee9b7a4fdf0bbe2
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/608036
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2024-08-24 13:55:52 +00:00
Jonathan Amsterdam 1dda386476 devtools/cmd/seeddb: limit concurrency
Limit the number of goroutines that are fetching modules at once,
to reduce the chance of transactions timing out. We've been noticing
kokoro failures due to that recently.

I chose a limit of 10 arbitrarily. We'll see if it helps.
I tried testing locally, but I don't get the same behavior as on
kokoro.

Also, use an errgroup with a context to clean up seeddb failures faster.

Also, remove the seeddb flag permanently.

Change-Id: Ib0244c76572c9f9e34064f99a05b26d70cc55aea
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/607755
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2024-08-22 16:16:01 +00:00
Jonathan Amsterdam fca1531c8b internal/godoc/dochtml/internal/render: move tests to txtar
Move most of the cases of the formatDocHTML test to txtar files.
They were too hard to read.

The remaining cases have to do with passing an ast.Decl.
We may move them later or we may try a different approach
to generating unique heading IDs, which is the purpose of passing
in the decl.

Change-Id: I99c71ed1f04b469cb540ff72a31a39eb6cbb1050
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/607616
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-08-22 15:27:54 +00:00
Jonathan Amsterdam 7be9f26791 internal/godoc/dochtml: add comments
Also change renderInfo's first return value to template.FuncMap
for clarity.

Change-Id: I2ad2906d260d405225d54723401276e419545ecc
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/607418
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
2024-08-22 11:56:24 +00:00
Joseph Shin 53b9917759 internal/godoc/dochtml/internal/render: ensure unique heading ids
The existing implementation takes a simple approach of using the heading
text and replacing non-safe characters.  This leads to potential duplicate
heading ids, so use a map to keep track of used heading ids and generate
unique ids with various strategies until a unique id is generated.

Fixes golang/go#64582

Change-Id: I95f823c3782411454cff7353b49d90fab5799a45
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/573595
TryBot-Result: Gopher Robot <gobot@golang.org>
TryBot-Bypass: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2024-08-21 14:16:17 +00:00
Joseph Shin 71f98d56b5 internal/godoc/dochtml/internal/render: properly handle multi-line comments
The existing implementation rewinds lastOffset when indents are replaced
because lastOffset is calculated against the modified literal.  lastOffset
acts as a file pointer against the source so calculate offset against the
source literal before stripping indents.

Fixes golang/go#56762

Change-Id: I86fcef9eb24742e707b4a723a9767baac5433b9c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/586099
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Hongxiang Jiang <hxjiang@golang.org>
Commit-Queue: Jonathan Amsterdam <jba@google.com>
TryBot-Bypass: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2024-08-20 21:09:57 +00:00
Jonathan Amsterdam a03e71dcf0 various: upgrade to go 1.23 containers
Upgrade to use go 1.23 images in various files that
specify docker containers to run.

Change-Id: I6331a07c4d0f00dc7513a5286d315dd0f64cd362
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/606778
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
2024-08-20 16:40:08 +00:00
Gopher Robot da7af58eca go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.

Change-Id: I36c2e63fde4630e7562e09981c25e1675d8112d1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/603618
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Gopher Robot <gobot@golang.org>
2024-08-06 21:20:06 +00:00
Moritz Poldrack 9ad9fa3e0b static/frontend: always show links in readme files
Currently, links in Readmes are invisible when in the header of
a details element. A similar rule exists for the paragraph symbol, but
is overwritten by the following block.

Remove instructions that make links in summary invisible and remove
inactive rule for h2 elements.

Fixes golang/go#68132

Change-Id: Ia94563e855850beaa7ca10631a4ee23ef3add955
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/595055
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2024-08-06 17:17:48 +00:00
Michael Matloob 557c002897 cmd/pkgsite: fix setting gorepo flag
The value of the gorepo flag variable was being used before flags were
parsed. Fix that.

Also fix a couple of other issues that came up in golang/go#68533:
First, don't print "searching GOPATH" when we're not searching GOPATH.
Second, print the stderr from the go command in the error when it fails
because it's the stderr that usually provides information about the
failure, not the stdout.

For golang/go#68533

Change-Id: Ic6321d6e071dd82415474f2a2c54146e9eabbef7
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/600917
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
2024-07-24 21:23:07 +00:00
Tatiana Bradley 3166cf6ec5 tests/screentest: delete flaky screentest
Delete screentest "module-with-one-vuln" which is flaky.

For golang/go#68467

Change-Id: If2335c1f542478d9860ebe7ca42827a209a33eef
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/598532
Auto-Submit: Tatiana Bradley <tatianabradley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
2024-07-16 18:23:56 +00:00
Gopher Robot 2f8c8d5cd8 go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.

Change-Id: I60613b5233d53140c840852eb4151c05217a4fee
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/597016
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2024-07-16 16:37:24 +00:00
Russ Cox 69a9d00289 LICENSE: update per Google Legal
Very minor tweaks:
 - Remove (c) pseudosymbol.
 - Remove "All Rights Reserved."
 - Change "Google Inc." (no longer exists) to "Google LLC".

[git-generate]
echo '
,s/\(c\) //
,s/ All rights reserved.//
,s/Google Inc./Google LLC/
w
q
' | sam -d LICENSE

Change-Id: I6bf8e66dd0355bc2c6c03e5031ebdf33d3f8954a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/598524
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Bypass: Russ Cox <rsc@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-07-16 16:11:11 +00:00
Tatiana Bradley 763ccd4c8d internal/vuln,static/frontend: display custom versions on vuln pages
On vulnerability entry pages, display "custom versions" (and a note
explainining them) if there are any "custom_ranges" published in the OSV.

(Once this is live, we will remove the disclaimer from the OSV details
since this will be redundant.)

Change-Id: I20c3b08ecb3f36ce0334553eef0dacd0fe57480b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/597616
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-07-15 15:20:26 +00:00
Tatiana Bradley bdc5dafd86 tests/screentest: add test for vuln with custom_ranges
Change-Id: Idf26fba7712eeb98b84c5d87aa31da86e2ea0a7a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/597615
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-07-15 15:19:44 +00:00
Tatiana Bradley 7ff09bc2bb static/frontend: condense display of vuln chips
Instead of displaying a chip for each vulnerability affecting
a module version, display a chip for the first vuln, followed
by a chip with the text "+N more" (if applicable).

Screentests aren't available for the versions and search tabs,
but a screenshot of how this looks is at
https://github.com/golang/go/issues/68347.

For golang/go#68347

Change-Id: Ie19ce8e846b5ef3c3e2dc74a9415a7b908c93194
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/597176
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
2024-07-15 15:19:31 +00:00
Tatiana Bradley 50778609b7 tests/screentest: fix module-with-one-vuln screentest
Change-Id: I9f486b8e4758fa251d20e0fab3106095bc674f57
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/598035
kokoro-CI: kokoro <noreply+kokoro@google.com>
Auto-Submit: Tatiana Bradley <tatianabradley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
2024-07-12 22:48:12 +00:00
Tatiana Bradley 30d9315975 static/frontend: condense vuln display on module pages
When a module is affected by many vulnerabilities, the current
display can become overwhelming because details are listed for
each vuln.

If there are 2 or more vulns, condense the the message to
"Affected by GO-XXXX-YYYY and N other vulnerabilities",
with the option to click a button and see all the vulns.

Change-Id: I5e4e6712aa6038d390ed70b339a982f7684a986f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/595561
kokoro-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
2024-07-01 16:16:20 +00:00
Gopher Robot d8c29b80fc go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.

Change-Id: If05a2305c730eb5c3c079b61e3240dc366351174
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/590420
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
2024-06-07 18:49:34 +00:00
Tatiana Bradley f20ba84343 static/frontend/vuln,internal/osv: display info about unreviewed meaning on vuln page
For UNREVIEWED reports, display the word "Unreviewed" under the title,
and add a blurb to the feedback section explaining its meaning.

Currently, don't display anything special for a REVIEWED report. This is the
default.

Change-Id: I43ad7c324f6712a22a035c4aac725808cd50e7c3
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/586101
Run-TryBot: Tatiana Bradley <tatianabradley@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-22 14:39:55 +00:00
Tatiana Bradley 324f499864 tests: update vuln testdata to pull in review_status
Update the script that pulls in the latest vulns to include
an UNREVIEWED report. Run the script to update the test corpus to
bring in this new vuln, plus the review_status for all vulns.

Update the screentests accordingly.

Change-Id: I45aa815ac9a33d186bac196220cce169b8523dae
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/586100
kokoro-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Tatiana Bradley <tatianabradley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-22 14:39:35 +00:00
Jonathan Amsterdam 7c9c89467e all.bash: check that minified css files are unchanged
Add a check that the minified css files correspond to the their sources.

Previously, the all.bash script generated the minified files and left
the modified files in the repo working copy. This may have helped during
development, but during CI it should be a no-op. This CL simply verifies
that. The developer can still run `devtools/cmd/static` manually.

A check like this should be standard procedure for all binary or
incrutable files that appear in CLs.

Change-Id: I47d34e5204637ff38113b91ff46c595b9f42f4ee
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/585476
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-16 16:45:35 +00:00
Jonathan Amsterdam 03e325a946 ran `npm audit fix`
Change-Id: I2568aa885085a1820f4cffedecf0d737affd7da9
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/585475
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
2024-05-16 15:30:42 +00:00
Joseph Shin 3eb0e7ac85 static/frontend: position pilcrow right next to h4 header text
The existing h4 selector for function and type sections was including
comment headings breaking layout for the pilcrow link.  Narrow down
these h4 selectors since flexbox is only required for "since version"
layout.

Fixes golang/go#66458

Change-Id: Ibebaebb958c0abd777e52dda252eeddc22794bb6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/574719
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
2024-05-16 15:20:26 +00:00
Gopher Robot 62f6d87aa9 go.mod: update golang.org/x dependencies
Update golang.org/x dependencies to their latest tagged versions.

Change-Id: Ib144b71d0edfb68e0b24ce12a96e9a3bf8362a72
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/583617
Auto-Submit: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-06 18:57:56 +00:00
Luc Talatinian 87c4152498 static/frontend: ensure page content fits across >= 320 CSS pixels
Ensure main page content is readable at 320 CSS pixels without the need
for horizontal scrolling. This is important for documentation users that
may require zoom functionality in order to read content. WCAG 2.2
defines 320 pixels as the minimum width reasonably achieveable by site
authors.

See https://www.w3.org/WAI/WCAG22/Understanding/reflow.html.

Fixes #66996.

Change-Id: Ic3d02bffac23798bcd86d28560845fa91ce831db
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/581236
Reviewed-by: Jonathan Amsterdam <jba@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamalcarvalho@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Findley <rfindley@google.com>
2024-04-26 18:56:08 +00:00
Tatiana Bradley 41da83f650 internal/{frontend,vuln}: display affected modules
For vulns with no detailed package data, display affected
modules and versions.

Change-Id: Ibacdcd486cbb47b17a11d331692356a0603ac6d1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/581181
kokoro-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Tatiana Bradley <tatianabradley@google.com>
2024-04-24 21:17:54 +00:00
Tatiana Bradley a3b6cd3042 static/frontend/vuln: fix credits list display
Fix a bug in which the first two credits of a vuln report
were displayed with no separation.

Change-Id: I1f42268d8d6e03341e8e1b5db09d16beb7188f8f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/581180
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Tatiana Bradley <tatianabradley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-04-24 21:17:48 +00:00