twitter-archive / diffy

Find potential bugs in your services with Diffy
https://twitter.com/diffyproject
Apache License 2.0
3.83k stars 368 forks source link

Rest ShapeShifter throws exception in docker-compose #41

Closed muuki88 closed 8 years ago

muuki88 commented 8 years ago

I try to setup the example project with docker-compose. All docker images start up correctly, but the rest shapeshifter API throws an exception for the basic curl call

curl http://localhost:31900/endpoint

Results in

primary_1    | 2016-05-12 17:29:04 - NoMethodError - undefined method `response_headers' for #<Endpointprimary:0x0055fd3e0bf108>
primary_1    | Did you mean?  response_sleep:
primary_1    |  /usr/local/bundle/gems/rest_shifter-0.0.28/lib/rest_shifter/shifter.rb:56:in `block in <class:Shifter>'
primary_1    |  /usr/local/bundle/gems/rest_shifter-0.0.28/lib/rest_shifter/shifter.rb:41:in `block (2 levels) in build_services'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:1611:in `call'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:1611:in `block in compile!'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:975:in `block (3 levels) in route!'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:994:in `route_eval'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:975:in `block (2 levels) in route!'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:1015:in `block in process_route'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:1013:in `catch'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:1013:in `process_route'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:973:in `block in route!'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:972:in `each'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:972:in `route!'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:1085:in `block in dispatch!'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `block in invoke'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `catch'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `invoke'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:1082:in `dispatch!'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:907:in `block in call!'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `block in invoke'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `catch'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `invoke'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:907:in `call!'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:895:in `call'
primary_1    |  /usr/local/bundle/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
primary_1    |  /usr/local/bundle/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
primary_1    |  /usr/local/bundle/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
primary_1    |  /usr/local/bundle/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
primary_1    |  /usr/local/bundle/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
primary_1    |  /usr/local/bundle/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
primary_1    |  /usr/local/bundle/gems/rack-1.6.4/lib/rack/nulllogger.rb:9:in `call'
primary_1    |  /usr/local/bundle/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/show_exceptions.rb:25:in `call'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:182:in `call'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:2013:in `call'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:1487:in `block in call'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:1787:in `synchronize'
primary_1    |  /usr/local/bundle/gems/sinatra-1.4.7/lib/sinatra/base.rb:1487:in `call'
primary_1    |  /usr/local/bundle/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'
primary_1    |  /usr/local/lib/ruby/2.3.0/webrick/httpserver.rb:140:in `service'
primary_1    |  /usr/local/lib/ruby/2.3.0/webrick/httpserver.rb:96:in `run'
primary_1    |  /usr/local/lib/ruby/2.3.0/webrick/server.rb:296:in `block in start_thread'
primary_1    | 172.17.0.5 - - [12/May/2016:17:29:04 UTC] "GET /endpoint HTTP/1.1" 500 3530
primary_1    | - -> /endpoint

in the docker logs.

camiloribeiro commented 8 years ago

I am on it @muuki88

camiloribeiro commented 8 years ago

@muuki88 checkout the previous commit if you want to have it working before it is merged. Cheers and sorry for the trouble.

muuki88 commented 8 years ago

Thanks for the lightning fast response :) I'll use the previous commit.

Should I close the issue then?

camiloribeiro commented 8 years ago

You are welcome @muuki88. Just use latest master now 👍 Issue was closed by @puneetkhanduri