Skip to content

Conversation

@JadeCara
Copy link
Contributor

@JadeCara JadeCara commented Nov 17, 2025

Ticket ENG-1290

Description Of Changes

🎯 As a user, I want to specify conditions that must be true to create manual tasks, which check the request data, so that I can create tasks conditionally based on data in the request.

This PR adds some utils required for adding privacy request conditional dependencies

  • Introspection utility: that will allow us the ability to retrieve the available fields from privacy request to impose conditions on. This allows us a clean way to report to the UI what the available queryable conditions are and verify data types up front. (Including configured custom privacy request and identity values)

Code Changes

  • new src/fides/api/task/conditional_dependencies/privacy_request/util.py
  • new tests/api/task/conditional_dependencies/privacy_request/test_util.py

Steps to Confirm

  1. This change is new and not hooked up to anything. Tests should pass.

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

@vercel
Copy link

vercel bot commented Nov 17, 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 Nov 18, 2025 8:26pm
fides-privacy-center Ignored Ignored Nov 18, 2025 8:26pm

@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

❌ Patch coverage is 84.15842% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.26%. Comparing base (985b959) to head (4f540f9).
⚠️ Report is 1 commits behind head on ENG-1290-convenience-fields.

Files with missing lines Patch % Lines
...k/conditional_dependencies/privacy_request/util.py 84.15% 8 Missing and 8 partials ⚠️

❌ Your patch status has failed because the patch coverage (84.15%) 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                       @@
##           ENG-1290-convenience-fields    #6983      +/-   ##
===============================================================
+ Coverage                        87.24%   87.26%   +0.01%     
===============================================================
  Files                              527      528       +1     
  Lines                            34550    34651     +101     
  Branches                          3988     4007      +19     
===============================================================
+ Hits                             30144    30238      +94     
+ Misses                            3536     3535       -1     
- Partials                           870      878       +8     

☔ 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.

@JadeCara JadeCara changed the title Eng 1290 privacy request utils [ENG-1290] Conditional Deps Utils Nov 17, 2025
@JadeCara JadeCara mentioned this pull request Nov 17, 2025
18 tasks
@JadeCara JadeCara marked this pull request as ready for review November 17, 2025 20:19
@JadeCara JadeCara requested a review from a team as a code owner November 17, 2025 20:19
@JadeCara JadeCara requested review from johnewart and removed request for a team November 17, 2025 20:19
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 17, 2025

Greptile Summary

  • Adds privacy request field introspection utilities to support conditional manual task creation, allowing dynamic discovery of available fields for imposing conditions on privacy request data
  • Includes both a nested dictionary structure for UI consumption and a flat list for programmatic access, handling standard privacy request fields and custom fields from privacy center configurations
  • Implements comprehensive test coverage with proper fixtures and validation of field extraction functionality across various privacy request field types

Important Files Changed

Filename Overview
src/fides/api/task/conditional_dependencies/privacy_request/util.py New utility module providing introspection capabilities for privacy request fields with database integration and config parsing
tests/api/task/conditional_dependencies/privacy_request/test_util.py New test file with comprehensive coverage for field introspection utilities, including custom field handling tests

Confidence score: 4/5

  • This PR is safe to merge as it adds new utilities without integration points, minimizing production risk
  • Score reflects minor code quality issues: unused import/fixture in tests and broad exception handling in config parsing that could mask important errors
  • Pay attention to the test file for cleanup of unused imports and consider more specific exception handling in the utility module

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.

8 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

@JadeCara JadeCara changed the base branch from main to ENG-1290-convenience-fields November 18, 2025 19:45
@JadeCara
Copy link
Contributor Author

@greptile please review

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.

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

@JadeCara JadeCara marked this pull request as ready for review November 18, 2025 20:40
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.

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

@JadeCara JadeCara marked this pull request as draft November 19, 2025 16:27
@JadeCara JadeCara closed this Nov 19, 2025
@JadeCara JadeCara reopened this Nov 19, 2025
@JadeCara
Copy link
Contributor Author

Moving this functionality to fidesplus, it makes more sense there.

@JadeCara JadeCara closed this Nov 19, 2025
@JadeCara JadeCara deleted the ENG-1290-privacy-request-utils branch November 19, 2025 18:08
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