Skip to content
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

HJ-338 added sorting for system.privacy_declarations and a test to verify #5683

Merged
merged 16 commits into from
Jan 23, 2025

Conversation

JadeCara
Copy link
Contributor

@JadeCara JadeCara commented Jan 17, 2025

Closes #HJ-338

Description Of Changes

Added an order_by on name to the System.privacy_declarations model. Added a test to verify that the privacy declarations will be in alphabetical order.

Code Changes

  • Added order_by=PrivacyDeclaration.name to System model.
  • Added tests with new privacy declarations to verify they will return in the correct order.

Steps to Confirm

  1. Get fides running locally with a test environment that is prepopulated with data.
  2. Hit GET /api/vi/system endpoint.
    [ ] Verify that for each system all privacy_declarations are alphabetical by name.

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
  • Followup issues:
    • Followup issues created (include link)
    • 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

Copy link

vercel bot commented Jan 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fides-plus-nightly ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 0:37am

Copy link

cypress bot commented Jan 17, 2025

fides    Run #11928

Run Properties:  status check passed Passed #11928  •  git commit dcc4fbadbe ℹ️: Merge a30ba725fef02478df2f0cbae6c00236c11b8c93 into 1174c2c31153f92fc6b07b955b62...
Project fides
Branch Review refs/pull/5683/merge
Run status status check passed Passed #11928
Run duration 00m 47s
Commit git commit dcc4fbadbe ℹ️: Merge a30ba725fef02478df2f0cbae6c00236c11b8c93 into 1174c2c31153f92fc6b07b955b62...
Committer JadeWibbels
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 5
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

Copy link

codecov bot commented Jan 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.14%. Comparing base (1174c2c) to head (a30ba72).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5683      +/-   ##
==========================================
+ Coverage   86.85%   87.14%   +0.29%     
==========================================
  Files         388      388              
  Lines       24050    24050              
  Branches     2595     2595              
==========================================
+ Hits        20888    20959      +71     
+ Misses       2608     2529      -79     
- Partials      554      562       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/fides/core/utils.py Outdated Show resolved Hide resolved
@JadeCara JadeCara marked this pull request as ready for review January 20, 2025 23:23
@JadeCara JadeCara requested a review from erosselli January 21, 2025 00:59
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! Thanks for adding both tests 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update for flaky test.

@JadeCara JadeCara changed the title WIP HJ-338 added sorting for system.privacy_declarations and a test to verify HJ-338 added sorting for system.privacy_declarations and a test to verify Jan 23, 2025
@JadeCara JadeCara merged commit a51da8f into main Jan 23, 2025
39 checks passed
@JadeCara JadeCara deleted the HJ-338-sort-privacy-declarations-alphabetically branch January 23, 2025 01:06
Copy link

cypress bot commented Jan 23, 2025

fides    Run #11931

Run Properties:  status check passed Passed #11931  •  git commit a51da8fc11: HJ-338 added sorting for system.privacy_declarations and a test to verify (#5683...
Project fides
Branch Review main
Run status status check passed Passed #11931
Run duration 00m 46s
Commit git commit a51da8fc11: HJ-338 added sorting for system.privacy_declarations and a test to verify (#5683...
Committer JadeWibbels
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 5
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

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