-
Notifications
You must be signed in to change notification settings - Fork 84
Adding PrivacyPreferences model #6875
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. 2 Skipped Deployments
|
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.
Greptile Overview
Greptile Summary
Adds a new PrivacyPreferences SQLAlchemy model to support the v3 privacy preferences API. The model includes:
- BigInteger identity column for efficient partitioning
- Encrypted
record_datafield for storing PII search_dataJSONB field for queryable metadatais_latestboolean partition key to split records into current and historic partitionshash_valueclassmethod for hashing identity values with salt
The implementation follows existing patterns from ProvidedIdentity and other models in the codebase. The PR notes that the database migration was already added in a previous PR.
Confidence Score: 4/5
- Safe to merge with minor documentation fix needed
- The model implementation is straightforward and follows established patterns in the codebase. The only issue is a minor typo in the docstring that should be corrected for clarity. The code reuses existing encryption utilities and follows the same structure as similar models like
ProvidedIdentity. - No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| src/fides/api/models/v3/init.py | 5/5 | Empty __init__.py file to mark the v3 models package |
| src/fides/api/models/v3/privacy_preferences.py | 4/5 | New SQLAlchemy model for privacy preferences with encrypted storage and partitioning support; contains minor typo in docstring |
2 files reviewed, 3 comments
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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.
LGTM!
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>
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (84.61%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #6875 +/- ##
==========================================
- Coverage 87.40% 87.40% -0.01%
==========================================
Files 520 521 +1
Lines 33920 33946 +26
Branches 3899 3899
==========================================
+ Hits 29648 29670 +22
- Misses 3415 3419 +4
Partials 857 857 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Description Of Changes
Adding
PrivacyPreferencesmodel to Fides. We already had the DB migration from a previous PR.Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works