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

Improve event filtering #673

Merged
merged 21 commits into from
Aug 13, 2024
Merged

Improve event filtering #673

merged 21 commits into from
Aug 13, 2024

Conversation

cortadocodes
Copy link
Member

@cortadocodes cortadocodes commented Aug 5, 2024

Contents (#673)

IMPORTANT: There are 2 breaking changes.

New features

  • Add dictionary_product utility function

Enhancements

  • 💥 BREAKING CHANGE: Disable event validation in EventReplayer by default
  • 💥 BREAKING CHANGE: Enable filtering by multiple event kinds in get_events
  • Enable excluding multiple event kinds in get_events
  • Use all non-question events for question redelivery check in flask app
  • Add ability to skip handling logs containing certain text in AbstractEventHandler and subclasses
  • Return outside of ThreadPoolExecutor context managers

Upgrade instructions

💥 Disable event validation in `EventReplayer` by default

Set validate_events=True in the EventReplayer constructor to retain the previous behaviour.

💥 Enable filtering by multiple event kinds in `get_events`

To filter by one event kind as before, use kinds=[event_kind] instead of kind=event_kind.

BREAKING CHANGE: Set `validate_events=True` in the `EventReplayer` constructor to retain the previous behaviour.
BREAKING CHANGE: To filter by one event kind as before, use `kinds=[event_kind]` instead of `kind=event_kind`.
@cortadocodes cortadocodes self-assigned this Aug 5, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 94.73684% with 2 lines in your changes missing coverage. Please review.

Project coverage is 94.49%. Comparing base (9092646) to head (aacefd6).
Report is 9 commits behind head on main.

Files Patch % Lines
octue/cloud/events/handler.py 66.66% 1 Missing ⚠️
octue/cloud/pub_sub/bigquery.py 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #673      +/-   ##
==========================================
- Coverage   94.50%   94.49%   -0.01%     
==========================================
  Files          83       83              
  Lines        3547     3577      +30     
==========================================
+ Hits         3352     3380      +28     
- Misses        195      197       +2     

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

@cortadocodes cortadocodes linked an issue Aug 6, 2024 that may be closed by this pull request
@cortadocodes cortadocodes merged commit e116143 into main Aug 13, 2024
5 checks passed
@cortadocodes cortadocodes deleted the improve-event-filtering branch August 13, 2024 11:28
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.

Turn off event validation in EventReplayer by default
2 participants