-
Notifications
You must be signed in to change notification settings - Fork 84
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 elixir 1.15 and OTP 26 #72
base: master
Are you sure you want to change the base?
Conversation
Any updates here? How do we get this merged? Anxiously awaiting this since it's the last thing stopping use from going to OTP 26. |
@Billzabob I'm not sure to be 100% honest. @lexmag Sorry to ping you directly (I know you haven't been active on this project for a bit), but is there any chance we can get this reviewed, merged, and released? |
@lexmag |
If @lexmag has abandoned this project, does anybody want to take it over, either by getting the repo transferred or creating a canonical fork? |
Any updates on this @lexmag? This is a blocker for us moving to OTP 26 as well |
This is blocking us. How can we get this published or migrated to somebody who will publish? Thanks |
Since this is blocking many of us, the company I'm working on, Cabify, could try to take the temporal ownership of this repo under this fork: https://github.com/cabify/statix. We've been running this solution in production for some weeks with success. If you are ok with this, please, react to this message and open the same PR in the fork and we will be glad to merge it and publish the library under a temporal name We want to make explicit that, in case the owner is back, we will just get rid of the fork and sync it with this repo. So if you agree, let's continue and adopt OTP 26! If you are not ok with this proposal, just let us know also 😁 |
@carrascoacd Thanks for testing the fix and taking ownership of the package! |
Before continuing, please @whatyouhide since you appear as the maintainer of the library. Could you share your thoughts? |
Update here, I have reached Andrea and he has not been involved with the project for a while, he suggested reaching for @lexmag, now I'm trying to get a hold of him. |
Hi folks, I'm sorry to have kept you waiting on this PR. @juanazam thank you again for reaching out. First of all, I must say that Statix does not indeed get a high priority among all activities I have to address, but I still do want it to be fixed and improved, thus, during next two weeks I'm going to merge this PR, look into other issues, and level the project up in general. That's said, if anyone is willing to push the work beyond what I'm able to dedicate this time, nothing stops you from doing that considering the license is extremely permissive. As for this PR, I first need to read up on what specifically has changed in OPT 26. |
Hi @lexmag, Thanks for taking a look at this. If you know what's the oldest version you would want to support and have ideas on how to support it, I can help with updating this PR. |
Hey there, |
Hey @lexmag do you need any help with this? |
Does anyone know specifically what @lexmag is referring to here? I don't immediately see anything in this change that sets up alarm bells performance wise... |
@mtrudel I can give some context there. It seems that using From the related OTP thread erlang/otp#7130 (comment)
|
Thanks for the context @juanazam! Unless I'm reading this wrong, the way statix currently uses
With this in hand, let's look at how statix does this today: Lines 50 to 62 in cc3f93b
Again, unless I'm misunderstanding this, statix's implementation here amounts to an 'adhoc implementation of half of gen_tcp.send' (with apologies to Robert Virdig). There's no point in trying to worry about preserving what's here for older OTPs because it's been slow this whole time. What am I missing here? |
@mtrudel Everything you mention here makes sense! I tried digging up discussions on old issues but couldn't find anything meaningful. The I remember seeing a discussion about this somewhere, but I can't find it (this was months ago so my memory is failing me), sorry! |
If the performance problems only apply to older versions, we could add a conditional compilation as suggested, ie OTP < 26. It should work. It should unblock this while we find how to improve it. |
Decided to implement backwards compat as @carrascoacd mentioned to make this even less of a concern. It's not the cleanest implementation but IMO this path will be eventually removed, so no need to keep it too fancy. @mtrudel while implementing it, I confirmed one thing! Lines 57 to 61 in cc3f93b
Because I was getting this error while running the tests:
I think that back then I read that Anyway I hope this makes it easier for @lexmag to get it merged |
One more finding on why this snippet was needed: Lines 57 to 61 in cc3f93b
It seems it was happening because of an internal detail on the erlang/otp@f17f802#diff-86e7e31a3a23b92ea754ad259d8ffd6eb347deb522218fae1803878bf9d15e8bL572 There is a flow where the process running |
Yes, but my point stands: this implementation as it exists today is just an adhoc copy of what |
I think we are ready to merge, right? cc/ @lexmag |
PR to add the fix for > OTP26 lexmag#72
Hey all, any movement here? |
same here, some fix? im using docker FROM hexpm/elixir:1.16.3-erlang-26.2.5.2-ubuntu-jammy-20240808
|
Why is this still in progress???? |
Closes #69
Update to Elixir 1.15.2 and OTP 26.0.2
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: #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