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

24 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Amsterdam 01af57e7dc internal/postgres,etc.: support bypassing license restrictions
Add a mode to postgres.DB where data is saved even if the module or
package is not redistributable.  This "bypassing license restrictions"
mode is off by default.

Add a flag to the worker binary to turn it on. Used a flag rather than
an environment variable so there is no way for ambient state to affect
the binary for this important decision.

Also:

- Add a test to verify that license data is removed/not removed
  depending on the bypass setting.

- Fix a bug where the new model insertion wasn't omitting
  documentation for non-redistributable modules.

- Fix a bug in internal/sample where the top-level readme wasn't
  getting populated.

A later CL will change the frontend to bypass the check.

For golang/go#39602
For golang/go#39629

Change-Id: I67a6d24c18f3b93cfbfc9ec2a20159c07a84e077
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/246957
Reviewed-by: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
2020-08-06 23:48:38 +00:00
Amarjeet Anand ff5b79af64 doc: fix go mod index and mirror urls
Go mod index and mirror urls were missing http scheme in the design doc. As a result, it
was redirecting to
https://github.com/golang/pkgsite/blob/master/doc/proxy.golang.org.

Fixes golang/go#40602

Change-Id: I8717101d64769fd5dd9af0b90bed28c2a19c4986
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/247097
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-08-06 13:23:35 +00:00
Miguel Acero 6ffa811e8a doc: update precommit.md
This change removes internal information about Google workstations from documentation.

Change-Id: I9284ee56d6fe2364b36e4146a16bfca50e7fc90a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/242779
Reviewed-by: Julie Qiu <julie@golang.org>
2020-07-15 20:28:36 +00:00
Julie Qiu 8097b5baff doc: prettier-ed frontend.md and worker.md
Change-Id: I095d23ba746648e7efe9b7872e66db56143a48bd
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/241377
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-07-08 13:26:39 +00:00
Daniel Martí c93212c9cc doc: improve 'go run' tips for cmd packages
Running a single Go file is OK if that file is specifically standalone,
such as gen_foo.go. However, if we're building an entire package, it's
both easier and better to build the entire package instead.

Even if the package is currently just one file, using 'go run
./cmd/frontend' is easier to type, and won't break if the package ever
gets more Go files, which is likely.

While at it, use indentation for short single-line code blocks, since
that's nicer in plaintext than triple backticks.

Change-Id: If905cbe79eedbd676dbeb4ead2588a9a6a7ebb76
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/241018
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-07-07 21:34:21 +00:00
Jonathan Amsterdam 1705eb3beb devtools/cmd/csphash: check script hashes for CSP
Add a tool that checks the script hashes used
for our Content Security Policy (CSP).

Run the tool from all.bash.

(Also, prettier decided to change CONTRIBUTING.md.)

Fixes b/159711607.

Change-Id: I4498a19143c53fb90bcf0560ccaf529f4fb72a81
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/240138
Reviewed-by: Julie Qiu <julie@golang.org>
2020-06-30 15:51:38 +00:00
Julie Qiu e48aa2545f doc: update postgres.md
Information is added about GO_DISCOVERY_RUN_TESTDB and docker
setup.

Change-Id: Ib6fea76f2ad2bece0f520c1a765b7f775dd4e179
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/239285
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-06-23 20:59:53 +00:00
Julie Qiu 34c7698bb7 doc: fix architecture.png
Update line colors to match and add missing arrow from frontend to
frontend task queue.

Change-Id: I988fcc8a7ed012980c4cbccf0dc58af23ffc8922
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/237940
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-06-15 15:43:37 +00:00
Julie Qiu 39971eaba8 doc: fix link to postgres.md and database.md
Change-Id: I37237bb48a5eaa4b9517850b7414f10363a9934e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/237939
Reviewed-by: Jamal Carvalho <jamalcarvalho@google.com>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2020-06-15 15:33:13 +00:00
Julie Qiu b996f8e63d doc: minor updates and fixed formatting to postgres.md
Change-Id: I077a67ec75217cc2c84f66717b0229f15802e84e
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/768679
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-06-11 17:53:12 +00:00
Julie Qiu 2cc778a6a3 doc: format and ran prettier on precommit.md
Change-Id: Ibcff373bc817f2b67abbb45b85ae7ccb34b5bcfd
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/768318
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-06-11 17:53:07 +00:00
Julie Qiu d4e95450c3 doc: add information on pkg.go.dev architecture
A diagram and additional details are added about the architecture of
pkg.go.dev.

