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

Error creating a python project #8

Open
srobertson opened this issue Apr 1, 2013 · 9 comments
Open

Error creating a python project #8

srobertson opened this issue Apr 1, 2013 · 9 comments

Comments

@srobertson
Copy link

Slug compilation fails when creating a python project.

How to reproduce:

$ mkdir myproject
$ cd myproject
$ git init
$ ~/openruko/client/openruko create
$ echo boto > requirements.txt
$ git add -A
$ git commit -m "initial commit"
$ git push heroku master

Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (7/7), 525 bytes, done.
Total 7 (delta 1), reused 0 (delta 0)

-----> Openruko receiving git push
-----> Python app detected
remote: rm: cannot remove /app/hooks/.git/branches': Permission denied remote: rm: cannot remove/app/hooks/.git/config': Permission denied
remote: rm: cannot remove `/app/hooks/.git/description': Permission denied
...
-----> Discovering process types
Default process types for Python ->
-----> Compiled slug size is 4.0K /tmp/slug.tgz
Using slug_id: 1364824011.45576
Uploading: http://openruko.mymachine.me:4567//slugs/21_1364824011.45576.tgz?Expires=1364860011&AWSAccessKeyId=123&Signature=vB%2BhCYMelAhLYC6hbsH9f678cak%3D
Uploaded: http://openruko.mymachine.me:4567//slugs/21_1364824011.45576.tgz?Expires=1364860011&AWSAccessKeyId=123&Signature=vB%2BhCYMelAhLYC6hbsH9f678cak%3D
-----> Launching... done v 3
http://7d45550ba17723745860986e5eff4e65.mymachine.me/ deployed to Openruko

fatal: protocol error: bad line length character: erro
error: error in sideband demultiplexer
To git@mymachine.me:7d45550ba17723745860986e5eff4e65.git
! [remote rejected] master -> master (bad pack)
error: failed to push some refs to 'git@mymachine.me:7d45550ba17723745860986e5eff4e65.git'

@tombh
Copy link
Member

tombh commented Apr 2, 2013

I wouldn't be surprised if this turns out to be a problem in Codonhooks or Dynohost.

@progrium
Copy link

progrium commented Apr 2, 2013

Gitmouth should probably have a well defined interface and set of
expectations to avoid misfiled issues. I recommend following the interface
created by gitreceive [1] ;)

[1] https://github.com/progrium/gitreceive

On Tue, Apr 2, 2013 at 1:55 PM, Thomas Buckley-Houston <
notifications@github.com> wrote:

I wouldn't be surprised if this turns out to be a problem in Codonhooks or
Dynohost.


Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-15801948
.

Jeff Lindsay
http://progrium.com

@natea
Copy link

natea commented Apr 11, 2013

I'm also interested in trying out OpenRoku for deploying Python/Django apps. Any luck resolving this issue?

@Filirom1
Copy link
Member

Once I have some free time, I will take a look at it.

@srobertson
Copy link
Author

Hacking around, I was actually able to get the python build pack to
successfully compile the slug. However I broke other things. But at least
my debug info might help.

First off this issue probably needs to be moved to apiserver/codon hooks as
I think these will be the modules that need to be updated. gitmouth has no
issues as far as I can tell.

The problem is because the heroku python buildpack actually moves all the
contents of /app to a temporary directory when compiling the slug. See
https://github.com/heroku/heroku-buildpack-python/blob/master/bin/compile#L48

Codonhooks treats /app as the root of the git repository when it's
receiving the push, due to the above mentioned move it corrupts the git
repository and hence you receive these errors when you git push

fatal: protocol error: bad line length character: erro
error: error in sideband demultiplexer
To git@mymachine.me:7d45550ba17723745860986e5eff4e65.git
! [remote rejected] master -> master (bad pack)

As an experiment I modified
apiserver:postgres/openruko_api/functions/handle_git_command.pgsql
to mount the empty repo under /tmp/repo and then tweaked codon hooks to
mount it's hooks under /tmp/repo/hooks rather than /app/hooks

Making those changes, fixed slug compilation. However actually dyno startup
fails now for reasons I have not tracked down yet.

That's as far as I got before I ran out of time. Hopefully this helps
someone else who's more familiar with openruko internals.

On Thu, Apr 11, 2013 at 9:00 AM, Nate Aune notifications@github.com wrote:

I'm also interested in trying out OpenRoku for deploying Python/Django
apps. Any luck resolving this issue?


Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-16243817
.

-- Scott

"There was a time when the internet answered all my questions. Now it just
repeats them. - SDR"

@Filirom1
Copy link
Member

Thanks for sharing. It will helps

@natea
Copy link

natea commented Apr 13, 2013

@srobertson did you submit that patch as a pull request?

@srobertson
Copy link
Author

@natea I hadn't until now.

Here are the changes I made

openruko/apiserver#28
openruko/dynohost#17

Keep in mind, I was only trying to debug the problem, I wouldn't accept those patches "as is"

@Filirom1
Copy link
Member

Ok so it seems that /tmp/repo is needed for slug compilation but /app is needed for running the dyno.

Thanks for the pull requests. It´s quite easy now to fix it

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

5 participants