-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Using go-github on Google App Engine with recent context changes - any interest? #578
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
Comments
This was recently mentioned in #526 (comment) by @samuelkaufman, FYI. |
@gmlewis yeah I'm definitely interested. I'd managed to avoid vendoring up until Friday, when I had to pin this repo to the context changes :) I'd love to be able to keep backwards compatibility in this library so I could stay up to date (until AppEngine upgrades the go version) |
OK, I'll put together a PR then, @samuelkaufman... hopefully later today. |
Fixes google#578. Change-Id: Icc6b26877bcbc5e34845238c998d50a873fb7d65
You may have already noticed, but there was some announcements affected Go on App Engine, in particular Go 1.8 on App Engine flexible. Docs: https://cloud.google.com/appengine/docs/go/ Just an FYI in case this changes the plans for App Engine support, but Standard environment is still 1.6. |
@bradleyfalzon Thanks for the heads up. |
* Support Google App Engine with recent context changes Fixes #578.
* Support Google App Engine with recent context changes Fixes google#578.
@gmlewis Can you help me understand how #582 is supposed to work? It looks to me like |
@ianrose14 - I'm not sure I understand why you claim that a panic will occur. Please take a look at api_classic.go lines 62-65 Also note that we are only talking about App Engine Classic here, as stated in the docs from #582. If you still think this is an issue, can you please provide a code snippet showing what is causing the panic and I will investigate? Thanks. |
@gmlewis In the code you linked above, isn't it true that |
Yes, Are you trying to pass some random http.Request to |
Hmm. Sorry, I must be being dense. As an example, here is a place where the code creates a brand new (non-appengine) http request, and then a few lines later passes it as I'm having trouble seeing how that code path won't lead to |
Edit: ~~~I think I see the confusion. Let me whip up a simple example for App Engine, make sure it works, and then copy it into this thread. |
Update: It looks like I need to apologize. I thought I had fully tested this, but I now see exactly what you are talking about, @ianrose14. This is broken. I'm going to reopen this issue and get it working with an example. |
Fixes google#578. Change-Id: Id7f3cc079d12b9d6d27baa2308c78a04ceaeb181
Fixes google#578. Change-Id: Id7f3cc079d12b9d6d27baa2308c78a04ceaeb181
👍 thanks! |
After importing the recent context changes in #529 into Google, I became aware that it is a bit trickier now to use this same code base either within an App Engine project or outside of one.
I had to pull a few tricks with
// +build appengine
and// +build !appengine
in a couple new files and patched a couple other files to make it all work.I'm not sure if anyone is really interested in these changes, but if you are, please let me know and I'll see if I can replicate the needed changes in a new PR and incorporate them into the library.
The text was updated successfully, but these errors were encountered: