Skip to content

fix: subscriptions historical filtering #1674

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

Merged
merged 3 commits into from
Jul 8, 2025
Merged

Conversation

EnriqueL8
Copy link
Contributor

@EnriqueL8 EnriqueL8 commented Apr 1, 2025

Proposed changes

The subscriptions/<id>/events API is really useful to find all the events that match your subscription.

Unfortunately there was an assumption made in the code when filtering for historical events that the subscription wouldn't have a protocol. Subscriptions always have a protocol. It then set it to Websocket but there are some options that are valid for Webhooks and not Websocket so the validation would fail.

There is no need to set a default protocol, just use the one given.


Types of changes

  • Bug fix
  • New feature added
  • Documentation Update

Please make sure to follow these points

  • I have read the contributing guidelines.
  • I have performed a self-review of my own code or work.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generates no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • My changes have sufficient code coverage (unit, integration, e2e tests).

- a subscription always has a transport

Signed-off-by: Enrique Lacal <enrique.lacal@kaleido.io>
@EnriqueL8 EnriqueL8 requested a review from a team as a code owner April 1, 2025 10:23
Copy link

codecov bot commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.96%. Comparing base (45ec382) to head (04fb066).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1674      +/-   ##
==========================================
- Coverage   99.96%   99.96%   -0.01%     
==========================================
  Files         342      342              
  Lines       30439    30437       -2     
==========================================
- Hits        30427    30425       -2     
  Misses          8        8              
  Partials        4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@EnriqueL8 EnriqueL8 merged commit 54432ba into main Jul 8, 2025
19 checks passed
@EnriqueL8 EnriqueL8 deleted the fix_subs_events_apis branch July 8, 2025 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants