[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: planning to upload ruby-excon 0.72 to unstable causing ruby-vcr to ftbfs





On Mon, Mar 30, 2020 at 3:03 pm, Daniel Leidert <dleidert@debian.org> wrote:
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


Thanks Daniel and Antonio for the patch. I'll upload both to unstable now.




Reply to: