Skip to content
/ statix Public
forked from lexmag/statix
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

Support for Elixir 1.15 and OTP 26 #1

Merged
merged 2 commits into from
Nov 13, 2023

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.

@carrascoacd carrascoacd merged commit ed9b6b6 into cabify:master Nov 13, 2023
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