-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add Windows to Actions CI, Ruby 2.5, misc fixes #20
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
/pkg/ | ||
/spec/reports/ | ||
/tmp/ | ||
Gemfile.lock |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have the error output without this change?
I'm wondering if those
rescue SystemCallError
lines scattered over the file are relevant to this. If this (bind to "localhost") works, can they be removed safely now?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They may be. Current mingw jobs in ruby/ruby are failing because of this (see https://github.com/ruby/ruby/actions). I don't have any CI logs in my fork. I fixed locally, then pushed...
I didn't look at any blame/history, but if it's never been tested on Windows...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From https://github.com/ruby/ruby/runs/2456377434?check_suite_focus=true:
Thanks for the pointer, but this puzzles me... I was expecting the failing test cases to be
test_get_SNI
and alike, which were only recently added and didn't haverescue SystemCallError
yet. (FWIW, the explanation forrescue
is in 2504847.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hate this. I pushed the test file change to ruby-loco and my ruby/ruby fork. test-all passed everywhere.
But, in test-spec, it's timing out in ruby-loco, and there are errors in:
spec/ruby/library/net/http/http/active_spec.rb
spec/ruby/library/net/http/http/get2_spec.rb
Maybe more...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re the failures, thanks for looking further. I can revert that commit and the other
rescue SystemCallError
code?I'm looking at the spec failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding localhost vs 127.0.0.1 and rescue, I /think/ the changes in this Pull Request are correct, but I can't confirm - I don't know in which environment it is actually needed. Without the changes,
TestNetHTTPS#test_min_version
must fail in such setup, but we have no such a setup in our CI (rubyci.org / GitHub Actions).ruby/ruby's Github Actions failure on mingw (
TestNetHTTPS#test_session_reuse
) looks like a separate issue (as I wrote in my last comment).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rhenium
Thanks for your additional investigation. I saw ruby-loco failed, then went to ruby/ruby, and saw Ubuntu & macOS passing (along with CI here), but failing mingw, I assumed it was probably a test issue. Didn't even look at lib code here. I did review the code in ruby/openssl test_ssl_session.rb.
Anyway, re the
sleep 2.5
addition, I thinkhttp.finish
is closing the socket, and the handshake occurs whenhttp.start
is called (it callsconnect_nonblock
)? So I'm not sure what the sleep is affecting, as I would thinkkeep_alive_timeout
would be different than a 'data' timeout, but I haven't looked...Also, wondering whether to define
HOST_IP = '127.0.0.1'
and use it for all refs in the test?EDIT:
Re
test_session_reuse
, the following works:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#21 should fix
TestNetHTTPS#test_session_reuse
, though running the test suite takes 10 minutes on Windows. This is due to the slow fallback from IPv6 (localhost) to IPv4 (127.0.0.1) and this (your) Pull Request should resolve it.Session resumption was not done correctly because the test case was establishing 3 TLS connections in total instead of the intended 2 due to the bug & a change in OpenSSL 1.1.1 which prohibited using a session ticket more than once in TLS 1.3 clients (openssl/openssl#6601).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I vaguely recalled something about that, but my finding it might have taken a while...
Should I change
test_session_reuse
as above?session_reused?
is important, but the real test is can the socket be used, and hence, the body assert?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rhenium
I removed a Rakefile change that wasn't needed. I revised the test as above, and also added the constant. Changed it to an IPv6 address locally, and all passed.
And, since I haven't contributed here previously, it needs approval for CI. Passed in my fork. Thanks.