Skip to content

feat: resolve webhook headers, health checks, event filters, and dupl…#734

Merged
DokaIzk merged 8 commits into
SoroScan:mainfrom
MKNas01:feat/webhook-and-health-enhancements
Jun 2, 2026
Merged

feat: resolve webhook headers, health checks, event filters, and dupl…#734
DokaIzk merged 8 commits into
SoroScan:mainfrom
MKNas01:feat/webhook-and-health-enhancements

Conversation

@MKNas01
Copy link
Copy Markdown
Contributor

@MKNas01 MKNas01 commented Jun 2, 2026

This PR resolves a batch of ingest API, webhook, and monitoring enhancements.

Changes Included:

  1. Webhook Duplication Prevention (Prevent duplicate webhook subscriptions for the same URL and contract #474): Added a UniqueConstraint on (target_url, contract) and handled the validation gracefully in WebhookSubscriptionSerializer to return a 400 Bad Request.
  2. Event Type Filtering (Add filter by event type to the REST API /api/events/ endpoint #476): Updated ContractEventViewSet to accept single or comma-separated event types via the ?type= query parameter.
  3. Enhanced Health Checks (Health Check Endpoint Enhancements #533): Upgraded the /health/readiness endpoint to actively verify the PostgreSQL cursor, Redis cache read/write, and Soroban RPC JSON-RPC ping.
  4. Webhook Custom Headers UI (Webhook Headers Editor #560): Added a dynamic key-value builder to CreateWebhookModal.tsx allowing operators to inject custom headers (with validation against reserved X-SoroScan-* prefixes).
  5. Testing QoL: Added a standard LocMemCache override to settings.py when sys.argv contains 'test' to prevent local test suites from hanging on missing Redis containers.

Related Issues

Closes #474
Closes #476
Closes #533
Closes #560

Testing Performed

  • All backend tests passing locally with SQLite & LocMemCache.
  • New database constraints successfully migrated and applied.
  • Next.js frontend build succeeding without TypeScript errors.

MKNas01 and others added 4 commits June 2, 2026 13:09
…icate constraints

- Add unique constraint to WebhookSubscription (Closes SoroScan#474)
- Implement '?type=' filtering on /api/events/ (Closes SoroScan#476)
- Enhance /health endpoint to check DB, Redis, and Soroban RPC (Closes SoroScan#533)
- Add custom headers editor UI to CreateWebhookModal (Closes SoroScan#560)
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 2, 2026

@MKNas01 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@DokaIzk DokaIzk merged commit e8ae880 into SoroScan:main Jun 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants