Skip to content

Socket fixes for GHA CI#6945

Merged
headius merged 4 commits intojruby:jruby-9.3from
headius:undef_ip6_when_unavailable
Nov 17, 2021
Merged

Socket fixes for GHA CI#6945
headius merged 4 commits intojruby:jruby-9.3from
headius:undef_ip6_when_unavailable

Conversation

@headius
Copy link
Member

@headius headius commented Nov 17, 2021

We have a few failures with IPv6 that have escaped notice due to not running in Travis CI. When they failed locally we probably ignored those failures assuming we did not have IPv6 set up properly.

This PR will include some fixes and some tags for IPv6-related failures we now see when running CI on GitHub Actions.

  • Set IPv6-related constants to nil when unavailable: CRuby has complicated logic for defining socket-related constants and query methods, but I believe this is a rough match for how they filter out IPv6-related constants when IPv6 is not available. This is checked by e.g. MRI tests and rubyspec to skip or alter IPv6-related tests.
  • Preserve multibyte strings in UNIX address: The path was being round-tripped through Java incorrectly, mangling multibyte characters.
  • Update Socket#listen tags for IPv6: none of these specs work because JRuby cannot support both client and server behaviors in Socket. JDK Socket APIs require that we choose server or client at creation time, and it cannot be changed later. This prevents us from supporting listen unless you instantiate ServerSocket. All the IPv4 specs were tagged but some IPv6 specs were untagged.
  • Update BasicSocket tags for IPv6: Equivalent tags already existed for the IPv4 versions but we those did not run on Travis.

CRuby has complicated logic for defining socket-related constants
and query methods, but I believe this is a rough match for how
they filter out IPv6-related constants when IPv6 is not available.
This is checked by e.g. MRI tests and rubyspec to skip or alter
IPv6-related tests.
@headius headius added this to the JRuby 9.3.2.0 milestone Nov 17, 2021
@headius headius changed the title Set IPv6-related constants to nil when unavailable Socket fixes for IPv6 Nov 17, 2021
@headius headius changed the title Socket fixes for IPv6 Socket fixes for GHA CI Nov 17, 2021
@headius headius merged commit 82cd393 into jruby:jruby-9.3 Nov 17, 2021
@headius headius deleted the undef_ip6_when_unavailable branch November 17, 2021 23:44
@ahorek
Copy link
Contributor

ahorek commented Nov 18, 2021

it's a good idea, thanks for the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants