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

Build inconsistency when pushing go to Heroku #89

Closed
brandur opened this issue Jul 20, 2015 · 7 comments
Closed

Build inconsistency when pushing go to Heroku #89

brandur opened this issue Jul 20, 2015 · 7 comments

Comments

@brandur
Copy link

brandur commented Jul 20, 2015

Hey @freeformz, I might need some expert help with one :) I have a project that I've managed to push to Heroku many times successfully in the past, but after a minor refactor, will no longer build.

It seems that the package that I refactored can't be located:

$ git push staging master
Counting objects: 544, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (308/308), done.
Writing objects: 100% (544/544), 249.16 KiB | 0 bytes/s, done.
Total 544 (delta 203), reused 517 (delta 185)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Go app detected
remote: -----> Checking Godeps/Godeps.json file.
remote: -----> Using go1.4.2
remote: -----> Running: godep go install -tags heroku ./...
remote: cmd/midgard-drip/main.go:6:2: cannot find package "github.com/heroku/midgard/log" in any of:
remote:         /app/tmp/cache/go1.4.2/go/src/github.com/heroku/midgard/log (from $GOROOT)
remote:         /tmp/build_cb970858d6be73d56650d7d715998909/.heroku/go/src/github.com/heroku/midgard/Godeps/_workspace/src/github.com/heroku/midgard/log (from $GOPATH)
remote:         /tmp/build_cb970858d6be73d56650d7d715998909/.heroku/go/src/github.com/heroku/midgard/log
remote: godep: go exit status 1
remote:
remote:  !     Push rejected, failed to compile Go app
remote:
remote: Verifying deploy....
remote:
remote: !       Push rejected to midgard-staging.
remote:
To https://git.heroku.com/midgard-staging.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/midgard-staging.git'

It builds fine on Travis though, and also locally:

$ godep go install -tags heroku ./...
$

It seems that the package is in the expected directory:

$ pwd
/Users/brandur/Documents/go/src/github.com/heroku/midgard
$ ls log
log.go          log_test.go

And that the files within the package correctly define their package:

$ head -n 1 log/*
==> log/log.go <==
package log

==> log/log_test.go <==
package log

Git is clean:

$ git status
On branch master
nothing to commit, working directory clean

The project is located at heroku/midgard if you want to take a look. Any ideas? Possibly a caching issue?

@freeformz
Copy link
Contributor

@brandur Looking at this now. Thanks for the detailed bug report.

@freeformz
Copy link
Contributor

@brandur I don't think this is actually related to the go buildpack. Looking into it more with others.

@freeformz
Copy link
Contributor

This turns out to be heroku pruning a dir rooted in your repo named log. Should be fixed "soonish".

@brandur
Copy link
Author

brandur commented Jul 20, 2015

@freeformz Hah, sweet. Thanks for taking a look into this one. Closing it out.

@brandur brandur closed this as completed Jul 20, 2015
@freeformz
Copy link
Contributor

@brandur the fix for this is now deployed,.

@brandur
Copy link
Author

brandur commented Jul 23, 2015

@freeformz You rock. Thanks!

@freeformz
Copy link
Contributor

@brandur Thanks, but all credit goes to @ojacobson for fixing and deploying the affected system.

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

2 participants