Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doghouse: sunset google.golang.org/appengine module based on #307 #312

Merged
merged 5 commits into from Sep 21, 2019

Conversation

haya14busa
Copy link
Member

@haya14busa haya14busa commented Sep 21, 2019

Added following changes based on #307

  1. Remote Addr seems to be changed with go112. See "Forwarded" header instead to get request IP address.
  2. Fix the problem that urlfetch.Client(ctx) have Transport but default http.Client's Transport is nil and github.com/bradleyfalzon/ghinstallation failed with nil exception.
  3. Along with the change (2), use API to get installation ID ([doghouse] Use API to get installation ID #152) instead of from Datastore. It can be separate PullRequest but it helps me to debug new doghouse server without depending on datastore data.
  4. Remove login from warmup request config because it's no longer supported.

urandom2 and others added 5 commits September 18, 2019 16:39
The appengine packages that were designed for the go1 runtime, were left
functional in go111, but Google is requesting that users preemptively
migrate away due to their rigid structure and incompatibility with other
environments.

This change affects the reviewdog module dependencies, but code changes
are limited to doghouse. The appengine runtime has been increased to
go112 for extended support and to enforce that appengine packages break
if used.

appengine/urlfetch.Client has been migrated to net/http.Client.
appengine/datastore has been migrated to cloud.google.com/go/datastore.
This took more work than the Client changes, since the two packages are
incompatible. There may be work to further refactor the abstractions,
but that is out of scope for this change.

appengine.IsDevServer has no clear successor, thus its usage and
conditional logic has been purged. If there is intereset to have a
comprehensive local development version of doghouse, this can be added
back, but you will lose all the other mocks that dev_appserver.py
offers: user auth, datastore access, etc.

appengine/log contains leveled print functions, Errorf/Infof/etc., that
have no clear parallel in the stdlib log package. As a stopgap,
[SEVERITY] prefixes have been added to all the new log.Printf calls.
This is not indended as a comprehensive solution, and it may be better
to move to another package for logging, say logrus or log15, but it is
out of scope at the moment.

Finally, a note: with the change from using appengine.Context to using
http.Request.Context, there are places where an http.Request and
context.Context are passed. This could be simplified, but is out of
scope.

Fixes #226
https://developer.github.com/v3/apps/#get-a-user-installation
Fix: #152

http.RoundTripper arg of ghinstallation.NewAppsTransport and ghinstallation.New
must not be nil.
@haya14busa haya14busa merged commit 1d6a3c8 into master Sep 21, 2019
@haya14busa haya14busa deleted the arnottcr-go112 branch September 21, 2019 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants