Repository navigation
fix: API hardening for bridge-history and shared metrics - #1823
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #1823 +/- ##
===========================================
- Coverage 35.56% 35.53% -0.03%
===========================================
Files 263 263
Lines 22751 22763 +12
===========================================
- Hits 8091 8089 -2
- Misses 13811 13824 +13
- Partials 849 850 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Purpose or design rationale of this PR
Hardens request handling in bridge-history-api and bounds label values in the shared gin metrics middleware.
Changes:
common/observability/ginmetrics): themethodlabel accepts only standard HTTP methods; any other value is recorded asOTHER. This keeps the number of metric series bounded. This also affects coordinator-api and coordinator-proxy.bridge-history-api/cmd/api): serve through anhttp.ServerwithReadHeaderTimeout10s andReadTimeout30s, instead ofrouter.Runwith no timeouts.types/schema.go): cappageat 10000. Larger values overflowed(page-1)*page_sizeand returned the wrong page. Address queries return at most 10000 rows, so no reachable page is lost.logic/history_logic.go): a cache miss right after a write now returns an error instead of an empty success.PR title
Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:
Deployment tag versioning
Has
tagincommon/version.gobeen updated or have you addedbump-versionlabel to this PR?Breaking change label
Does this PR have the
breaking-changelabel?Summary by CodeRabbit