-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
Python3.8 on Ubuntu 20.04 (requiring MongoDB 4.4) #5177
Conversation
- Bump eventlet/greenlet to latest to benefit from threading fix for python3.7+ - Bump pymongo/mongoengine to support Mongo4.4 which is the only version packaged for Ubuntu 20.04. - Added Python3.8 into tox tests.
…aused unit tests to halt.
… aliasexecution controllers
…cutions controller
…troller (this time for real)
…eprecated positional ones
…of the deprecated positional ones" This reverts commit c4bbe78 as it did not fix the issue
We just reformatted the code with black. (Hooray!) And this PR got caught in the cross fire too. (Arrgh!) |
…garbage collector in st2common to use named instead of positional parameters
I'll use this PR to drop some findings I come across when running the tests:
It works fine for existing executions. |
…e queryset profiling It's deprecated since MongoEngine/mongoengine#2113
Just to confirm - new version of pymongo still supports older versions of MongoDB, right? On a related note, we should also add some upgrade notes to st2docs on how to upgrade MongoDB for existing installations. |
Also, now that we use newer version of pymongo and MongoDB, we could also experiment / benchmark with zstandard compression for wire transport (this may be beneficial when working with larger execution results which usually compress quite well). |
st2client install check started failing because a new version of Will push a change which pins it to < 4.0 and hopefully that will work. |
Recently st2client tests started failing due to new version of importlib-metadata being published which is not supported by one of our transitive dependencies.
can specify which compressor client should try to use when talking to MongoDB (aka for transport / network level compression). Default (same as before) is no transport level compression.
While at it, I also decided to add new I also added By default (same as before), no transport / network level compression is used. I did run some quick micro benchmarks locally with and without zstd compression and there is no perceived difference in the run time so I decided to leave it disabled by default. We should perform more larger scale benchmarks and then decide if it perhaps makes sense to enable it by default at some point in the future. I also plan to add some micro benchmarks for that in the future which will cover various scenarios and document / data sizes. In the mean time, I will open st2docs change with release notes + config change which tells user how to configure this option in to be released StackStorm v3.5. |
avoid leaking env variables into other tests.
Aren't virtualenvs at least partially created like this already? |
@blag There are still other issues, for example, files in |
Re network / transport level compression - interesting thing is that the existing micro benchmarks showed very little difference in operation duration when using zstd for network level compression, but when running unit tests with compression on they do finish a bit faster. |
I pushed some unit test optimizations for low hanging fruit and managed to save a minute or so from unit test run. |
Re MongoDB 4.4 support. It looks like that we might need to do more work. I got this error locally:
No idea why no tests caught that or why it happened locally. Perhaps it could be related to some specific data being in the document. Didn't have time to dig in and track it down yet. It looks like it's related to change in MongoDB and we may need to modify some queries or similar - https://docs.mongodb.com/manual/release-notes/4.4-compatibility/#path-collision-restrictions. EDIT: It may be because we don't run end to end tests with MongoDB 4.4 yet. |
From Slack: It's an issue with "overlapping" projection query. That's the projection for that query (default executions list API endpoint): It should either be just In short:
One option would also be to handle this in the API layer and make it behave as before. E.g. if projection contains |
Work in Progress
Add support for Python3.8 on Ubuntu 20.04. To support this configuration, it implicitly includes MongoDB 4.4 unless we consider standalone instances of StackStorm can no longer host the mongodb instance locally for Ubuntu 20.04.
StackStorm/community#68