Change-Id: I87cf5ed86fa9dcce5a9aa7656b6731a672fdd7eb
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/768311
Reviewed-by: Jamal Carvalho <jamalcarvalho@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
2020-06-11 17:17:34 +00:00
Julie Qiu 4cb4254131 all: update documentation
README.md, CONTRIBUTING.md, doc/design.md and doc/frontend.md are
updated improve clarity on the project direction and how to contribute
to the project.

Change-Id: Ia4b7302cf4851c0f777f8b7c3fa45c60dad7d989
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/766270
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-06-11 15:17:46 +00:00
Miguel Acero eeabbb31ec CONTRIBUTING.md, doc: add details for local development
Instructions are added for how to install golang-migrate. Additional context is added for how to populate the local database, and run the frontend and worker servers.

Updates b/157994345

Change-Id: I937fd77da5894c01f2c380cc94055fa786a448ce
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/760281
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-06-04 15:30:24 +00:00
Julie Qiu 23f4a4a759 all: run prettier on markdown files
./all.bash prettier now runs on files with a .md file extension. Several
existing .md files are formatted.

Change-Id: Id083a932cdd5db105ae7494b71bcad340b080132
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/756682
Reviewed-by: Andrew Bonventre <andybons@google.com>
2020-05-29 14:48:09 +00:00
Julie Qiu 97312c3aed devtools: fix references to scripts
In commit 947bb6d235, scripts was renamed
to devtools. There are some lingering references to scripts, which are now fixed.

Change-Id: Icca8b2fa05694fd546c141d045acd13c7679048f
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/753924
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-05-26 23:06:21 +00:00
Julie Qiu 6b8aeafc0d scripts: add migrate_db.sh
A helper script is added for migrating discovery-db locally.

Migrations are managed with the golang-migrate/migrate CLI tool.

Change-Id: I9fac3debd04cc7b3e6ff13ab6c64e392614bc317
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/705332
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-04-06 17:09:52 -04:00
Jonathan Amsterdam 9dbee57b22 doc/postgres.md: rewrite for formatting
The little mini-headings in the numbered list didn't format
as I hoped.

Change-Id: Id371e581cc52538adddd01739f07243338e77e60
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/694438
Reviewed-by: Julie Qiu <julieqiu@google.com>
2020-04-06 17:09:52 -04:00
Jonathan Amsterdam c5d548b120 docs/precommit.md: remove broken reference
Change-Id: Iee012b0c2d6d3ff754288873e7d6508c836befaf
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/694435
Reviewed-by: Julie Qiu <julieqiu@google.com>
2020-04-06 17:09:52 -04:00
Jonathan Amsterdam 31a84a3126 docs/postgres.md,others: rename local DB, rewrite DB setup
- Change the local database name from "discovery-database" to "discovery-db".

- Rewrite docs/postgres.md to include that change, and reorganize it for clarity.

Fixes b/151647550.
Updates b/151624984.

Change-Id: Id0bb43f270ca0fc1473fff931ac3a18c92d080b6
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/694434
Reviewed-by: Julie Qiu <julieqiu@google.com>
2020-04-06 17:09:52 -04:00
Jonathan Amsterdam 1c003d1c99 CONTRIBUTING.md,docs: clean up for external use
Change-Id: I1ab3bcb5eed7000ab104fa126ddefedcde0f653c
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/692510
Reviewed-by: Julie Qiu <julieqiu@google.com>
2020-04-06 17:09:52 -04:00
Jonathan Amsterdam ae7fe222a8 doc: worker.md and frontend.md
Modify worker.md and write frontend.md.

Change-Id: I25868143ea9f47e32090eb872ef4574ef5ee7a5e
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/686699
Reviewed-by: Julie Qiu <julieqiu@google.com>
2020-04-06 15:50:52 -04:00
Jonathan Amsterdam b4898040e5 doc/design.md: expand
Write a doc giving an overview of the architecture.

Change-Id: I93f4122f302929e0a37647fc32d0316bf6a956e4
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/685778
Reviewed-by: Julie Qiu <julieqiu@google.com>
2020-04-06 15:50:52 -04:00
Julie Qiu a1a82cfb05 discovery: update README.md and CONTRIBUTING.md
README.md and CONTRIBUTING.md are updated, and content about
contributing and desing decision is moved to the /doc directory.

Updates b/150141240

Change-Id: I82cf43694799535617b0774febe13cb4dadac489
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/677232
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-04-06 15:50:52 -04:00