-
Notifications
You must be signed in to change notification settings - Fork 108
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
Swap NotMasterError with NotPrimaryError. #11016
Swap NotMasterError with NotPrimaryError. #11016
Conversation
Jenkins results:
|
Fix a depricated interface client.database_names() && Rename NotPrimaryError at MSUnmerged.py
3d6c25d
to
19b41a9
Compare
Jenkins results:
|
Todor, don't we have to update any of the exception handling in our baseline source code? I had the impression it required a pymongo bump and a WMCore change as well. |
Hi @amaltaro This is the only strictly WMCore related change, which may affect other services using Mongodb. It is related to a change of a deprecated method in pymongo 4.0.1. But this one is there since a while now (with a deprecation warning). The new method ( [1]
|
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.
Todor, it looks like I forgot to scroll down and missed those baseline changes.
While these changes look good to me, I would say it cannot be merged until we cover all the 3 MongoDB use cases that we have in WMCore (as mentioned a minute ago in the GH issue itself).
Thank you @vkuznet ! BTW I think I have somehow closed that issue by mistake. Reopening it with the current comment. |
Jenkins results:
|
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.
Just making sure my review - and discussion - gets posted to the PR instead of the issue itself: #11012 (comment)
I think it would be important to have a fully functional change. And given that it was mentioned it would be a near future issue, we might want to decide to come back to this in the very near future as well (hopefully with the VM setup no longer valid).
Okay, I tried to upgrade MongoDB in COMP, but it's not that straight forward. Let's get this merged then, but before that, we should check why those unit tests are reported as deleted (I think we need to first upgrade pymongo version, I will get that cmsdist PR merged and then we can come back to this later today or tomorrow). |
test this please |
Jenkins results:
|
This looks better now. Note that this will likely break our MSOutput and MSUnmerged services when running on RPM-based MongoDB setup. @todor-ivanov can you please update the initial description with this note as well? Thanks |
Fixes #11012
Status
Ready
Description
The current PR is intended to handle the newly introduced exception
NotPrimaryError
on thepymongo
client side, which is about to substitute the old oneNotMasterError
, starting withpymongo
version 4.01 . We have tested and proved that on the server side the latest version is already supporting both the old and the new clients, so no errors in exception handling are originating from client vs server version mismatch.Is it backward compatible (if not, which system it affects?)
NO
Related PRs
There is about to be a cmsdist related PR to upgrade the pymongo rpm package:
cms-sw/cmsdist#7654
External dependencies / deployment changes
Yes.