chore: log panic line in ticker error#2881
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughWalkthroughThe changes involve enhancing error handling in the Changes
Sequence Diagram(s)sequenceDiagram
participant T as Ticker
participant R as Run Method
participant E as Error Handling
participant S as Stack Trace
T->>R: Start Run
R->>E: Execute code
alt Panic Occurs
R->>S: Capture stack trace
S->>E: Process stack trace
E-->>R: Return error with context
end
R-->>T: Complete Run
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
Documentation and Community
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2881 +/- ##
===========================================
- Coverage 66.94% 66.90% -0.05%
===========================================
Files 373 377 +4
Lines 21032 21087 +55
===========================================
+ Hits 14080 14108 +28
- Misses 6288 6315 +27
Partials 664 664
|
There was a problem hiding this comment.
Actionable comments posted: 1
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- pkg/ticker/ticker.go (2 hunks)
- pkg/ticker/ticker_test.go (1 hunks)
Additional context used
Path-based instructions (2)
pkg/ticker/ticker.go (1)
Pattern
**/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.pkg/ticker/ticker_test.go (1)
Pattern
**/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
Additional comments not posted (3)
pkg/ticker/ticker.go (1)
32-33: LGTM!The imports are correctly placed and necessary for the enhanced error handling implementation.
pkg/ticker/ticker_test.go (2)
150-152: LGTM!The test case correctly verifies that the ticker captures the panic message and the line number where the panic occurred. This enhances the error handling and debugging capabilities.
154-172: LGTM!The test case correctly verifies that the ticker captures the nil pointer dereference panic and the line number where the panic occurred. This ensures that the ticker can gracefully handle and report such panics, improving the robustness of the error handling.
9321074 to
77082bb
Compare
We're seeing a panic on mainnet which causes an inbound processing halt.
Add ensure the we log the full path to any panics for debugging. Test coverage proves that we select the correct line for the message. We already built and deployed a binary manually on mainnet which gives us a useful result:
Summary by CodeRabbit
Bug Fixes
Tests