-
Notifications
You must be signed in to change notification settings - Fork 134
*: handing 409 for obol api post #4121
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
|
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 adds graceful handling of HTTP 409 (Conflict) status codes returned by the Obol API during POST requests. When a 409 is received (indicating duplicate submission), the code now logs an informational message instead of returning an error, allowing the operation to continue successfully. This is useful in distributed DKG scenarios where multiple nodes might attempt to publish the same lock file.
- Special handling for 409 status codes to treat them as success (not errors)
- Added test coverage for 409 conflict scenario
- Info-level logging when duplicate requests are detected
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| app/obolapi/api.go | Added conditional logic to ignore 409 status codes and log informational message instead of returning error |
| app/obolapi/api_internal_test.go | Added test case to verify 409 status code is handled as success |
| .gitignore | Added .serena/ directory to ignore list |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4121 +/- ##
==========================================
+ Coverage 56.36% 56.38% +0.02%
==========================================
Files 245 245
Lines 31173 31175 +2
==========================================
+ Hits 17571 17579 +8
+ Misses 11290 11288 -2
+ Partials 2312 2308 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
OisinKyne
left a comment
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.
I think Cluster lock is already published. would be cleaner than: Duplicate request ignored by Obol API. Likely another node submitted the same data already.



Handling 409 status code for Obol API's HTTP POST requests, e.g. when DKG is publishing the lock file.
category: refactor
ticket: #4107