-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
LDAP: match on tuples instead of the #eldap_search_result record for OTP 24.3 compat #4285
Conversation
In erlang/otp#5538, the eldap_search_result record structure has changed: https://github.com/erlang/otp/pull/5538/files#diff-30e064e89b115da7e974f229ed5c92f28e489da679ef42f17e70b9e7cf874179R24 It does have a default but for code compiled on, say, Erlang 23.0, which is the case for current RabbitMQ releases, it would still be a breaking change resulting in case expression matching failures (a case_clause). Closes #4284.
@michaelklishin should this API change have been released in a minor OTP version? 🤔 https://github.com/erlang/otp/pull/5538/files#diff-30e064e89b115da7e974f229ed5c92f28e489da679ef42f17e70b9e7cf874179R21-R24 Seems like it should have waited until OTP 25. |
@lukebakken if you compile on 24.3 and run on 24.3, you wouldn't run into this. So I think it was OK to backport for the general Erlang/Elixir user base, just not for projects such as RabbitMQ. We've been there before. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my local environment eldap_search_result
is always a tuple with two elements, not three. So, I can't reproduce the original issue. I applied the patch and my LDAP environment continued to work correctly (as expected).
This is an easy-to-understand fix for a well-reported issue, so 👍
LDAP: match on tuples instead of the #eldap_search_result record for OTP 24.3 compat (backport #4285)
Reported here #4281 (reply in thread) Fixes #4444 Follow-up to #4285
Reported here #4281 (reply in thread) Fixes #4444 Follow-up to #4285 (cherry picked from commit 8d8847e)
Reported here #4281 (reply in thread) Fixes #4444 Follow-up to #4285 (cherry picked from commit 8d8847e) (cherry picked from commit 8ce7679)
In erlang/otp#5538, the eldap_search_result
record structure has changed:
https://github.com/erlang/otp/pull/5538/files#diff-30e064e89b115da7e974f229ed5c92f28e489da679ef42f17e70b9e7cf874179R24
It does have a default but for code
compiled on, say, Erlang 23.0, which is the case for current RabbitMQ
releases, it would still be a breaking change resulting in
case expression matching failures (a case_clause).
Note that CI would not hit this issue. In order to reproduce, you have to build on Erlang pre-24.3 but run on 24.3.
Closes #4284.