-
Notifications
You must be signed in to change notification settings - Fork 31
♻️[Maintenance]: Improve RPC Server Logging and Error Handling #8346
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]: Improve RPC Server Logging and Error Handling #8346
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8346 +/- ##
==========================================
- Coverage 87.83% 87.67% -0.17%
==========================================
Files 1945 1520 -425
Lines 75540 62912 -12628
Branches 1312 658 -654
==========================================
- Hits 66351 55155 -11196
+ Misses 8794 7524 -1270
+ Partials 395 233 -162
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.
Pull Request Overview
This PR improves RPC server logging and error handling by adding comprehensive access logs and enhancing error reporting mechanisms. The changes focus on better traceability and consistent error handling across RPC calls.
Key Changes:
- Enhanced RPC server with access logging similar to HTTP APIs to track call lifecycles at INFO level
- Improved unhandled exception handling with structured logging and error codes
- Replaced HTTP exception raising with proper error response creation in dynamic service operations
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
services/web/server/src/simcore_service_webserver/projects/_controller/nodes_rest.py |
Enhanced error handling in _stop_dynamic_service_task with structured logging and proper error responses |
services/catalog/src/simcore_service_catalog/api/rpc/_services.py |
Removed redundant @log_decorator annotations from RPC methods |
packages/service-library/src/servicelib/rabbitmq/_rpc_router.py |
Added comprehensive RPC access logging and improved exception handling with error codes |
packages/service-library/src/servicelib/rabbitmq/_errors.py |
Updated RPCServerError message template to include error codes |
services/web/server/src/simcore_service_webserver/projects/_controller/nodes_rest.py
Show resolved
Hide resolved
d4cb9d5
to
8b73c3f
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.
thanks! looking good. please double check with @GitHK about the allowed_errors
services/director-v2/src/simcore_service_director_v2/modules/dask_client.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_controller/nodes_rest.py
Show resolved
Hide resolved
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
packages/service-library/src/servicelib/rabbitmq/_rpc_router.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/modules/dask_client.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_controller/nodes_rest.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_controller/nodes_rest.py
Show resolved
Hide resolved
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.
Looks good to me. Thanks a lot
services/web/server/src/simcore_service_webserver/projects/_controller/nodes_rest.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_controller/nodes_rest.py
Show resolved
Hide resolved
…ore into mai/remove-rpc-logs
|
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.
Let's go with this
What do these changes do?
This PR addresses some issues discovered while investigating a user report together with @sanderegg
RPCServerError
, serialized, transmitted to the client, and re-raised on the client side.raise web.HTTPFound
by anHTTP_404_NOT_FOUND
error http response and logging the issue since 1. exception messages must never be added "as is" to the http errors 2. avoidsallowed_errors=(StopDynamicServiceTaskError,),
in the LRT's registry (i.e. those are logged and returned asResultField
).*🐛 @sanderegg : fixes
UnboundLocalError
inDaskClient.get_task_status
(I am surprised mypy did not find this)Related issue/s
How to test
Dev-ops