Skip to content

Conversation

@galvana
Copy link
Contributor

@galvana galvana commented Oct 29, 2025

Description Of Changes

Adding PrivacyPreferences model to Fides. We already had the DB migration from a previous PR.

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change (i.e. potential for performance impact or unexpected regression) that should be flagged
    • Updates unreleased work already in Changelog, no new entry necessary
  • UX feedback:
    • All UX related changes have been reviewed by a designer
    • No UX review needed
  • Followup issues:
    • Followup issues created
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

@galvana galvana requested a review from erosselli October 29, 2025 18:13
@galvana galvana requested a review from a team as a code owner October 29, 2025 18:13
@vercel
Copy link

vercel bot commented Oct 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Oct 29, 2025 10:38pm
fides-privacy-center Ignored Ignored Oct 29, 2025 10:38pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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_data field for storing PII
  • search_data JSONB field for queryable metadata
  • is_latest boolean partition key to split records into current and historic partitions
  • hash_value classmethod 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

Edit Code Review Agent Settings | Greptile

galvana and others added 2 commits October 29, 2025 11:29
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@galvana galvana removed the request for review from a team October 29, 2025 18:32
Copy link
Contributor

@erosselli erosselli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

galvana and others added 2 commits October 29, 2025 11:50
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>
@galvana galvana enabled auto-merge October 29, 2025 18:53
@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 84.61538% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.40%. Comparing base (9968765) to head (db0818b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/fides/api/models/v3/privacy_preferences.py 84.00% 4 Missing ⚠️

❌ 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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@galvana galvana added this pull request to the merge queue Oct 29, 2025
@galvana galvana removed this pull request from the merge queue due to a manual request Oct 29, 2025
@galvana galvana added this pull request to the merge queue Oct 29, 2025
Merged via the queue into main with commit 568c2f8 Oct 29, 2025
67 of 68 checks passed
@galvana galvana deleted the privacy-preferences-model branch October 29, 2025 23:54
adamsachs pushed a commit that referenced this pull request Nov 3, 2025
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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.

3 participants