Skip to content
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

Remove known broken code & cleanup #56

Merged
merged 3 commits into from
Nov 19, 2018
Merged

Remove known broken code & cleanup #56

merged 3 commits into from
Nov 19, 2018

Conversation

grigi
Copy link
Member

@grigi grigi commented Oct 13, 2018

Since pooled connections are known broken, This PR removes it, and cleans up the code, so that it will be easier to re-add it plainly.

@coveralls
Copy link

coveralls commented Oct 13, 2018

Pull Request Test Coverage Report for Build 337

  • 13 of 40 (32.5%) changed or added relevant lines in 6 files are covered.
  • 225 unchanged lines in 9 files lost coverage.
  • Overall coverage increased (+1.6%) to 93.133%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tortoise/backends/asyncpg/client.py 0 13 0.0%
tortoise/backends/mysql/client.py 0 14 0.0%
Files with Coverage Reduction New Missed Lines %
tortoise/backends/asyncpg/init.py 2 100.0%
tortoise/models.py 2 94.28%
tortoise/backends/mysql/init.py 2 100.0%
tortoise/backends/asyncpg/executor.py 6 100.0%
tortoise/backends/asyncpg/schema_generator.py 8 100.0%
tortoise/backends/mysql/schema_generator.py 13 100.0%
tortoise/backends/mysql/executor.py 21 100.0%
tortoise/backends/asyncpg/client.py 85 99.06%
tortoise/backends/mysql/client.py 86 99.11%
Totals Coverage Status
Change from base Build 328: 1.6%
Covered Lines: 2011
Relevant Lines: 2109

💛 - Coveralls

@grigi grigi changed the title Feature/pool rewrite (WIP) Feature/pool rewrite (experiment) (WIP) Oct 14, 2018
@grigi grigi force-pushed the feature/pool_rewrite branch 4 times, most recently from 11da08e to 90e72b7 Compare October 17, 2018 06:23
@grigi
Copy link
Member Author

grigi commented Oct 17, 2018

Ok, so at this stage I fixed up the test runner to minimise re-connection, and do better resource isolation. And even fixed some resource leakage.
Now SQLite :memory: databases work for testing as we persist the connection correctly.
Hopefully this should significantly reduce the noise when trying to trace what is going on with connection pools.

@grigi grigi mentioned this pull request Oct 31, 2018
72 tasks
@grigi
Copy link
Member Author

grigi commented Oct 31, 2018

rebased off master

@grigi grigi changed the title Feature/pool rewrite (experiment) (WIP) Remove known broken code & cleanup Nov 13, 2018
@grigi
Copy link
Member Author

grigi commented Nov 15, 2018

This PR is getting a bit bit and confused. I removed a lot of code, then added a lot of code... so it just looks like churn
There is 4 things here:

  1. Remove connection pools and related broken code
  2. Change the config parser to be more generic and pass extra info in.
  3. Add lots of type annotations
  4. Add some tests

I feel I should break this in at least two PRs.

@grigi
Copy link
Member Author

grigi commented Nov 18, 2018

@Zeliboba5 Please review.

tortoise/__init__.py Outdated Show resolved Hide resolved
tortoise/backends/asyncpg/client.py Outdated Show resolved Hide resolved
tortoise/backends/asyncpg/client.py Show resolved Hide resolved
@abondar abondar merged commit fc91386 into master Nov 19, 2018
@abondar abondar deleted the feature/pool_rewrite branch November 23, 2018 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants