Skip to content

Conversation

@galvana
Copy link
Contributor

@galvana galvana commented Oct 30, 2025

Description Of Changes

Adds an index to privacy_preferences.created_at for quick sorting.

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 a team as a code owner October 30, 2025 22:21
@galvana galvana requested review from vcruces and removed request for a team October 30, 2025 22:21
@vercel
Copy link

vercel bot commented Oct 30, 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 Oct 30, 2025 10:21pm
fides-privacy-center Ignored Ignored Oct 30, 2025 10:21pm

@galvana galvana requested review from johnewart and removed request for vcruces October 30, 2025 22:21
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 database index on the privacy_preferences.created_at column to improve sorting performance.

  • Creates Alembic migration 8d99bee6e60a to add non-unique index ix_privacy_preferences_created_at
  • Updates SQLAlchemy model to include index=True parameter on created_at column
  • Both upgrade and downgrade migrations are properly implemented
  • The index will apply to both privacy_preferences_current and privacy_preferences_historic partitions since the table is partitioned by is_latest

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is straightforward - adding a standard non-unique index on a timestamp column. Both the Alembic migration and SQLAlchemy model are correctly updated and synchronized. The migration includes proper upgrade and downgrade paths. No logical issues or syntax errors present.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
src/fides/api/alembic/migrations/versions/xx_2025_10_30_2125_8d99bee6e60a_adding_created_at_index.py 5/5 Adds non-unique index on created_at column for privacy_preferences table with proper upgrade/downgrade migrations
src/fides/api/models/v3/privacy_preferences.py 5/5 Updates PrivacyPreferences model to add index=True parameter to created_at column, matching the migration

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.39%. Comparing base (a2d99e7) to head (8933c69).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6897      +/-   ##
==========================================
- Coverage   87.40%   87.39%   -0.01%     
==========================================
  Files         521      521              
  Lines       33944    33944              
  Branches     3899     3899              
==========================================
- Hits        29668    29666       -2     
- Misses       3419     3421       +2     
  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.

@vercel
Copy link

vercel bot commented Oct 31, 2025

Deployment failed with the following error:

You must set up Two-Factor Authentication before accessing this team.

View Documentation: https://vercel.com/docs/two-factor-authentication

@galvana galvana closed this Nov 5, 2025
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.

2 participants