-
Notifications
You must be signed in to change notification settings - Fork 29
include error chain when logging bucket loading errors #8380
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
Conversation
📝 WalkthroughWalkthroughThis pull request refactors error handling and logging across multiple components. The changes centralize error formatting by introducing a new method, Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Tip 🌐 Web search-backed reviews and chat
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
exportTiffMaxEdgeLengthVx = 8192 | ||
defaultToLegacyBindings = false | ||
editableMappingsEnabled = false | ||
editableMappingsEnabled = true |
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.
unrelated to this pr. I talked to @normanrz and we agreed to include this here. will be disabled selectively in docker.
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
webknossos-datastore/app/com/scalableminds/webknossos/datastore/controllers/DataSourceController.scala (1)
748-748
: LGTM! Consider extracting the error formatting parameters to constants.The change enhances error logging by including stack traces and messages provider, which aligns with the PR objective. However, the hardcoded parameters could be extracted to constants for better maintainability.
Apply this diff to extract the parameters to constants:
+ private val ErrorLoggingConfig = { + val IncludeStackTraces = true + } + def exploreRemoteDataset(): Action[ExploreRemoteDatasetRequest] = { // ... - reportMutable += s"Error when exploring as layer set: ${formatFailureChain(f, includeStackTraces = true, messagesProviderOpt = Some(request.messages))}" + reportMutable += s"Error when exploring as layer set: ${formatFailureChain(f, includeStackTraces = ErrorLoggingConfig.IncludeStackTraces, messagesProviderOpt = Some(request.messages))}"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
app/controllers/Controller.scala
(0 hunks)app/models/annotation/AnnotationUploadService.scala
(4 hunks)conf/application.conf
(1 hunks)util/src/main/scala/com/scalableminds/util/mvc/ExtendedController.scala
(1 hunks)util/src/main/scala/com/scalableminds/util/mvc/Formatter.scala
(2 hunks)util/src/main/scala/com/scalableminds/util/tools/Fox.scala
(0 hunks)webknossos-datastore/app/com/scalableminds/webknossos/datastore/controllers/DataSourceController.scala
(1 hunks)webknossos-datastore/app/com/scalableminds/webknossos/datastore/explore/ExploreRemoteLayerService.scala
(8 hunks)webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/AdHocMeshServiceHolder.scala
(1 hunks)webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/BinaryDataServiceHolder.scala
(1 hunks)webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/DatasetErrorLoggingService.scala
(4 hunks)
💤 Files with no reviewable changes (2)
- app/controllers/Controller.scala
- util/src/main/scala/com/scalableminds/util/tools/Fox.scala
✅ Files skipped from review due to trivial changes (2)
- webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/BinaryDataServiceHolder.scala
- webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/AdHocMeshServiceHolder.scala
🚧 Files skipped from review as they are similar to previous changes (1)
- webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/DatasetErrorLoggingService.scala
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: circleci_build
🔇 Additional comments (4)
util/src/main/scala/com/scalableminds/util/mvc/Formatter.scala (1)
84-112
: LGTM! Well-structured implementation of failure chain formatting.The implementation is clean, modular, and provides good flexibility with optional parameters for stack traces and server time. The helper functions make the code more maintainable and easier to understand.
util/src/main/scala/com/scalableminds/util/mvc/ExtendedController.scala (1)
43-47
: LGTM! Good refactoring to use the new formatFailureChain method.The implementation is cleaner and the parameter name
chainBox
better describes its type. The MessagesProvider is correctly passed to the new method.app/models/annotation/AnnotationUploadService.scala (1)
34-36
: LGTM! Good integration of the Formatter trait.The implementation correctly extends the Formatter trait and properly uses the new formatFailureChain method with the MessagesProvider.
Also applies to: 60-61
webknossos-datastore/app/com/scalableminds/webknossos/datastore/explore/ExploreRemoteLayerService.scala (1)
54-55
: LGTM! Good integration of error chain formatting.The implementation correctly extends the Formatter trait and properly uses the new formatFailureChain method for error reporting. The MessagesProvider parameter is consistently added to all necessary methods.
Also applies to: 176-176
Log the whole error chain when bucket loading fails.
Motivated by https://scm.slack.com/archives/C02H5T8Q08P/p1738766627989389?thread_ts=1738766454.436339&cid=C02H5T8Q08P
Also fixes #8379