Skip to content

Store message id for exceptions raised from result4() #262

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

Merged
merged 2 commits into from
Jun 5, 2020

Conversation

krisztian-kovacs
Copy link
Contributor

Otherwise calling result4() can return exceptions like NO_SUCH_OBJECT or
COMPARE_TRUE without the caller being able to find the matching asynchronous
operation that failed.

This change adds the message id as an argument to the exception.

@codecov
Copy link

codecov bot commented Jan 31, 2019

Codecov Report

Merging #262 into master will increase coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #262      +/-   ##
==========================================
+ Coverage   71.38%   71.42%   +0.04%     
==========================================
  Files          49       49              
  Lines        4837     4837              
  Branches      808      808              
==========================================
+ Hits         3453     3455       +2     
+ Misses       1050     1048       -2     
  Partials      334      334              
Impacted Files Coverage Δ
Lib/ldap/ldapobject.py 78.30% <0.00%> (+0.39%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8fd053...e2bcd62. Read the comment docs.

@krisztian-kovacs
Copy link
Contributor Author

Is there any chance of getting this pull request merged? We're using this in production and are forced to use a patched build of python-ldap because of this.

I was sorry to see that a new version has been released without any of the pull requests opened for the project being merged. I think this is really discouraging for 3rd party contributors...

@encukou
Copy link
Member

encukou commented Mar 21, 2019

Indeed, there's a shortage of contributor time. Sorry for that!
Would you like to help by doing reviews of the outstanding pull requests?

The last release had quite a few pull requests merged. Sorry that yours was one of the ones that didn't make it – when the critical bugfix was reviewed, I took everything that was merged until then.

@encukou
Copy link
Member

encukou commented Jan 29, 2020

Indeed, there's a shortage of contributor time.

Still the case.


This PR is missing tests and documentation. Would you care to add them?

@krisztian-kovacs krisztian-kovacs force-pushed the message-id-in-exception branch 2 times, most recently from ee3ed13 to d3d0dc3 Compare February 13, 2020 14:56
@krisztian-kovacs
Copy link
Contributor Author

I've updated the patch with docs and tests. Also, I've found out that this would probably fix #177.

@encukou
Copy link
Member

encukou commented Jun 5, 2020

Thank you for the update, and apologies again for not finding time to review the pull request.
@mistotebe found a more robust solution to this problem in #288, so #/177 is now solved!

Compared to this pull request, the key is named msgid rather than msg_id. I hope that is not too much trouble.

I would still like to merge the tests and documentation from this pull request, though. I will rebase, update and merge it.

@encukou encukou force-pushed the message-id-in-exception branch from d3d0dc3 to fff2905 Compare June 5, 2020 17:04
@encukou encukou force-pushed the message-id-in-exception branch from fff2905 to e2bcd62 Compare June 5, 2020 17:05
Copy link
Member

@encukou encukou left a comment

Choose a reason for hiding this comment

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

For some reason, Travis CI is not reporting results. But the build for e2bcd62 passed: https://travis-ci.org/github/python-ldap/python-ldap/builds/695122368

@encukou encukou merged commit c8427c0 into python-ldap:master Jun 5, 2020
@tiran tiran added this to the 3.3 milestone Jun 5, 2020
@krisztian-kovacs
Copy link
Contributor Author

Thanks for finally merging a solution for this.
I'll update our code to use msgid once python-ldap 3.3 is released.

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

Successfully merging this pull request may close these issues.

3 participants