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

278 Коммитов

Автор SHA1 Сообщение Дата
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
Andrew Bonventre 4b84ce7680 devapp/devappserver: add Dockerfile in preparation for running on GKE
Since we can’t run an App Engine Flex app on *.golang.org (see
issue), the Flex app.yaml file is removed.

Updates golang/go#20691

Change-Id: Id775962349a88b119c9fe671f9a5180f70528836
Reviewed-on: https://go-review.googlesource.com/46133
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-20 20:04:40 +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
Kevin Burke f2cd214fae all: fix vet errors
Replace oauth2.NoContext (deprecated) with context.Background(),
which has been available for two consecutive releases.

Add more cloud.google.com/go packages to the cmd/coordinator
Dockerfile to fix an error building cmd/coordinator. A dependency is
not present in master of cloud.google.com/go, but was present in the
older revision, and was not getting checked out correctly during the
"go get" step. In addition, we were failing to fetch dependencies for
some packages that coordinator depends on. I added instructions for
hopefully doing this more systematically in the future.

Fix the gitmirror Dockerfile which has the same problem.

Change-Id: Id6c2220482350a686b87742ec7915c457a689e52
Reviewed-on: https://go-review.googlesource.com/40852
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-04-15 23:42:12 +00:00
Kevin Burke 08248cebaa devapp: fix travis-ci tests
These tests pass locally (on my Mac) because Go builds in
/etc/apache2/mime.types, which maps the .ico file extension to the
image/x-icon content-type, which we check for in the test.

The Travis-CI builders don't have that file, so they return
vnd.microsoft.icon, which makes the test fail. Instead let's hard code
the content-type that we want, so the test passes.

Verified this failed by moving /etc/apache2/mime.types on my Mac,
observing a failure, then fixing the test and observing a pass.

Change-Id: I42d07fe413d2686d186f9157af8988e3a146a877
Reviewed-on: https://go-review.googlesource.com/38440
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-03-23 00:03:28 +00:00
Kevin Burke 4e8200224e devapp: serve static files outside of App Engine
Currently we rely on app.yaml for routing/serving static files in the
project. But this file isn't available if we are not running on App
Engine, so we need a different solution. Add a very basic directory
server. I'm not happy that we need N routes to serve N static files,
or that we can't reuse existing pieces but if I understand correctly
to use http.FileServer we'd need to have it handle the root route to
route all requests in a directory to the right handler.

Make the dashboard visible outside of App Engine by providing dummy
login/logout URL's, even though the functionality is unimplemented -
this makes the dashboard accessible and changes the error from a 500
(blocking the dashboard) to a 404 when you try to log in.

Change-Id: I2a52ff73dc68705962ecc64810ad352988097c06
Reviewed-on: https://go-review.googlesource.com/36319
Reviewed-by: Quentin Smith <quentin@golang.org>
2017-03-15 15:49:07 +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 b7a944e366 all: fix vet errors
It would be nice to run these alongside the tests. There is only one
vet error left in the x/build tree, an unreachable return next to a
TODO.

Change-Id: Ic31d96cdee5bb0f6b9795237ff3b743a4b76e3cf
Reviewed-on: https://go-review.googlesource.com/36898
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-02-12 17:35:52 +00:00
Kevin Burke 86ad3148de devapp: fix build
Fix an error where we are using the wrong "log" variable to log to
the console and where we are continuing to process a request after we
have written an error to the browser.

Change-Id: I3d37b7e7ef00cc2263072890be222340246f3ff3
Reviewed-on: https://go-review.googlesource.com/36128
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-02-02 16:28:23 +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
Kevin Burke fafbc45494 devapp: update source code link
The homepage linked only to the older godash package, when in reality
dev.golang.org is being served by the devapp package.

Adds a <title> to the page and adds closing </body> and </html> tags.

Change-Id: I71ee1e8739094c4cc8489d9759e5b3aabf610771
Reviewed-on: https://go-review.googlesource.com/34927
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-01-09 17:59:05 +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 a64934fa56 devapp: add median close time per create time plot
Also implements ymin, ymax for log scale.

Change-Id: I872184bb5b3dbaee685c068bc3381e075fecf146
Reviewed-on: https://go-review.googlesource.com/29530
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-28 18:11:19 +00:00
Quentin Smith ee5416da7c devapp: add documentation for /stats and /stats/svg
Now that the stats dashboard is (mostly) working, link it from the
homepage.

Change-Id: I5fa1c2f241151d809c2d9a6cf8f664dda14cf8b3
Reviewed-on: https://go-review.googlesource.com/28975
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-12 21:53:02 +00:00
Quentin Smith 5936fd2fc1 devapp: allow plots of issues by release
Change-Id: Ief3aa379d2a535a3210b088a4841f1c88eadc641
Reviewed-on: https://go-review.googlesource.com/28974
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-12 21:53:00 +00:00
Quentin Smith a4e54186e3 devapp: graph closed issues
Change-Id: I7123845146af835c97b7cbc4eb5ac30985beb121
Reviewed-on: https://go-review.googlesource.com/28973
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-12 21:52:56 +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 2c672578ac devapp, godash: track issue last update time
Show the last update time for each issue on the issue dashboard.

Change-Id: I53a9d7592c11bb29a70ce358296f92f7285281b7
Reviewed-on: https://go-review.googlesource.com/28090
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-08-31 22:19:47 +00:00
Quentin Smith 89e8d00eaf devapp: sort dashboard by milestone
Milestones are more useful if it's easy to see issues grouped by
milestone; this resorts the dashboard issues by milestone due date
before displaying them. Thus Go1.7 comes first, then Go1.7Maybe, then
Go1.8Early, etc.

Change-Id: I75aa32e00842413dcd62d6ec30893c8359cff44f
Reviewed-on: https://go-review.googlesource.com/23720
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-16 18:36:09 +00:00
Quentin Smith 7f572f1cb3 devapp: improve formatting of the development dashboard
Adds a last updated time to the top of the dashboard, and fixes the
"mine" and "unassigned" CSS classes to be properly applied to CLs.

Change-Id: I1c080b17cd78134674c69f1941cd81fbb287ebce
Reviewed-on: https://go-review.googlesource.com/23602
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-06-02 18:39:28 +00:00
Quentin Smith 8338faeebc godash: use Gerrit-derived scores
Previously, cmd/cl and cmd/godash were parsing Gerrit comments to
determine the current code review scores. They were missing some valid
Code-Review comments. Instead, just trust Gerrit's reported scores.

Change-Id: I4a07ebbce03d143d192cca87b0bfcb67f599fcf3
Reviewed-on: https://go-review.googlesource.com/23605
Reviewed-by: Austin Clements <austin@google.com>
2016-06-01 21:55:41 +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
Russ Cox 18d2e99245 devapp: change refresh to 5 minutes
The old dashboard on swtch.com refreshed every 5 minutes.
Surely we can do the same.
30 minutes is just too slow.

Change-Id: I338b3ae3277752e05bb2c7af42ba9770b8da6669
Reviewed-on: https://go-review.googlesource.com/23370
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-05-24 02:19:16 +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