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

Goji and App Engine. Different Go versions. #67

Closed
johngb opened this issue Sep 29, 2014 · 20 comments
Closed

Goji and App Engine. Different Go versions. #67

johngb opened this issue Sep 29, 2014 · 20 comments

Comments

@johngb
Copy link

johngb commented Sep 29, 2014

It seems that Goji uses Go 1.3 while App Engine only supports Go 1.2 at the moment.

Can anyone confirm whether they have found a way of getting the current version of Goji working with App Engine?

@zenazn
Copy link
Owner

zenazn commented Sep 29, 2014

It's my belief that Goji works with both Go 1.2 and App Engine, although it's been a while since I verified these facts. Are you encountering any difficulties in particular?

I'd of course be happy to fix any issues you run in to!

On Sep 29, 2014, at 8:00 AM, John Beckett notifications@github.com wrote:

It seems that Goji uses Go 1.3 while App Engine only supports Go 1.2 at the moment.

Can anyone confirm whether they have found a way of getting the current version of Goji working with App Engine?


Reply to this email directly or view it on GitHub.

@johngb
Copy link
Author

johngb commented Sep 29, 2014

There is a problem with cPool, and from what I can see in the code, it uses Go 1.3

As far as the error goes, when I do a goapp deploy I get the following:

01:10 AM Application: emojidomchat; version: 1
01:10 AM Host: appengine.google.com
01:10 AM
Starting update of app: emojidomchat, version: 1
01:10 AM Getting current resource limits.
01:10 AM Scanning files on local disk.
01:10 AM Cloning 43 application files.
01:10 AM Compilation starting.
01:10 AM Compilation: 43 files left.
01:10 AM Error 422: --- begin server output ---
Compile failed:
2014/09/29 16:10:28 go-app-builder: build timing: 5×6g (298ms total), 8×gopack (201ms total), 0×6l (0 total)
2014/09/29 16:10:28 go-app-builder: failed running 6g: exit status 1

github.com/zenazn/goji/web/middleware.go:18: undefined: cPool
--- end server output ---
01:10 AM Rolling back the update.
Error 422: --- begin server output ---

--- end server output ---
error while running appcfg.py: exit status 1

@zenazn
Copy link
Owner

zenazn commented Sep 30, 2014

There's a fallback implementation for Go 1.2 though: https://github.com/zenazn/goji/blob/master/web/chanpool.go

Not sure what's going on here, especially since tests appear to be passing under Go 1.2. What rev of Goji are you running against?

@johngb
Copy link
Author

johngb commented Sep 30, 2014

There's a fallback implementation for Go 1.2 though: https://github.com/zenazn/goji/blob/master/web/chanpool.go

I wasn't aware of that. How would I get it to use this fallback for 1.2 given that it still seems to be set to use // +build !go1.3?

Not sure what's going on here, especially since tests appear to be passing under Go 1.2. What rev of Goji are you running against?

I'm using the current version of Goji. Interestingly enough my tests also run, as well and I can serve on the local development environment for App Engine. The problem only shows itself when I try to deploy to the real App Engine environment.

@johngb
Copy link
Author

johngb commented Sep 30, 2014

As an additional comment, Goji works with App Engine if I use Goji rev 17b9035.

@zenazn
Copy link
Owner

zenazn commented Oct 1, 2014

How very bizarre! Something very odd is going on with App Engine, and I don't understand it. I just posted this if you want to follow along at home: https://groups.google.com/forum/#!topic/golang-nuts/hTt4Djnclmk

@johngb
Copy link
Author

johngb commented Oct 1, 2014

Thanks for the update. I'll follow along in the thread and see where we get with this.

@zenazn
Copy link
Owner

zenazn commented Oct 3, 2014

zenazn added a commit that referenced this issue Nov 2, 2014
This is to work around a bug where App Engine, which as of this writing
runs Go 1.2, builds code which uses the "go1.3" build tag. See #67.

This bug is being tracked at:
https://code.google.com/p/googleappengine/issues/detail?id=11346
@zenazn
Copy link
Owner

zenazn commented Nov 2, 2014

Alright, since this doesn't seem to be particularly high priority for the App Engine folks, I've committed a workaround to Goji (9556e17). @johngb — any chance you could test that change out for me?

@johngb
Copy link
Author

johngb commented Nov 3, 2014

@zenazn one of my co-workers beat me to it and tested it. Apparently it is working now, thanks.

@zenazn
Copy link
Owner

zenazn commented Nov 3, 2014

Great! I'll keep following along with the App Engine folks but glad this is working for the time being :)

@DallanQ
Copy link

DallanQ commented Dec 23, 2014

FWIW, it looks like app engine is skipping go 1.3 and will be supporting go 1.4 soon: https://groups.google.com/forum/#!msg/google-appengine-go/ndtQokV3oFo/25wV1W9JtywJ

@zenazn zenazn closed this as completed in de6bd51 Jan 5, 2015
@zenazn
Copy link
Owner

zenazn commented Jan 5, 2015

Looks like App Engine has fixed this upstream. Let me know if you have any other difficulties using Goji on App Engine!

@andrewverte
Copy link

I'm getting this error again. I'll try checking out an older commit.

@andrewverte
Copy link

It looks like Go on GAE is now 1.4.2:
https://groups.google.com/d/msg/google-appengine-go/ndtQokV3oFo/M-BaTCZjgkkJ
so I believe the build tags need to be changed?

@johngb
Copy link
Author

johngb commented Feb 24, 2015

I had the same error today again, but once I upgraded to the new App Engine SDK, it went away. So I'd suggest that.

@zenazn
Copy link
Owner

zenazn commented Feb 25, 2015

@andrewverte—could you paste me the output of the failing build? Does upgrading the App Engine SDK do the trick?

@andrewverte
Copy link

It's the same error as @johngb 's above: #67 (comment)

I reverted to 17b9035.

The App Engine SDK isn't upgrading properly (there's a bug in the gcloud (Google Cloud package) update code, but I assume that will fix the problem. I'll let you know if it doesn't work.

@johngb
Copy link
Author

johngb commented Feb 25, 2015

@andrewverte I simply replaced the old go_appengine directory with the content of the new one that I downloaded, and it all worked fine afterwards.

@andrewverte
Copy link

@johngb Thanks for tip.

I upgrade the GAE SDK, and it is now working.

Thank you @zenazn for responding so quickly.

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

No branches or pull requests

4 participants