Skip to content
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

fix: stop properly a stream when it crashes from ExceptionMiddleware #189

Merged

Conversation

marcosschroh
Copy link
Collaborator

No description provided.

Copy link

codecov bot commented Jun 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.59%. Comparing base (c9b1dec) to head (4cd1c2d).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #189      +/-   ##
==========================================
+ Coverage   94.76%   95.59%   +0.82%     
==========================================
  Files          23       23              
  Lines         860      862       +2     
==========================================
+ Hits          815      824       +9     
+ Misses         45       38       -7     

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

@marcosschroh marcosschroh force-pushed the fix/properly-stop-stream-when-it-crashes branch 2 times, most recently from 696e500 to 3a79e58 Compare June 20, 2024 10:48
@marcosschroh marcosschroh changed the title fix: stop properly stream it crashes from ExceptionMiddleware fix: stop properly a stream when it crashes from ExceptionMiddleware Jun 20, 2024
@woile
Copy link
Member

woile commented Jun 20, 2024

Looks really nice, would it be possible to simulate the behavior in a test?

@marcosschroh
Copy link
Collaborator Author

Looks really nice, would it be possible to simulate the behavior in a test?

There are 2 tests simulating the Stream crash: https://github.com/kpn/kstreams/blob/master/tests/middleware/test_middleware.py#L176-L194. I can add the check that consumer is closed, but thestream is not running

@marcosschroh marcosschroh force-pushed the fix/properly-stop-stream-when-it-crashes branch from 3a79e58 to 4cd1c2d Compare June 20, 2024 12:52
@marcosschroh marcosschroh merged commit f7f19d4 into kpn:master Jun 20, 2024
7 of 8 checks passed
@marcosschroh marcosschroh deleted the fix/properly-stop-stream-when-it-crashes branch June 20, 2024 13:00
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