-
Notifications
You must be signed in to change notification settings - Fork 32
♻️ [Maintenance] Refactor Studies-dispatcher Domain to Use asyncpg Instead of aiopg #8467
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
♻️ [Maintenance] Refactor Studies-dispatcher Domain to Use asyncpg Instead of aiopg #8467
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8467 +/- ##
==========================================
- Coverage 87.64% 87.62% -0.03%
==========================================
Files 1983 1983
Lines 77279 77284 +5
Branches 1333 1333
==========================================
- Hits 67732 67719 -13
- Misses 9148 9166 +18
Partials 399 399
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
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.
👍
services/web/server/src/simcore_service_webserver/security/_authz_policy.py
Outdated
Show resolved
Hide resolved
🧪 CI InsightsHere's what we observed from your CI run for 20c4202. ✅ Passed Jobs With Interesting Signals
|
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
…ing in studies dispatcher
477ee17 to
87e7277
Compare
|



What do these changes do?
This PR migrates database access from
aiopgtoasyncpgin the following components:studies_dispatcherdomain within thewebserveraiopg exceptionswithsqlalchemy.excIn detail summary (AI generated)
This pull request introduces several important changes as part of the migration from legacy aiopg/psycopg2-based database exception handling to SQLAlchemy's async support and exception classes. The main focus is on deprecating old database error handling, updating exception usage throughout the codebase, and refactoring service catalog access patterns to use SQLAlchemy's async engine and connection. Additionally, deprecation warnings are added to legacy modules to guide future maintenance.
Database Exception Handling Migration:
aiopg_errorsand psycopg2 exceptions with SQLAlchemy'sIntegrityErrorandDatabaseErroracross multiple repositories and handlers, ensuring consistent exception handling and simplifying future maintenance. [1] [2] [3] [4] [5]DBAPIErrorfrom SQLAlchemy instead ofPostgresErrorfrom asyncpg, improving compatibility with the new async database layer.Deprecation Notices for Legacy Modules:
DeprecationWarningmessages toaiopg_errors.pyanddb/_aiopg.pymodules, informing developers of their deprecated status and pointing to migration resources. [1] [2]db/plugin.pyto mark legacy keys and engine usage as deprecated.Service Catalog Refactoring:
AsyncEngineandAsyncConnection, removing dependency on legacyaiopgengine and connection types. This includes updating query execution and result handling to async patterns. [1] [2] [3] [4]Test Adjustments:
DatabaseErrorwith appropriate parameters, aligning test exception simulation with the new database layer.Minor Codebase Cleanups:
These changes collectively advance the migration to SQLAlchemy's async support, improve exception handling consistency, and lay the groundwork for deprecating legacy database modules.
Related issue/s
How to test
Driving test
Dev-ops
None