-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Parallelize test_sql.py - Issue #60378 #61551
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
base: main
Are you sure you want to change the base?
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 PR but this solution is too heavy handed.
As mentioned in the issue, the tests need to be refactored in a way to have unique table names
Thanks for the feedback @mroeschke! Having now run this through CI, I agree! I come from a production-oriented environment, so I initially underestimated the architecture/OS complexity. I looked into per-table UUIDs as per @UmbertoFasci's PR, and was concerned it might impact future test writing, and it still had some parallelization issues. I thought that using a different approach could solve these problems, but I see the value of this approach. I will revise this to use UUIDs on a per-test basis (building off of @UmbertoFasci's work). |
I'm not ready for review yet. I added the connect_and_uuid fixture, this was the most parsimonious way I found to manage the sqlalchemy connection objects, as well as sharing the same UUIDs between tests (which create views and tables) and fixtures (which tear down views and tables). Working to extend this fixture to the rest of the tests. |
…tement is at the front of all test connection management objects
…qlite connection fixtures
Thanks for your efforts here so far, but personally the scale of these changes are too large to review. I would suggest breaking this into smaller PRs such as
|
Hello @mroeschke That sounds like a plan to me! I'll continue working here to make sure that these changes (and by extension all subsequent PR) pass CI, and then I'll write one PR with just the new fixtures. After the PR with the new fixtures gets approved, I will make a set of PRs. These will all be boilerplate changes, almost all tests are parallelized in the exact same way so this should be easy to review. There are a couple tests which do things like "close the connection and then reopen it", so since these tests are different I'll put them in their own PR. Feel free to tell me if there are any issues with this plan. |
- [x] Parallelizes test_sql.py via per-worker_DBs (approach superseded due to complexity)