pronto
pronto copied to clipboard
Issue with CircleCI integration
Pronto fails to run in CircleCI after build completes. Running on Rails 4.2.9 and Ruby 2.4.0
circle.yml
test:
override:
- bundle exec rake test:all
post:
- if [[ ! -z $CI_PULL_REQUEST ]] ; then bundle exec pronto run -f github_pr -c origin/master ; fi
stacktrace after running pronto command
bundler: failed to load command: pronto (/home/ubuntu/app/vendor/bundle/ruby/2.4.0/bin/pronto)
Rugged::OdbError: object not found - no match for id (f61b491d0dbd5b3c13ad529587a06939fa1f54bc)
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/git/repository.rb:52:in `new'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/git/repository.rb:52:in `blame'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/git/patch.rb:17:in `blame'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/git/line.rb:45:in `blame'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/git/line.rb:20:in `commit_sha'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/message.rb:18:in `initialize'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:49:in `new'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:49:in `new_message'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:41:in `block (2 levels) in inspect'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:41:in `map'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:41:in `block in inspect'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:38:in `map'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:38:in `inspect'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:18:in `block in run'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:18:in `map'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-rubocop-0.9.0/lib/pronto/rubocop.rb:18:in `run'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/runners.rb:20:in `block in run'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/runners.rb:13:in `each'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/runners.rb:13:in `run'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto.rb:64:in `run'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/cli.rb:61:in `block in run'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/cli.rb:60:in `chdir'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/lib/pronto/cli.rb:60:in `run'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/gems/pronto-0.9.5/bin/pronto:6:in `<top (required)>'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/bin/pronto:23:in `load'
/home/ubuntu/app/vendor/bundle/ruby/2.4.0/bin/pronto:23:in `<top (required)>'
@ananth99 could you tell us anymore about your setup? Unfortunately I don't use CircleCI so I have no experience with it ☹️
We have a manifest file called circle.yml
which runs the pronto command if it's a Pull Request after the test suite finishes.
The manifest file contains all the machine configs(ruby version, message queue, redis config) etc.. This link tells you how CircleCI preps the test environment.
Weird thing is I did not run into this issue in my dev setup. :(
@ananth99 I had a similar error and the following https://github.com/prontolabs/pronto/issues/103 resolved it for me. Give it a try.
@javierjulio Thanks! I'll try it out and close this issue if it works.
@ananth99 hey, did it work? 😀
Hi, I'm using this to solve this issue:
test:
pre:
- "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
- bundle exec pronto run -f github_pr github_status -c origin/master
This is CircleCI related only from my experience. I also used a similar approach to make it work since default pronto run -c origin/master
doesn't work there. This issue could be closed IMHO.
Yeah I agree with @giedriusr ; unless @ananth99 has any further issues this appears like a resolved issue to me 😄
A few days ago I had this problem. I solved using the new var PRONTO_PULL_REQUEST_ID
to pass the PR id.
export PRONTO_PULL_REQUEST_ID=${TRAVIS_PULL_REQUEST} && bundle exec pronto run -f github_pr -c origin/${TRAVIS_BRANCH}
Hi, I'm using this to solve this issue:
test: pre: - "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow" - bundle exec pronto run -f github_pr github_status -c origin/master
I tried this, but it doesn't work. I'm still getting a bundler: failed to load command: pronto
.
This is what it looks like in our CircleCI yml:
- run:
name: Rubocop Linter
command: |
[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow
PRONTO_PULL_REQUEST_ID=${CIRCLE_PULL_REQUEST} bundle exec pronto run -f github github_status github_pr -c origin/master