Lock net-protocol version to match the monkey patch
What does this MR do and why?
Ruby extracted net-protocol
(and some other net-*
related functionality) into separate gems. GitLab has BufferedIO
patch that may rely on a different version of the gem/functionality. Let's lock the version and use 0.1.x
version, the one that contains the current BufferedIO
patch implementation:
-
net-protocol
implementation: https://github.com/ruby/net-protocol/blob/v0.1.3/lib/net/protocol.rb#L190 - Patch implementation: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/buffered_io.rb#L25
Some more context: Rails 7 now explicitly adds net-imap
, net-pop
, net-smtp
along with net-protocol
and since the version is not locked, the newest one (0.2.1
) is included with different BufferedIO implementation.
It seems that Ruby has a different version of net/protocol
implementation
- Ruby 3.2.1 => net-protocol 0.2.1: https://github.com/ruby/ruby/blob/v3_2_1/lib/net/protocol.rb
- Ruby 3.1.3 => net-protocol 0.1.2: https://github.com/ruby/ruby/blob/v3_1_3/lib/net/protocol.rb
Locking the gem version to 0.1.x will allow us to postpone patching the new version of the method until we upgrade to Ruby 3.1.3
Edited by Igor Drozdov