[rotang] Fix panic when fetching legacy calendar credentials.

The problem here is another one of those context.Context mismatches.
In this project there are 3, at least, contexts.

- ^router.Context - Used by the luci/gae handlers and packages.
- context.Context - The normal context used by most normal appengine packages.
- appengine context.Context - For when using cloud APIs like Calendar and email.

When a Cloud API is presented with the wrong kind of context the service panics.

To clean this up the credentials functions now take a *router.Context instead of
just a context.Context. This b/c the legacy credential function use both the normal
context (datastore) and the appengine conext (calendar/backup). The appeninge context
can be created from the *router.Context.Request.

Bug: 927559
Change-Id: Ic4dec8c4fcdb31bc3600948efa97d21ec6672b15
Reviewed-on: https://chromium-review.googlesource.com/c/1449352
Reviewed-by: Scott Lewis-Kelly <slewiskelly@google.com>
Commit-Queue: Ola Karlsson <olakar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#20437}
9 files changed
tree: a9bcc9f9c066e5a1ef03d53b4a6d1b58d9e41c28
  1. cmd/
  2. pkg/
  3. BROWSE.md
  4. DEVINFO.md
  5. DOCUMENTATION.md
  6. Makefile
  7. OWNERS
  8. README.md
  9. rotang.go
  10. SWITCH.md
README.md

Rota-NG

This is the home of the Rotation Manager-NG Design Doc.

The goal is replace the current Python script generating the Sheriff rota with this Go AppeEngine service. This to have a better base for running/managing the service and future developments

Source structure.

See BROWSE.md

Switch over from the old service to this.

See SWITCH.md