Skip to content

Conversation

@juanazam
Copy link

This PR adds support for Elixir 1.15.2 and OTP 26.0.2.
It was originally opened on the original repo, but the owner does not seem to be reachable.

The main issue here is that Port.comand is erroring out because of a behavior change on OTP that's not going to be updated.

Related issue on Statix: lexmag#69
Related issue on top: erlang/otp#7130

In summary, Statix was using Port.command to avoid a performance issue with using :gen_udp.send.
This approach no longer works because of OTP updates happening at the networking layer.

In order to avoid this, this PR uses gen_udp.send (which has been optimized), but with this change, a lot of the existing code is no longer useful.

Port.command expects a packet containing the IP and port of the destination to which the packet will be sent.
This is no longer required with the new approach, but we need to keep the address and port on the Conn module to be able to do the :gen_udp.send calls to send Statds servers.

This patch has been tested in production, see: knocklabs#1

@juanazam juanazam changed the title Jazambuja update to elixir 1.15 Support for Elixir 1.15 and OTP 26 Nov 10, 2023
@carrascoacd carrascoacd self-requested a review November 13, 2023 07:43
Copy link
Collaborator

@carrascoacd carrascoacd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants