-
Notifications
You must be signed in to change notification settings - Fork 32
♻️SQLAlchemy migration: simcore-sdk #7404
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
♻️SQLAlchemy migration: simcore-sdk #7404
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7404 +/- ##
==========================================
+ Coverage 87.60% 88.58% +0.97%
==========================================
Files 1759 1649 -110
Lines 68177 64053 -4124
Branches 1124 949 -175
==========================================
- Hits 59726 56740 -2986
+ Misses 8142 7047 -1095
+ Partials 309 266 -43
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
35e031c to
667b71e
Compare
4b3d6e4 to
96a2f1c
Compare
5f12257 to
ed9b0b7
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.
Copilot reviewed 24 out of 26 changed files in this pull request and generated no comments.
Files not reviewed (2)
- packages/simcore-sdk/requirements/_base.in: Language not supported
- packages/simcore-sdk/requirements/_base.txt: Language not supported
Comments suppressed due to low confidence (4)
services/director-v2/tests/unit/_helpers.py:38
- [nitpick] Verify that using engine.begin() provides the appropriate transactional behavior compared to the previous aiopg.acquire() usage.
async with sqlalchemy_async_engine.begin() as conn:
services/director-v2/src/simcore_service_director_v2/modules/comp_scheduler/_scheduler_dask.py:307
- Ensure that self.asyncpg_db_engine is correctly initialized and configured to meet the connection requirements for clean_task_output_and_log_files_if_invalid.
await clean_task_output_and_log_files_if_invalid(self.asyncpg_db_engine, user_id, project_id, node_id)
packages/simcore-sdk/src/simcore_sdk/node_ports_common/dbmanager.py:90
- Verify that using 'engine.begin()' in the DBContextManager context is appropriate here and provides the expected connection behavior compared to the previous acquire() approach.
async with (DBContextManager(self._db_engine) as engine, engine.begin() as connection):
packages/postgres-database/tests/conftest.py:329
- [nitpick] Verify that the fixture's cleanup logic after yield correctly deletes all created fake products to prevent side effects in subsequent tests.
async def create_fake_product(asyncpg_engine: AsyncEngine) -> AsyncIterator[Callable[[str], Awaitable[Row]]]:
ed9b0b7 to
712ec10
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.
Copilot reviewed 25 out of 27 changed files in this pull request and generated no comments.
Files not reviewed (2)
- packages/simcore-sdk/requirements/_base.in: Language not supported
- packages/simcore-sdk/requirements/_base.txt: Language not supported
Comments suppressed due to low confidence (2)
services/director-v2/tests/integration/02/test_dynamic_sidecar_nodeports_integration.py:296
- Consider renaming the parameter 'sqlalchemy_async_engine' to 'asyncpg_engine' for consistency with the rest of the codebase.
async def db_manager(sqlalchemy_async_engine: AsyncEngine) -> DBManager:
packages/simcore-sdk/src/simcore_sdk/node_ports_common/dbmanager.py:90
- [nitpick] Consider splitting the combined async context managers into nested 'async with' statements for improved clarity of transaction and connection handling.
async with (DBContextManager(self._db_engine) as engine, engine.begin() as connection):
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
49e6283 to
caf5e4d
Compare
31e2dc4 to
b6cda45
Compare
|



What do these changes do?
Going towards sqlalchemy 2.0
Related issue/s
How to test
Dev-ops checklist