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

26 Коммитов

Автор SHA1 Сообщение Дата
Dmitri Shuralyov b9910f3203 cmd/relui, devapp: remove rand.Seed call
It's not needed as of Go 1.20, the generator
is seeded randomly at program startup anyway.

Change-Id: Ic1f5cd84df333a73c8bd39be70f88df03c690e81
Reviewed-on: https://go-review.googlesource.com/c/build/+/599736
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-07-22 20:07:05 +00:00
Heschi Kreinick db77efa219 all: unify HTTP/HTTPS serving
We're gearing up to put most everything behind Cloud load balancers, at
which point Autocert serving will be unnecessary. To support HTTP/2 we
still need to serve TLS, but we can do it using a self-signed
certificate.

Unify the configuration of all that stuff behind a single set of flags
and clean up all the copied and tweaked code I could find.

The self-signed serving is dormant for now; I'll activate it in a later
change.

I didn't understand the need to tweak keepalive intervals everywhere;
keepalives have been on by default since 1.13. So I dropped them.

Change-Id: I0016211f1032a6c64375aad9e34e4e2e62861c5b
Reviewed-on: https://go-review.googlesource.com/c/build/+/358654
Trust: Heschi Kreinick <heschi@google.com>
Trust: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
2021-10-27 16:35:18 +00:00
Heschi Kreinick 9c47891a04 all: prepare to migrate to Ingress
Following:
https://cloud.google.com/kubernetes-engine/docs/concepts/ingress
https://cloud.google.com/kubernetes-engine/docs/how-to/managed-certs

Create an Ingress with HTTPS redirects enabled.

For each of build, dev, gerritbot, maintner:
 - Add three certs: the new Google-managed cert, plus the two old LE certs.
 - Add an ingress rule for the host, and a new internal Service it maps to.
 - Disable our own HTTPS redirects, since the ingress terminates HTTPS.
   They will be accessible via HTTP for the duration of the migration;
   they don't serve anything sensitive anyway.

dev-test.golang.org is already rolled out using only a Google-managed
cert, so you can try HTTP and HTTPS directly there. I've also verified
that the LE certs are served:

curl -v --resolve dev.golang.org:443:34.149.223.5 https://dev.golang.org/

Change-Id: I20f3c92ffb00dbd9066822f748508013b68d5483
Reviewed-on: https://go-review.googlesource.com/c/build/+/355670
Trust: Heschi Kreinick <heschi@google.com>
Trust: Alexander Rakoczy <alex@golang.org>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-10-21 19:14:11 +00:00
Andrew Bonventre 1389a95585 devapp: add stats page plus some minor cleanup
+ Adds a stats page that shows open CLs over time
+ Adds a command-line flag to reload templates on each request
+ Breaks some repeated code into some shared logic
+ Some minor cleanup to adhere to best practices

