-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(dynamic_filters): add dynamic filters system #5973
feat(dynamic_filters): add dynamic filters system #5973
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5973 +/- ##
==========================================
+ Coverage 92.78% 92.86% +0.07%
==========================================
Files 58 58
Lines 4867 4919 +52
==========================================
+ Hits 4516 4568 +52
Misses 351 351 ☔ View full report in Codecov by Sentry. |
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.
This looks really good, great job! I left a few suggestions and one required change. Feel free to discuss anything since I lack some context about the requirements here.
@AdriiiPRodri Also, I forgot to mention this filter could be vastly improved using the logic from the def filter_inserted_at(self, queryset, name, value):
value = self.maybe_date_to_datetime(value)
start = uuid7_start(datetime_to_uuid7(value))
return queryset.filter(id__gte=start).filter(inserted_at__date=value) Please take a look at how it is done in the base findings filters, because it takes partitioned tables into consideration and improves efficiency by a lot. |
d69d415
to
23179d3
Compare
0641d0a
to
61f7d3e
Compare
Fixed in the last commit, thanks! |
61f7d3e
to
c9de0b9
Compare
Context
In this PR I have added the endpoint to get the filters dynamically depending on the findings of a date.
Description
Using the specified date, all the findings of that date and the services and regions associated with them are extracted.
Checklist
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.