-
Couldn't load subscription status.
- Fork 5
Add stream filter function #153
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 a new stream filtering function to remove specified event types from a stream while allowing other data to pass through. Key changes include:
- Introducing the filter_stream_events function in the streaming module.
- Updating tests to verify the filtering behavior.
- Documenting the new function in the release notes.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/streaming/test_receiver_filter.py | Added tests for filtering stream events with various filter sets |
| src/frequenz/client/base/streaming.py | Implemented filter_stream_events to filter out specified events |
| RELEASE_NOTES.md | Updated release notes to mention the new stream filtering function |
Signed-off-by: Mathias L. Baumann <[email protected]>
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 wouldn't add this, I think it is easy enough to just ignore the events in your code. IMHO this makes things more complicated. From my side this is a 👎
|
Doesn't seem that easy to me, tbh... frequenz-floss/frequenz-sdk-python@b9cc2ff#diff-4f1a0883cedb7f547fef4e4c9bada9bd8e32609b0b3a4fbaf80429ce1cdbfab8 |
|
We probably need to think about this again. IMHO if events will be barely used, then maybe we should move events to a separate channel. If we really want to force users to think about errors and reconnection while consuming from the stream, then we'll have to swallow the pill when we migrate to this version by handling those events accordingly. If we add the events only to be ignored by 99% of the users, then we are just introducing an annoying breaking change and make the code less efficient, as we'll be injecting events that almost nobody will use. The current approach is only useful if the majority of users should pay attention to the events. |
|
replaced by #155 |
Pull request was closed
No description provided.