Am Sonntag, den 29.03.2020, 14:15 +0530 schrieb Pirate Praveen:
> 
> ruby-excon 0.72 causes ftbfs in ruby-vcr (all other reverse 
> dependencies still work)
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=954731 upstream did 
> not respond for over a month. If someone is interested to take care of 
> ruby-vcr, please fix this or at least tell me if I should delay 
> ruby-excon upload to unstable. If no one stops me, I'd like to upload 
> it by next week (April 6).

I tried to debug it a bit. The difference is that request_type() in
lib/vcr/request_handler.rb returns :stubbed_by_vcr with excon 0.60 and
:unhandled with excon 0.72. With the different excon versions response_for() in
lib/vcr/cassette/http_interaction_list.rb produces different results.

If I debug the request:
with excon 0.60
> request= #<struct VCR::Request method=:get, 
> uri="http://wrong-domain.com/wrong/path";, body="", 
> headers={"User-Agent"=>["excon/0.60.0"], "X-Http-Header1"=>["val1"]}>

with excon 0.72
> request= #<struct VCR::Request method=:get, 
> uri="http://wrong-domain.com/wrong/path";, body="", 
> headers={"User-Agent"=>["excon/0.72.0"], "Accept"=>["*/*"], 
> "X-Http-Header1"=>["val1"]}>
 
It seems that interaction_matches_request?() therefor cannot match the request
for excon 0.72 and fails, leading to @stubbed_response being nil and
request_type returning :unhandled instead of :stubbed_by_vcr.

The reason for all this might be the new Accept header in excon
https://github.com/excon/excon/compare/v0.60.0...v0.72.0diff-923a15667514d380032eaccc863a7c50L120

Oh, I just debugged the failing tests from
./spec/lib/vcr/library_hooks/webmock_spec.rb. I did not examine the other two
failures, but they might have the same cause.

Regards, Daniel


Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to