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>
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>
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>
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>
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>
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>
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>
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>
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>
./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>
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>
- 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>
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>