-
Notifications
You must be signed in to change notification settings - Fork 84
[ENG-1974] schema updates for bulk filtered dsr #7049
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7049 +/- ##
==========================================
- Coverage 87.28% 87.26% -0.02%
==========================================
Files 530 530
Lines 34858 34882 +24
Branches 4036 4044 +8
==========================================
+ Hits 30426 30440 +14
- Misses 3550 3555 +5
- Partials 882 887 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Greptile OverviewGreptile SummaryThis PR refactors bulk privacy request action schemas to support future filtered operations. The changes replace Key changes:
The implementation follows good patterns with validation at the schema level rather than in route handlers. Current functionality remains unchanged as filter support is deferred to follow-up PRs #7050, #7051, and #7027. Confidence Score: 5/5
Important Files ChangedFile Analysis
|
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.
5 files reviewed, 5 comments
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
@greptile please review |
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.
5 files reviewed, no comments
tests/ops/api/v1/endpoints/privacy_request/test_privacy_request_performance.py
Outdated
Show resolved
Hide resolved
erosselli
left a comment
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.
Approving with some nit comments
| "request_ids,filters,exclude_ids,expected_request_ids,expected_filters,expected_exclude_ids", | ||
| [ | ||
| # Valid: explicit request_ids only | ||
| ( | ||
| ["req-1", "req-2", "req-3"], | ||
| None, | ||
| None, | ||
| ["req-1", "req-2", "req-3"], | ||
| None, | ||
| None, |
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'm a bit confused at this parameterization , it seems like expected_request_ids always matches request_ids , expected_filters always matches filters and expected_exclude_ids always matches exclude_ids . Are all the params needed?
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.
Fixed :)
| assert selection.exclude_ids == expected_exclude_ids | ||
|
|
||
| @pytest.mark.parametrize( | ||
| "request_ids,filters,exclude_ids,expected_error_msg", |
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.
nit: another case would be just exclude ids provided
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.
Ooo good point :D
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.
added test :)
| @pytest.fixture(scope="session") | ||
| def celery_use_virtual_worker(): |
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.
nice find!
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 ended up not working :( updating the celery fixture to end if stuck instead.
Co-authored-by: erosselli <67162025+erosselli@users.noreply.github.com>
…nto ENG-1974-be-schema-update
Ticket ENG-1974
Description Of Changes
🎯 As a Fides user I want to be able to filter my results and then act on them, so that I can perform actions on many pages of results instead of having to go 1 by 1.
AC:
This PR updates the schema with tests and updates the endpoints with the schema. It paves the way for adding the filters to the request but the functionality will still currently only work with a list of ids.
Code Changes
src/fides/api/schemas/privacy_request.py: moved fromReviewPrivacyRequestIdsto newPrivacyRequestBulkSelectionschema for privacy request selectionsrc/fides/api/api/v1/endpoints/privacy_request_endpoints.py: Updated imports for new schemas functions with updates schema and functionalityThis is just the first step.
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works