Skip to content

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 force-pushed the feature/pool_rewrite branch from 27a03bc to a42ce1c Compare October 14, 2018 09:43
@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 grigi force-pushed the feature/pool_rewrite branch from c104a58 to f0d59f4 Compare October 31, 2018 06:21
@grigi
Copy link
Member Author

grigi commented Oct 31, 2018

rebased off master

@grigi grigi force-pushed the feature/pool_rewrite branch from f0d59f4 to f3fc36c Compare November 13, 2018 18:36
@grigi grigi changed the title Feature/pool rewrite (experiment) (WIP) Remove known broken code & cleanup Nov 13, 2018
@grigi grigi force-pushed the feature/pool_rewrite branch from 9472808 to 306aa9a Compare November 13, 2018 19:55
@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 grigi force-pushed the feature/pool_rewrite branch from 856503f to 2b8e2e6 Compare November 18, 2018 18:19
@grigi
Copy link
Member Author

grigi commented Nov 18, 2018

@Zeliboba5 Please review.

@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