-
Notifications
You must be signed in to change notification settings - Fork 32
♻️Director v2: remove aiopg usage #7576
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
♻️Director v2: remove aiopg usage #7576
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7576 +/- ##
==========================================
+ Coverage 87.68% 90.09% +2.40%
==========================================
Files 1774 1502 -272
Lines 68369 58609 -9760
Branches 1125 569 -556
==========================================
- Hits 59952 52805 -7147
+ Misses 8108 5648 -2460
+ Partials 309 156 -153
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
718d428 to
e9fbce2
Compare
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.
thx so much!
packages/postgres-database/src/simcore_postgres_database/utils_aiosqlalchemy.py
Outdated
Show resolved
Hide resolved
dd99b1c to
bca70f4
Compare
8be5011 to
0d4ea55
Compare
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.
💪 🙏
0d4ea55 to
e52ab00
Compare
|



What do these changes do?
This PR aims at removing
aiopgfrom the director-v2 codebase. Production code is replaced byasyncpgwhich is the new sqlalchemy asyncio standard. Note that tests are still using partially usingaiopgdue topytest-simcorefixtures. This will be fixed later on.Enhancements to database utilities:
maybe_awaithelper function to handle both synchronous and asynchronous database results, simplifying code that interacts with mixed database drivers (aiopgandasyncpg). ([[1]](https://github.com/ITISFoundation/osparc-simcore/pull/7576/files#diff-74af73d00e2ffe68b7b9ad870d543fd075a2a51f598fdad6ff1e8f643ad7fc0fR26-R64),[[2]](https://github.com/ITISFoundation/osparc-simcore/pull/7576/files#diff-2fee461956529bc30c6bd5d496dc0975a741178898019592813f97ae11c9fdc1L200-L223))DBConnection,ResultProxy) to support bothaiopgandasyncpgresult methods, facilitating the migration toasyncpg. ([packages/postgres-database/src/simcore_postgres_database/_protocols.pyL5-R49](https://github.com/ITISFoundation/osparc-simcore/pull/7576/files#diff-5cd0106cd1e50cbedf7683d6502d867dc437caee25f5fe0e70579741de998660L5-R49))Documentation and guidelines:
copilot-instructions.mdto recommend adding comments to functions only when strictly necessary. ([.github/copilot-instructions.mdR25](https://github.com/ITISFoundation/osparc-simcore/pull/7576/files#diff-227c2c26cb2ee0ce0f46a320fc48fbcbdf21801a57f59161b1d0861e8aad55f5R25))Related issue/s
How to test
Dev-ops checklist