Same project deploys to Heroku, but fails for flynn.
Any ideas what may be wrong here?
$ flynn --version
v20160504.0
Heroku
$ git push heroku master
Counting objects: 1031, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (808/808), done.
Writing objects: 100% (847/847), 10.42 MiB | 1.66 MiB/s, done.
Total 847 (delta 438), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Fetching set buildpack https://github.com/kr/heroku-buildpack-go.git... done
remote: -----> Go app detected
remote: -----> Checking Godeps/Godeps.json file.
remote: -----> Installing go1.6... done
remote: -----> Running: godep go install -tags heroku ./...
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing...
remote: Done: 18.8M
remote: -----> Launching...
remote: Released v61
remote: https://test123.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy.... done.
To https://git.heroku.com/test123.git
af29cbb..991e336 master -> master
Flynn
$ git push flynn master
Counting objects: 3269, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3034/3034), done.
Writing objects: 100% (3269/3269), 16.34 MiB | 1.81 MiB/s, done.
Total 3269 (delta 1163), reused 0 (delta 0)
-----> Building test123...
-----> Go app detected
-----> Checking Godeps/Godeps.json file.
-----> Installing go1.6... done
-----> Running: go install -v -tags heroku .
remote: model/hub.go:3:2: cannot find package "github.com/dancannon/gorethink" in any of:
remote: /tmp/cache/go1.6/go/src/github.com/dancannon/gorethink (from $GOROOT)
remote: /tmp/build/.heroku/go/src/github.com/dancannon/gorethink (from $GOPATH)
(...)
remote: Build failed: exec: job exited with status 1
To https://git.*.flynnhub.com/test.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.*.flynnhub.com/test.git'
@thomasmodeneis are you using an explicit buildpack? Flynn uses github.com/heroku/heroku-buildpack-go but from your output it seems you are using github.com/kr/heroku-buildpack-go?
I'm not using any explicit buildpack, is just the same code with a godeps dir and a goproc. Weird is that it works on heroku but fails on flynn for some odd reason.
So I had another cluster that was up and running with an old version of this same software, but flynn there is about 2 months old. So I've deployed my code to this one, and well it worked just fine, what makes me believe this is a new defect on flynn, what do you think?
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags --set-upstream flynn refs/heads/master:refs/heads/master
Pushing to https://git.*.flynnhub.com/test123.git
POST git-receive-pack (958898 bytes)
remote: [1G[K-----> Building test123...
remote: [1G[K[1G-----> Go app detected
remote: [1G[K[1G-----> Checking Godeps/Godeps.json file.
remote: [1G[K[1G-----> Using go1.6
remote: [1G[K[1G-----> Running: godep go install -tags heroku ./...
remote: [1G[K[1G-----> Discovering process types
remote: [1G[K[1G Procfile declares types -> web
remote: [1G[K[1G-----> Compiled slug size is 19M
remote: [1G[K-----> Creating release...
I think that github.com/dancannon/gorethink is probably cached. It looks like you have godep configured, have you vendored the package properly?
this is a complete new cluster i've created, is just no way it was cached as it could not be cached (its new).
Its all properly configured, if you read the report it says that it works for heroku and for a old version of flynn, but it fails for v20160504.0. :|
I'm not sure what to do here mate, is pretty strange.
Yeah, I mean cached in heroku/the old cluster. Have you checked the vendoring configuration?
I will double check and update all dependencies / retry the cluster creation and install just to be on the safe side.
hi @titanous I've upgraded dependencies and tested to install in other envs and they all work, including heroku, so I'm confused how to inspect further. How can I get access to the server that executed this build? I have a cluster of 3, how can I identify and connect to it?
Thanks
Have you tried deploying to an entirely new app on Heroku? Did that work? There is no easy way to get at the build environment as it is in an ephemeral container that is destroyed at exit.
So I did a test, I've installed an old app with go 1.4.2 and it worked, so then I upgraded this same app to 1.6 and pushed to flynn and failed. Same behavior.
So it seems to be something related to Go 1.6. I've deployed the same app on heroku with no errors:
git push heroku master
Counting objects: 754, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (679/679), done.
Writing objects: 100% (754/754), 7.48 MiB | 847.00 KiB/s, done.
Total 754 (delta 102), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Go app detected
remote: -----> Checking Godeps/Godeps.json file.
remote: -----> Installing go1.6.2... done
remote: !! Installing package '.' (default)
remote: -----> Running: godep go install -v -tags heroku .
remote: github.com/garyburd/redigo/internal
remote: github.com/mikeflynn/golang-instagram/instagram
remote: github.com/garyburd/redigo/redis
remote: github.com/google/google-api-go-client/googleapi/transport
remote: golang.org/x/net/context
remote: github.com/eaigner/shield
remote: golang.org/x/net/context/ctxhttp
remote: google.golang.org/api/googleapi/internal/uritemplates
remote: test/model
remote: google.golang.org/api/googleapi
remote: google.golang.org/api/gensupport
remote: test/providers/facebook
remote: test/providers/instagram
remote: test/providers/vinevideo
remote: google.golang.org/api/youtube/v3
remote: github.com/facebookgo/grace/gracenet
remote: github.com/facebookgo/clock
remote: github.com/facebookgo/stats
remote: github.com/facebookgo/httpdown
remote: github.com/facebookgo/grace/gracehttp
remote: github.com/gorilla/context
remote: github.com/gorilla/mux
remote: github.com/gorilla/pat
remote: gopkg.in/bsm/ratelimit.v1
remote: gopkg.in/redis.v3/internal/consistenthash
remote: gopkg.in/redis.v3
remote: test/providers/youtube
remote: test/server
remote: test
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote:
remote: -----> Compressing...
remote: Done: 6.6M
remote: -----> Launching...
remote: Released v3
remote: https://*.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/*.git
* [new branch] master -> master
1.4.2:
$ git push flynn master
Counting objects: 725, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (656/656), done.
Writing objects: 100% (725/725), 7.47 MiB | 1.30 MiB/s, done.
Total 725 (delta 85), reused 0 (delta 0)
-----> Building test...
-----> Go app detected
-----> Checking Godeps/Godeps.json file.
remote: !
remote: ! Deprecated version of go (go1.4.2)
remote: ! See https://devcenter.heroku.com/articles/go-support#go-versions for supported version information.
remote: !
-----> Installing go1.4.2... done
-----> Running: godep go install -tags heroku .
-----> Discovering process types
-----> Compiled slug size is 6.4M
-----> Creating release...
=====> Application deployed
To https://git.*.flynnhub.com/test.git
* [new branch] master -> master
1.6:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags flynn refs/heads/master:refs/heads/master
Pushing to https://git.*.flynnhub.com/test.git
POST git-receive-pack (2560 bytes)
remote: [1G[K-----> Building test...
remote: [1G[K[1G-----> Go app detected
remote: [1G[K[1G-----> Checking Godeps/Godeps.json file.
remote: [1G[K[1G-----> Installing go1.6... done
remote: [1G[K[1G-----> Running: go install -v -tags heroku .
remote: model/test.go:7:2: cannot find package "github.com/eaigner/shield" in any of:
remote: /tmp/cache/go1.6/go/src/github.com/eaigner/shield (from $GOROOT)
remote: /tmp/build/.heroku/go/src/github.com/eaigner/shield (from $GOPATH)
remote: server/server.go:9:2: cannot find package "github.com/facebookgo/grace/gracehttp" in any of:
remote: /tmp/cache/go1.6/go/src/github.com/facebookgo/grace/gracehttp (from $GOROOT)
remote: /tmp/build/.heroku/go/src/github.com/facebookgo/grace/gracehttp (from $GOPATH)
remote: providers/youtube/youtube.go:8:2: cannot find package "github.com/google/google-api-go-client/googleapi/transport" in any of:
remote: /tmp/cache/go1.6/go/src/github.com/google/google-api-go-client/googleapi/transport (from $GOROOT)
remote: /tmp/build/.heroku/go/src/github.com/google/google-api-go-client/googleapi/transport (from $GOPATH)
remote: server/server.go:8:2: cannot find package "github.com/gorilla/pat" in any of:
remote: /tmp/cache/go1.6/go/src/github.com/gorilla/pat (from $GOROOT)
remote: /tmp/build/.heroku/go/src/github.com/gorilla/pat (from $GOPATH)
remote: model/instagram.go:8:2: cannot find package "github.com/mikeflynn/golang-instagram/instagram" in any of:
remote: /tmp/cache/go1.6/go/src/github.com/mikeflynn/golang-instagram/instagram (from $GOROOT)
remote: /tmp/build/.heroku/go/src/github.com/mikeflynn/golang-instagram/instagram (from $GOPATH)
remote: providers/youtube/youtube.go:9:2: cannot find package "google.golang.org/api/youtube/v3" in any of:
remote: /tmp/cache/go1.6/go/src/google.golang.org/api/youtube/v3 (from $GOROOT)
remote: /tmp/build/.heroku/go/src/google.golang.org/api/youtube/v3 (from $GOPATH)
remote: server/handlers.go:8:2: cannot find package "gopkg.in/redis.v3" in any of:
remote: /tmp/cache/go1.6/go/src/gopkg.in/redis.v3 (from $GOROOT)
remote: /tmp/build/.heroku/go/src/gopkg.in/redis.v3 (from $GOPATH)
remote: Build failed: exec: job exited with status 1
To https://git.*.flynnhub.com/test.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.*.flynnhub.com/test.git'
Completed with errors, see above
I can see that the command that flynn is running is go install -v -tags heroku . and it fails with errors, but heorku is using godep go install -v -tags heroku . and works fine.
I tried with Go 1.6.2 and it was the same behavior, however I can see that its reporting go 1.6.2 as Deprecated, that must be wrong as heroku buildpack supports it go1.6 (installs go1.6.2)
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags --set-upstream flynn refs/heads/master:refs/heads/master
Pushing to https://git.*.flynnhub.com/test.git
POST git-receive-pack (chunked)
remote: [1G[K-----> Building test...
remote: [1G[K[1G-----> Go app detected
remote: [1G[K[1G-----> Checking Godeps/Godeps.json file.
remote: [1;33m ! [0m
remote: [1;33m ! Deprecated version of go (go1.6.2)[0m
remote: [1;33m ! See https://devcenter.heroku.com/articles/go-support#go-versions for supported version information.[0m
remote: [1;33m ! [0m
remote: [1G[K[1G-----> Installing go1.6.2... done
remote: [1G[K[1G-----> Running: go install -v -tags heroku .
(same errors as others)
Then I said ok lets me try 1.5 and see how that goes ? and 1.5 works fine.
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags --set-upstream flynn refs/heads/master:refs/heads/master
Pushing to https://git.*.flynnhub.com/test.git
POST git-receive-pack (chunked)
remote: [1G[K-----> Building test...
remote: [1G[K[1G-----> Go app detected
remote: [1G[K[1G-----> Checking Godeps/Godeps.json file.
remote: [1G[K[1G-----> Installing go1.5.3... done
remote: [1G[K[1G-----> Running: godep go install -tags heroku .
remote: [1G[K[1G-----> Discovering process types
remote: [1G[K[1G Procfile declares types -> web
remote: [1G[K[1G-----> Compiled slug size is 19M
remote: [1G[K-----> Creating release...
remote: [1G[K=====> Application deployed
remote: [1G[K=====> Waiting for web job to start...
remote: [1G[K=====> Default web formation scaled to 1
To https://git.*.flynnhub.com/test.git
* [new branch] master -> master
updating local tracking ref 'refs/remotes/flynn/master'
Branch master set up to track remote branch master from flynn.
Completed successfully
Try running this and deploying again:
flynn env set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-go
That works, it will be very nice if you could include this step into the flynn docs as this seems to be required in order to have things running :)
Thanks @titanous
I've updated the buildpack in #2806 which should fix this.
Thanks @titanous
Hi @titanous
I'm running into the same problem now after updating it to 1.7. ('Ive executed cmd flynn env set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-go with no effect).
-----> Building app...
-----> Fetching custom buildpack
-----> Go app detected
-----> Checking Godeps/Godeps.json file.
-----> Installing go1.7... done
!! Installing package '.' (default)
!!
!!
-----> Running: go install -v -tags heroku .
model/hub.go:3:2: cannot find package "github.com/dancannon/gorethink" in any of:
/tmp/cache/go1.7/go/src/github.com/dancannon/gorethink (from $GOROOT)
remote: ERROR: Build failed: exec: job exited with status 1
After reducing the Godeps.json to go1.6.2 the deployment works fine.
I see the same difference I had last time, after downgrade to 1.6.2 the log says: -----> Running: godep go install -v -tags heroku .
$ flynn version
v20160819.0
Any ideas ?
Thanks
Have you run godep save? Make sure you have the latest version of godep with go get -u github.com/tools/godep. This might have to do with the change in how vendoring works over the past few Go releases.
@titanous you where right, I had to update vendoring to use the vendor folder and kind of "migrate" from godeps to new vendor.
Thanks for the tip :)
Most helpful comment
Have you run
godep save? Make sure you have the latest version of godep withgo get -u github.com/tools/godep. This might have to do with the change in how vendoring works over the past few Go releases.