-
-
Notifications
You must be signed in to change notification settings - Fork 747
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
update db connect mongo connection test #5302
Conversation
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.
Thanks for the contribution!
Could you please include the changelog record for this change?
LGTM, but it would be good to add a (direct) test for this functionality if we don't have one already. |
added changelog record |
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.
Thanks for the contribution!
I think this change broke a huge number of the ST2 Exchange pack tests:
All of the failing packs have this error. I can't find any place in the PyMongo documentation where the However, I did find this section of the documentation, which suggests using the
@lukepatrick Can I get your opinion on this? You probably know the PyMongo API better than I do, so can you tell from that traceback if StackStorm Exchange errors caused by something else? Or should we tweak this code to use the |
I hit this error on my ubuntu 18.04 dev server. Turns out it was running MongoDB 3.2. We should encourage users to upgrade to version 4.x of MongoDB. Our currently targetted platforms have packages available from MongoDB repositories. The Exchange is using |
Good find about the I guess that's a discussion that led to the doc update above: Looks like it allows us to get the best from the 2 worlds. |
Thanks everyone, created #5341 PR to workaround that. Also documented an issue StackStorm-Exchange/exchange-incubator#168 for the CircleCI config update in StackStorm Exchange. We definitely should update the old mongo v3.4 in there. So you're both right. |
The fast and easy fix is to switch to using But the long term fix is to update all ST2 Exchange packs to use MongoDB v4.0 at least, since all OSes that we support (Ubuntu 18.04, Ubuntu 20.04, CentOS 7, and CentOS 8) all install with MongoDB 4.0. |
The other question I had is, why do we test packs in the exchange against St2 dev packages and not the current stable packages? |
It's a good early warning system for anything that would break packs. Every now and then there's a change that would break one or more packs. Testing against dev packages helps us identify issues (on a weekly basis, on the weekend) and fix them before a major ST2 version is released. It might be good to test against both dev and the latest release, but in practice I don't think we've had any issues with that. People are usually developing packs against a released version so that gets intrinsically tested. |
the
isMaster
MongoDB command is depreciated in future versions of mongo.hello
is in the updated patch versions across a few major versions:4.4.2: (and 4.2.10, 4.0.21, and 3.6.21)
https://docs.mongodb.com/v4.4/reference/command/hello/#mongodb-dbcommand-dbcmd.hello
This minor update supports future MongoDB development