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

46 Коммитов

Автор SHA1 Сообщение Дата
Jess Frazelle cb567ea2e0 cmd,devapp,maintner: update kube configs with sane security defaults
Add AppArmor and Seccomp defaults to kube configs.

AppArmor Docs: https://kubernetes.io/docs/tutorials/clusters/apparmor/
Seccomp Docs: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/seccomp.md

Apparmor and Seccomp requires Kubernetes 1.4.

Change-Id: I202d3b155d7dd336d5e66d9cf4490cf218b2c759
Reviewed-on: https://go-review.googlesource.com/49254
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-18 19:51:00 +00:00
Jess Frazelle 947af569fa devapp: update issue number for contributor workshop
Change-Id: I31c16b25123c5978ff1b373f642e434a6beb43a2
Reviewed-on: https://go-review.googlesource.com/48670
Reviewed-by: Jessica Frazelle <me@jessfraz.com>
2017-07-15 14:25:15 +00:00
Andrew Bonventre 942d04cc17 devapp: update Dockerfile.0
Change-Id: Ic0e9317afe48c5feb91de43a3b4fb25279a41d47
Reviewed-on: https://go-review.googlesource.com/48597
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-15 02:10:25 +00:00
Andrew Bonventre 040116b11c devapp: assign image version based on git rev
Change-Id: Icf7c33dcda731d3641da3a72ebd56f39e05f0813
Reviewed-on: https://go-review.googlesource.com/47835
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-14 23:56:44 +00:00
Andrew Bonventre 0f092dac24 devapp: order the avatar group according to most recent activity
Also remove unused gophercon.go

Change-Id: I195b1333b5c9dab4793c021a2496121dde5f421f
Reviewed-on: https://go-review.googlesource.com/48610
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-14 23:24:50 +00:00
Andrew Bonventre 440ca734e5 devapp: some CSS tweaks to the contributor dashboard
Change-Id: I00a515ced978902541f1cdb3fcdc404c07e1e460
Reviewed-on: https://go-review.googlesource.com/48456
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-07-13 23:32:11 +00:00
Andrew Bonventre 44295aee19 devapp: hook up Gerrit CLs and autoupdate page
Change-Id: Ifcdf02a4f453ae6a48fae6f69f2956d36e5ace25
Reviewed-on: https://go-review.googlesource.com/48450
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-13 23:30:43 +00:00
Andrew Bonventre cc6dcd2212 devapp: fix tests
Change-Id: I459a75c2a33bd88c9cd79ee6b5fae95a19d48fa1
Reviewed-on: https://go-review.googlesource.com/48350
Reviewed-by: Kevin Burke <kev@inburke.com>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-07-13 06:20:16 +00:00
Brad Fitzpatrick aee02ad64d cmd/gitlock: new tool to lock git dependencies in place in Dockerfiles
Fixes golang/go#20747

Change-Id: I8fe03af0fb8db4d1fd7c396d7b228b87209a9208
Reviewed-on: https://go-review.googlesource.com/47971
Reviewed-by: Kevin Burke <kev@inburke.com>
2017-07-13 04:54:15 +00:00
Andrew Bonventre 27405e4a4c devapp: add GopherCon community dashboard
+ Add html/css/js base code. Does not do real-time updating
+ Currently only registration is supported as an activity

Change-Id: I82c3d62ec1ffce30e6a20eb85503be6be52194a6
Reviewed-on: https://go-review.googlesource.com/47935
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-12 18:14:28 +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 d2321a9ebd devapp: serve favicon with definitive content-type
It will differ depending on the box it’s being run on, breaking
tests depending on the environment.

Change-Id: I9d6e6ef3c89c922ab8fa3a4a52c364ed02230b7e
Reviewed-on: https://go-review.googlesource.com/47033
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-28 19:05:55 +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 225b18be82 devapp/devappserver: support TLS for local dev and prod via autocert
Updates golang/go#20691

Change-Id: If0f160713496b1c9ebceacb4975e9afa44539e5a
Reviewed-on: https://go-review.googlesource.com/46720
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-26 22:24:21 +00:00
Andrew Bonventre abffef5383 devapp/devappserver: add dev and prod kubernetes configurations
Updates golang/go#20691

Change-Id: I816fc059473ded8ef85e9bb6fb6cb73e41ba21d6
Reviewed-on: https://go-review.googlesource.com/46710
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-26 18:20:45 +00:00
Andrew Bonventre 3cc3abb423 devapp/devappserver: add kubernetes service and deployment configs
Updates golang/go#20691

Change-Id: Ia92422213111a965136c33359c16b17ca3fabec5
Reviewed-on: https://go-review.googlesource.com/46465
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-22 21:47:29 +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
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