| Age | Commit message (Collapse) | Author |
|
Change-Id: Id22b6fbc926c516043a2a9869ce9042dedebc725
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/753433
Reviewed-by: Jonathan Amsterdam <jba@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
|
Prior to CL 747620, we used the database/sql.DB default idle connection
limit of 2. An increase from 2 to 10 is quite extreme. If there are many
instances, the total number of connections can be quite high.
Reduce the limit to 6, which is selected as enough to handle the
concurrent requests for median instances.
Change-Id: I38772cef6f365a65b82842f5a389e50f6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/751540
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Nicholas Husin <nsh@golang.org>
Reviewed-by: Nicholas Husin <husin@google.com>
|
|
Under high-load, the frontend can issue many queries and trigger many
connections. This can exceed the Cloud SQL connection limit of 100 per
instance enforced by the Cloud Run environment, even if the database
itself has remaining global capacity.
To prevent this, we introduce limits on the database connection pool.
We also include settings for idle connections and connection lifetimes
to ensure better resource management and connection rotation.
Introduces new env vars:
GO_DISCOVERY_DATABASE_MAX_OPEN_CONNS
GO_DISCOVERY_DATABASE_MAX_IDLE_CONNS
GO_DISCOVERY_DATABASE_CONN_MAX_LIFETIME
GO_DISCOVERY_DATABASE_CONN_MAX_IDLE_TIME
Updates SetPoolSettings to validate that MaxIdleConns does not exceed
MaxOpenConns, providing a warning if it does and capping it.
Change-Id: I74edac05c4a23102d64e74a180c661c223e1b757
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/747620
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Nicholas Husin <nsh@golang.org>
Reviewed-by: Nicholas Husin <husin@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
|
|
Primary and secondary DB will be derived from a single env var
GO_DISCOVERY_DATABASE_HOST.
The env GO_DISCOVERY_DATABASE_SECONDARY_HOST will be obsolete.
Change-Id: I4c5276c1fef7c93f9abbe5878401f22bdbab69dd
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/717800
Reviewed-by: Nicholas Husin <nsh@golang.org>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicholas Husin <husin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
|
|
The beta environment is no longer in use. This change removes related
logic and references, such as the middleware redirect to
beta.pkg.go.dev.
Change-Id: I0c6ebbe11d5689ccf2abf8c722399d8dc339db89
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/715321
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
|
|
Change-Id: Ia70b35ab9aef270692a3892629c3c81208771089
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/713360
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Auto-Submit: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
|
|
This aids in diagnosing per-instance issues. The instance ID seems like
it would belong in the MonitoredResource labels (configured in
serverconfig), but the top-level instanceId field is the standard name
for this field on Cloud Run.
Log messages going directly to stderr (before we configure logging) get
this label automatically from the Cloud Run infra. When we use
stackdriver directly we apparently need to add this ourselves.
See https://cloud.google.com/run/docs/logging#service-fields.
Change-Id: I6a6a636cb11a2abc00347e0679605ebbdb9995f4
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/700396
Reviewed-by: Jonathan Amsterdam <jba@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
|
|
This change creates a new package that does config initialization and
other GCP-specific operations that were previously done in package
config, so that config can have no cloud dependencies.
For golang/go#61399
Change-Id: I8d78294834e325b47d838892a1cef87003a4b90a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/522516
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
|
|
For golang/go#61399
Change-Id: I90070de1c2fcde2bb4056c30637d4ff4fdf100f5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/515376
kokoro-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
|
|
yaml.v3 is the more widely used yaml. The main difference between the
two is that ghodss converts yaml to JSON as an intermediate to
marshalling and unmarshalling. That means we need to add yaml struct
tags to use yaml.v3.
Add yaml tags to ConfigOverride and QuotaSettings because yaml.v3
lowercases the names of fields by default and the configs have used
uppercase names. Change a test experiment config to use lowercase
names since that's what's used in most other configs.
For golang/go#61399
Change-Id: Id7f09f2635ee013506b1573bfe555ec0348e60e4
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/514522
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
kokoro-CI: kokoro <noreply+kokoro@google.com>
|
|
For golang/go#59622.
Change-Id: I4059df405e248824a3521fcc084568b052fe4380
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/486458
Reviewed-by: Suzy Mueller <suzmue@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
|
|
Change-Id: I3f53d86ee7f3a3521678101654d495838738681b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/474455
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Auto-Submit: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
|
|
Most of the checks were about io/ioutil. There were a couple of
other minor ones. I didn't address the check for strings.Title;
instead, I turned off that check globally with a staticcheck.conf
file.
Change-Id: I286a6894fb1fd891818ab9e451c891f52a3828fc
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/412675
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
|
|
Also, comment out unparam because it doesn't work on generic
code yet.
Change-Id: I821e29e9011781d851b9b468dae56f47695d7450
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/389655
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
|
|
Change-Id: I63aff7182ffba765bbd5b104089562b04bff0960
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/388956
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>
|
|
This CL adds a new GO_DISCOVERY_DATABASE_SSL environment variable
so that the sslmode in a Postgres database can be configured.
It defaults to "disable" to ensure backwards compatibility.
Fixes golang/go#49977
Change-Id: I399e32f1a7862c55c7923bc55f465e16b9a5659b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/369314
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>
|
|
Added an endpoint to clear the cache during cloudbuild
deployments of the beta frontend.
Change-Id: I3fb19c3f1eef6b1b15eda2601b27a403b39b0f8d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/375956
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>
Reviewed-by: Julie Qiu <julie@golang.org>
|
|
Instead of making the debug pages visible based on an experiment,
require a "secret" header value instead. This will make them available
at all times in all environments, without a config change.
Context: debugging the memory creep we observe on Cloud Run the prod
frontend.
Change-Id: If78798d838ce774f51117668bfb1d4dd91bfa817
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/365654
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>
|
|
If the instance ID is not available from an environment variable,
query the GCE metadata for it.
This is necessary for Cloud Run. Its instance ID isn't available from
an environment variable as App Engine's is, and without something to
distinguish instances, metrics from multiple instances look the same
and cause the StackDriver error "One or more points were written more
frequently than the maximum sampling period configured for the
metric."
Also, log the monitored resource we use for metrics to aid in
debugging.
Change-Id: I477644572348bc72440c424ba84c2fc378c3fe35
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/357037
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>
|
|
Add support for services on Cloud Run by looking for Cloud-Run-specific
environment variables.
Change-Id: I0877bc90ab9b8b9d7a960f82d85a015afdf22d2e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/353809
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
|
|
In most cases Cut(s, sep) is clearer than strings.SplitN(s, sep, 2).
Change-Id: I375c15f778e43ff25b5b74c9ad0e96dac4615786
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/347889
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>
|
|
Under an experiment, look up and display a package's vulnerabilities
on its main page using the client provided by the golang.org/x/vulndb
module.
For golang/go#48223
Change-Id: I310440db16f8ad5fe582fc8ab42999e874f3ca88
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/347949
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>
|
|
The redis HA was used by search autocomplete and is no longer used by
anything.
Change-Id: I39a2c81c47da53823d7b668a980159c4726c6b13
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/340393
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>
|
|
log.SetLevel is now called in config.Init, so that it also applies to
logs in the Init function.
Change-Id: Id552923b4d81bb1678b8ffa72f1b1d858de559c1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/335257
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>
|
|
The pkgsite logger is now used instead of the log package from the
standard library.
Change-Id: I5083d8cd6bf7a96a9245f848633b8803d0d80483
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/333931
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>
|
|
Logs related to reading the experiment config file are downgraded to
debug level to reduce noise during development, since these logs appear
every minute.
Change-Id: I80169a30e6eeb3829be0324fb901a9da13bb8300
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/332376
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>
|
|
Fixes this error:
readOverrideFile(ctx, "local-override.yaml"): dialing: google: could not
find default credentials. See
https://developers.google.com/accounts/docs/application-default-credentials
for more information.
Change-Id: I9478707913487c753143df113ac4fba61bde8df3
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/329501
Trust: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
|
|
Hard-code "pgx".
Change-Id: I5787d67704fddbee2f9b2f7b94497906b168a970
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/329170
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
|
|
The variable didn't do much: it is set to <env>-override.yaml
everywhere. Just hardcode that value.
Change-Id: Ie50265d020acd57532e07d95ce8663a2dd488a11
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/329169
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
|
|
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>
|
|
As CL 304630 merged, we change the database driver to pgx, this CL
change the default driver value in config.go.
Change-Id: Ic4697dc83ac03b432fbbca3d7d2cd2f6e0167645
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/307629
Run-TryBot: Baokun Lee <bk@golangcn.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Trust: Baokun Lee <bk@golangcn.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
|
|
Change-Id: Iae7c1ec13b0ceb26352fa8f06f27cdf6cb3f99e9
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/292854
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>
|
|
Use a header to communicate to the error-reporting middleware that an
error report should not be sent.
This can be used to address item (3) on the issue, duplicate error
reporting.
For golang/go#44231
Change-Id: I33e91fe6b7af39bf2a2221fe20b16100b956a9e6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/291489
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>
|
|
Use lowercase "true" and "false" for environment variables for
consistency.
Change-Id: I18eb4fed52174d7982c1530339ae36c116c36103
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/274246
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
|
|
Previously, the quota server was enabled by default, which caused this
error:
2020/11/30 15:53:07 Critical: config.Init(ctx): secrets.Get(ctx,
"quota-hmac-key"): need GOOGLE_CLOUD_PROJECT environment variable exit
status 1
It is now disabled by default and GO_DISCOVERY_ENABLE_QUOTA needs to be
set to enable the service.
Fixes golang/go#274232
Change-Id: Iba44ae869dea11c1d5d91544072eba04156daaa8
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/274232
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Trust: Julie Qiu <julie@golang.org>
|
|
Remove support for the QueueService config and for queuing tasks for
an AppEngine service.
Change-Id: I05dcdeaef2e378a5261490badd8b11cd68f64429
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/274494
Trust: Jonathan Amsterdam <jba@google.com>
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
|
|
Remove the last vestiges of the etl app.
Change-Id: Idba2a44aa2a8952b5baf8f5c9e0e4d3b9123da9f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/274122
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>
|
|
Our previous quota middleware stored data in RAM. That meant that it
was ineffective when there were multiple instances (processes)
running, because the totals were separate.
This CL uses the same redis instance we use for caching
to hold the data, so it's shared.
Also, previously the only way to set some quota parameters was via the
override file, which is intended only for emergencies. Allow the
important ones to be set by environment variables, like most of our
other config.
Also, the rate-limiter package we use requires v8 of the redis client,
so move all other uses of it to v8.
Change-Id: I1804014030db834a30511786f0a7edfd02e279a5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/269737
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>
|
|
The worker and frontend get the driver name from the config struct,
via an environment variable.
The default is "postgres", which was the previous hardcoded value, so
this CL on its own has no effect.
Change-Id: Ia1ecd39e15ea75f21dc7c94aa5567b870a646bf7
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/272787
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>
|
|
The variable tc is renamed to test when used to refer to a test case, for
consistency throughout the rest of the codebase, which uses the
variable test in most cases.
Change-Id: I88a87aa020928af98e8579a299f3111718dfa044
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/271809
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Trust: Julie Qiu <julie@golang.org>
|
|
The task names we generated for Cloud Tasks included time information,
so that we could control how freqeuently tasks were de-duped. We've
been using a 3-hour window, meaning that if a module's task finished
or was deleted, another task for that module couldn't be added to the
queue (would be de-duped) for 3 hours.
This scheme has the unintended consequence that if a module is still
on the queue after 3 hours, then another task for the same module
could be enqueued (since its task ID would be different). That means
that if the queue ever gets 3 hours behind, it could get filled with
duplicate modules. For example, this morning the queue had about 25,000
tasks, of which about 7,000 were duplicates.
This CL sets a task's name to a function of the module path and
version. That will prevent a task on the queue from being duplicated.
A repeat task can be added about 1 hour after the previous task
finishes or is deleted (see the Task De-duplication section of
https://cloud.google.com/tasks/docs/reference/rpc/google.cloud.tasks.v2#task),
which is fine. It is still possible to add a suffix to the task
name to requeue sooner.
Change-Id: I34ffce5ea67b9e00b88ca4cf38182e34a6ba8657
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/270337
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>
|
|
Change-Id: I3f3b81699910c24099ddfff64fc355b657c74071
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/268397
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>
|
|
We don't always want to get emails about errors (for instance, for our
dev environment). The product doesn't support selectively emailing by
service, so disable error reporting in the binary instead.
Change-Id: Ia5abc50a86dbdb22d14cddc36c0450d2e505ff1b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/262997
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>
|
|
Change-Id: Ibe9b3d299d0a86f8ddd5ea20582ca4bdd7357f11
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/257244
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>
|
|
If the GO_DISCOVERY_SERVE_STATS env var is true, add a /detail-stats
handler that handles any detail page, but instead of serving the page
it serves JSON with page statistics, like timings and size.
Implemented as middleware that runs the actual detail handler,
bypassing the cache.
Will be useful for performance work, like forthcoming doc rendering
changes.
Change-Id: I738f7413a33caaabc4a116235e68ac3932c18f96
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/257245
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>
|
|
If the environment doesn't specify a bucket, read the dynamic
config from file.
If neither is provided, don't crash.
Fixes golang/go#41608
Change-Id: I5de91f2e394e9d02d238bcfed3f5e13f173321f9
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/257098
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
|
|
Have config.GetEnvInt terminate the program if the environment
variable's value is non-empty but not an integer. That's clearly
a bug.
Also, use it in more places.
Change-Id: Ibcc192853e4b5fc01dad709de4de2e5db6fff709
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/256760
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>
|
|
This lets us use our log package, and internal.Experiment.
Change-Id: I48772c2f5d254cfa57c5b791535b9dad9bd3be8d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/256518
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>
|
|
If the GO_DISCOVERY_EXPERIMENTS_FROM_CONFIG env var is "true", read
experiments from dynamic config instead of the database.
Temporary, until we switch over completely to dynamic config.
For golang/go#41483
Change-Id: Icf6038fb9f2322eba24bedf60450cd9fce84bd6c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/256380
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
|
|
Add support for "dynamic" configuration, meaning that the config is
not tied to deployment. It is read from a (statically!) configured GCS
object, and can be re-read at any time.
This CL defines the DynamicConfig struct and provides code to read and
parse it. (Reading and parsing are provided as separate exported
functions to support checking by a separate tool.) Later CLs will hook
it up to the experiments framework.
For golang/go#41483
Change-Id: Ic37fdfe9e11682d60e9b8863a79ddf73db3f20fc
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/256018
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>
Reviewed-by: Julie Qiu <julie@golang.org>
|