-
Notifications
You must be signed in to change notification settings - Fork 572
Make CI green again #965
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
Make CI green again #965
Conversation
772c7c1 to
1055b45
Compare
``` curl -i http://httpstat.us/200 HTTP/1.1 301 Moved Permanently Content-Type: text/html; charset=UTF-8 Location: https://httpstat.us/200 Date: Thu, 13 Jan 2022 02:06:09 GMT Content-Length: 0 ```
1055b45 to
6454c09
Compare
https://httpstat.us instead of plain http in specshttps://httpbin.org instead ofhttps://httpstat.us in specs
|
Ok, apparently httpstat.us made some changes a month ago and now there is no I guess we can run https://github.com/aaronpowell/httpstatus/pkgs/container/httpstatus in GHA, but it would complicate local development. Any hints what's the desired solution? I can try to find another service that could be used or file a bug for https://github.com/aaronpowell/httpstatus, but it's fragile anyway. |
|
Filed an issue aaronpowell/httpstatus#105 |
After httprb/http#653 http.rb doesn't force encode stream result to be in the correct encoding
https://httpbin.org instead ofhttps://httpstat.us in specs|
httpstat.us issue with missing |
|
@ojab I wonder why the builds fail on Ruby 3.0. |
|
|
RSpec tries to lock a mutex for `let` evaluation and Async reactor tries to block itself and hangs on select
|
Okay, looks like Async is incompatible with RSpec in ruby >= 3.0. require 'async'
require 'async/http'
RSpec.describe 'qwe' do
let(:endpoint) { Async::HTTP::Endpoint.parse('http://www.example.com') }
let(:protocol) { Async::HTTP::Protocol::HTTP10 }
let(:requests_count) { 1 }
subject do
puts "In subject"
responses = {}
Async do |task|
puts "In Async"
Async::HTTP::Client.open(endpoint, protocol) do |client|
puts "In Client"
requests_count.times do |index|
response = client.get "/foo#{index}"
responses[index] = response_to_hash(response)
end
end
end
responses
end
specify do
puts "Running!"
expect(subject).not_to be_nil
end
endthis spec in empty project with Gemfile # frozen_string_literal: true
source "https://rubygems.org"
# gem "rails"
gem 'async-http'
gem 'rspec'hangs the same way. async-2.0 switched to fiber scheduler and dropped ruby<3.0 support, so I don't see value in reporting it. Anyway, not a webmock bug, workarounded by replacing |
|
And some RSpec changes broken two specs, fixed in the last commit. |
|
Thank you @ojab |
httpstat.us switched to HTTPS and returning 301 for plain HTTP and now
there is no
X-Powered-Byheader, use HTTPS +Serverheader instead.http.rb>= 5.0.2 expects stream result to be in the proper encoding after httprb/http#653, force encoding inStreamer.