Change-Id: I2d84a1e5c77c7e9131c758d69e4a9bf9a9d815f4
Reviewed-on: https://go-review.googlesource.com/c/build/+/199637
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2019-10-09 22:36:12 +00:00
Dmitri Shuralyov 611bf70303 devapp: add acme.ALPNProto to NextProtos
We need to add this manually in order to enable the tls-alpn-01
challenge, since we're using GetCertificate directly instead of
via Manager.TLSConfig. We also don't have the http-01 challenge
enabled (HTTPHandler isn't being used), so this is the only way
for a Let's Encrypt certificate to be acquired now that tls-sni-*
challenges have been deprecated.

In the future, this code can probably be simplified by using
higher-level APIs of autocert, but this fixes the immediate issue.

Updates golang/go#32272

Change-Id: Ia72bca3e44bc585b0dfe5c7bcd3e4f544272d1ab
Reviewed-on: https://go-review.googlesource.com/c/build/+/179097
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-05-27 23:57:11 +00:00
Andrew Bonventre 1fadf6bf5a devapp: check for error from s.initCorpus
Also remove superfluous newlines from log strings.

Change-Id: I2e0fb408f40e47af3f6ea5149113722b3e1db114
Reviewed-on: https://go-review.googlesource.com/127675
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2018-08-02 21:57:06 +00:00
Andrew Bonventre a697e2c998 devapp: add healthz endpoint and configure k8s readiness probe
This will allow for zero-downtime deployments, which will be
important for when services start relying on the /owners endpoint.

Change-Id: I4671dbbbf473ba07dbab585222d12832c3193fac
Reviewed-on: https://go-review.googlesource.com/127036
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-01 18:15:17 +00:00
Brad Fitzpatrick fbf3a25047 devapp: revert status changes
This reverts the status changes to devapp from CL 96416

This will go into its own server instead.

Updates golang/go#21315
Updates golang/go#22603

Change-Id: Icb17a5915124241b2ef97a1ee2e9a0e4298784ce
Reviewed-on: https://go-review.googlesource.com/97516
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-02-27 21:14:24 +00:00
Brad Fitzpatrick b2715105cb devapp, status: start of status handler for monitoring
Also bump Go from 1.8 to 1.10, and change how the static binary is
built to avoid warnings during link.

Updates golang/go#21315
Updates golang/go#22603

Change-Id: I426491d48f787a77cb3eea4dff4d11f474236548
Reviewed-on: https://go-review.googlesource.com/96416
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-02-23 20:41:26 +00:00
Andrew Bonventre e3b7b1d23d devapp: remove godash code in favor of maintner
Adds two new functions to maintner:
+ (*GerritCL).Subject() returns the first line of the latest
  commit message.
+ (*GitHubRepo).ForeachMilestone calls a passed function for each
  milestone in the repo.

Change-Id: I08c50ea53b781064c8ab2ddaff2177f51ebb091d
Reviewed-on: https://go-review.googlesource.com/50652
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-22 21:35:17 +00:00
Andrew Bonventre 6990c3464a maintner, devapp: initial integration of maintner
+ Add UpdateWithLocker method to maintner.Corpus to allow an
  external locker to be passed that will be held during mutations.
+ Add OwnerID to maintner.GerritCL that returns the Gerrit user ID
  of a change using its meta commits.
+ Add maintner corpus to server.
+ Add /imfeelinglucky and /imfeelinghelpful endpoints that redirect
  to a random HelpWanted GitHub issue.
+ Add initial scaffold for GopherCon dashboard.

Change-Id: I2567b084f012cad5a9b4dee07e92be05088ac9d8
Reviewed-on: https://go-review.googlesource.com/47830
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-07 20:23:05 +00:00
Andrew Bonventre 058437e7a7 devapp: redirect to TLS when autocert is turned on
Updates golang/go#20691

Change-Id: I5247683f62cbe922a880246dbd2e99e31686e2d3
Reviewed-on: https://go-review.googlesource.com/46911
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-27 23:43:21 +00:00
Andrew Bonventre 9a31848956 devapp: add ticker to update dashboard data in place of /update
Updates golang/go#20691

Change-Id: I3c691c647860d541d53497c9923383421a5d2298
Reviewed-on: https://go-review.googlesource.com/46837
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-27 21:51:27 +00:00
Andrew Bonventre 69f93e2edb devapp: remove App Engine code
This change removes all but the / and /release endpoints, moving
things around and deleting all App Engine-specific code while
attempting to not make many core logic changes (those will come in a
follow-up change).

Updates golang/go#20691

Change-Id: Ie8fa184578177cc2cb3c070e9108cf27d9e6f689
Reviewed-on: https://go-review.googlesource.com/46832
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-27 18:50:50 +00:00
Andrew Bonventre b2bd0d6da5 devapp: further preparation for running on GKE
+ Remove superfluous check for PORT env var since only the flag
  will be used.
+ Remove HTML being written to the page before escaping step,
  causing jank.
+ Grab the GitHub token from GCE metadata if it’s available.

Updates golang/go#20691

Change-Id: I10fbc163ee91907ef0b843c823f40fd87a62f476
Reviewed-on: https://go-review.googlesource.com/46210
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-21 17:58:18 +00:00
Kevin Burke a5b059a63b all: fix tests
Fix a vet error in cmd/buildlet/stage0 and a devapp test was failing
on Travis CI because the mime.types on that box did not match the
standard mime.types on a Mac.

Change-Id: Iabfd00542495ec34d912900e88da41be5c1cad54
Reviewed-on: https://go-review.googlesource.com/42147
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-04-29 05:45:57 +00:00
Kevin Burke 481d0dc16f devapp: initial support for App Engine Flex
devapp now supports 3 modes of operation:

- App Engine Standard. This supports Go 1.6 and requires a modified
  local go-github to continue working. This app is built with the
  "appengine" build tag.

- App Engine Flex. This builds Go 1.8 in a Docker container, using the
  build tag "appenginevm", and works with the Google Cloud platform.

- Normal. This uses an in-memory datastore, and does not
  support user login/logout.

To get this working I copied appengine.go to noappengine.go and
modified the calls until they were working. You can view a running app
at https://devapp-161505.appspot.com.

Change-Id: I8ea018e63baf2dafb44150f7eee419e09065ba2c
Reviewed-on: https://go-review.googlesource.com/38161
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-04-18 05:15:52 +00:00
Quentin Smith 2259eb2912 devapp: improve logging for GitHub rate limiting
Change-Id: I48491a6741b5e7ff8e6870d1179eeef611eb42ad
Reviewed-on: https://go-review.googlesource.com/38099
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-03-13 22:17:37 +00:00
Quentin Smith e8368f55bb devapp: make it build for App Engine again
Change-Id: I6abd28479a348691d7830c2ccb05e1c3750f87a6
Reviewed-on: https://go-review.googlesource.com/38098
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-03-13 22:17:18 +00:00
Kevin Burke b1e8ca238f all: add contexts to go-github calls
The latest master for go-github (google/go-github@23d6cb9c) adds
Context parameters as the first argument to every function call.
Update code that calls go-github to have contexts, where appropriate,
and adds timeouts to some long-running commands that didn't
previously have them.

Fixes golang/go#19208.

Change-Id: I25203de5d10ada1dcd3a97eb5434a85bb328ce7e
Reviewed-on: https://go-review.googlesource.com/37293
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-02-24 21:54:04 +00:00
Kevin Burke 310c0214e9 devapp: put appengine code behind build flag
Per discussion on the mailing list we want to make this app run
on more environments than App Engine and hopefully with a backing
datastore that is just in-memory, or at the very least is not App
Engine specific.

Puts the datastore implementation detail behind an appengine build flag.
Adds an in-memory datastore if you are not running on App Engine; it's slow
since you have to fetch issues every time, but you can get all of the issues
and browse them. Adds a single test so we have the most basic of protections
against a regression.

Add a cmd/devapp main package so we can run the server outside of an
App Engine context.

Rename gg.Percentile to gg.Quantile to match the change in the latest
version of the downstream library.

Change-Id: Icbdef29676ecbf7078b0fb8c3920f61df60a5e2e
Reviewed-on: https://go-review.googlesource.com/34928
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-01-31 18:33:17 +00:00
Quentin Smith 5a057a2375 devapp: add per-release issue tracker dashboard
This imports https://swtch.com/tmp/dash.html and makes it render for any
release. Initially, the only graph is the # of open issues by milestone
over the course of the release.

The dashboard is not currently tracking label history, which is needed
to draw the second graph on that page.

Change-Id: I9bd031f8709701b304e18208ae3c972bdfe3b276
Reviewed-on: https://go-review.googlesource.com/30012
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-29 16:09:41 +00:00
Quentin Smith c575c788bc devapp, godash: plots of issue statistics
This adds a new project health dashboard, at /stats, that shows (for
now) 3 graphs of issue health.

Change-Id: Id9310924027a66af63e7a46b6a10a66917e01295
Reviewed-on: https://go-review.googlesource.com/28092
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-08-31 22:19:53 +00:00
Quentin Smith de87f1373f devapp, godash: collect issue statistics for plotting
A subsequent CL will add a dashboard for graphing project health; this
CL collects information about when issues are opened, closed, and
milestoned.

This also includes a refactor of the guts of devapp to make it more
modular.

It also adds logging to the godash library, which can be activated with
the -v flag in the godash command.

Change-Id: I54c1419435e496f5c0e2e7f4b966b3ee4de0b0a1
Reviewed-on: https://go-review.googlesource.com/28091
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-08-31 22:19:50 +00:00
Quentin Smith 03b0f5e524 devapp: add development dashboard
Resurrect the old go-dev.appspot.com, now backed by Gerrit and
GitHub.

Everything works except the state-mutating functions (permanently muting
directories, and changing the assigned reviewer from the dashboard). The
latter will likely never work with Gerrit.

Change-Id: Iad712ef2995f21083dbc57b399504d9da6f0f2c6
Reviewed-on: https://go-review.googlesource.com/23600
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-01 14:46:59 +00:00
Quentin Smith b0892397e0 devapp: GAE app for serving release dashboards
This uses the godash command/library to serve release dashboards, on a
new app to be hosted at dev.golang.org.

The dashboards are automatically updated by a cron job every 30 minutes.

Change-Id: I2e1e6a270e26fd93a9c767b0168e2c8c520e8ace
Reviewed-on: https://go-review.googlesource.com/23210
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-05-24 00:01:02 +00:00