Skip to content

Eng 2185 remove unused cols#7172

Merged
JadeCara merged 63 commits intomainfrom
ENG-2185-remove-unused-cols
Jan 12, 2026
Merged

Eng 2185 remove unused cols#7172
JadeCara merged 63 commits intomainfrom
ENG-2185-remove-unused-cols

Conversation

@JadeCara
Copy link
Copy Markdown
Contributor

@JadeCara JadeCara commented Dec 30, 2025

Ticket ENG-2185

Description Of Changes

🎯 Create manual tasks on the Consent Graph.

There are going to be a few PRs cleaning up some un-used functionality or adjusting functionality for improved usage patterns. This PR removes the columns which are now un-used and have been replaced by the JSONB storage tree. It is a clean up based on the first few rounds of customer use and learning actual usage patterns.

Past PRs:

  • The logging being used by manual tasks and front end data is entirely the general audit logs so the manual task log table and utilities are now redundant. ENG-2185 #7124
  • Update the Conditional Dependency table with a JSONB dictionary column. This will allow us to thoroughly test the migration without being destructive. [ENG-2185] #7133

This PR:

  • Remove the extra columns and rows for conditional dependencies once the tree has been implemented and tested.

Future PRs:

  • Allow conditional dependencies to be assigned to a specific policy type or id
  • Allow users to be assigned to specific submissions rather than the whole task.

Code Changes

  • .fides/db_dataset.yml - removed un used columns
  • src/fides/api/alembic/migrations/versions/ remove the unused columns.
  • removed un-used columns and multiple row based functionality.
    • src/fides/api/models/conditional_dependency/conditional_dependency_base.py
    • src/fides/api/models/digest/conditional_dependencies.py
    • src/fides/api/models/manual_task/conditional_dependency.py
  • Updated all tests removing the manual task log.

Steps to Confirm

  1. There should be NO change in functionality.
  2. Manual tasks, conditional dependencies etc should continue to function as before.
  3. Please test with FidesPlus 2951
  4. Run FidesPlus branch above pointed at this branch.
  5. Create a ManualTask with several submissions required and several conditions, both dataset and privacy request based.
  6. Create privacy requests that meet and do not meet the requirements. Verify that they create/do not create as expected.
  7. Verify that you can complete the manual tasks with no errors.
  8. Verify that you can see the skipped logs and the manual task and manual task actions appear on the DSR activity log.
  9. Verify that you receive the access package with all expected manual task inclusions (attachments and text)
  10. Update the ManualTask submission types, delete one or more.
  11. Delete manual task integration

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
Copy Markdown
Contributor

vercel bot commented Dec 30, 2025

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

2 Skipped Deployments
Project Deployment Review Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Jan 12, 2026 9:49pm
fides-privacy-center Ignored Ignored Jan 12, 2026 9:49pm

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.04%. Comparing base (ba6556f) to head (2b2c07f).

Additional details and impacted files
@@                        Coverage Diff                         @@
##           ENG-2185-add-new-jsob-tree-col    #7172      +/-   ##
==================================================================
- Coverage                           87.24%   85.04%   -2.20%     
==================================================================
  Files                                 535      535              
  Lines                               35324    35264      -60     
  Branches                             4117     4107      -10     
==================================================================
- Hits                                30817    29992     -825     
- Misses                               3615     4348     +733     
- Partials                              892      924      +32     

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

Copy link
Copy Markdown
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

@JadeCara
Copy link
Copy Markdown
Contributor Author

@greptile please review

Copy link
Copy Markdown
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.

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Base automatically changed from ENG-2185-add-new-jsob-tree-col to main January 12, 2026 20:18
Comment on lines 75 to 77
condition_row = (
db.query(cls)
.filter(cls.manual_task_id == manual_task_id, cls.parent_id.is_(None))
.first()
db.query(cls).filter(cls.manual_task_id == manual_task_id).first()
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: using .one() here would make it so we throw an error if there's somehow more than one matching row

"conditions": [
{
"logical_operator": "and",
"logical_operator": GroupOperator.and_,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this change intentional?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah - moving away from strings to the actual enums etc.

privacy_request=privacy_request,
)

# Verify the extracted location convenience fields match expected
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

are the comments removed on purpose? I like comments in long tests, it helps read through what the test is doing

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Some of them felt redundant, I am probably just too close to it! Thanks for the feedback, I will put them back!

Comment on lines -669 to -671
# No conditional dependencies created

# Extract the data
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same question for this test

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Putting them back :)

"""Test that manual task traversal executes correctly with conditional dependencies and upstream data"""

@pytest.mark.usefixtures("condition_gt_18", "condition_eq_active")
@pytest.mark.usefixtures("group_condition")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

before we were using some other conditions here, are those not relevant for this test anymore?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since all the conditions will now just be in the condition tree instead of spread out across rows. We only need the group condition.

Comment on lines +947 to +949
@pytest.fixture()
def condition_gt_18(db: Session, manual_task: ManualTask):
"""Create a conditional dependency with field_address 'user.age' and operator 'gte' and value 18"""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

there were tests that used this fixture but no longer do so, is that an intentional decision?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Its being used, but it looks like it is only used in 1 place now. I can probably just clean that up. It is using the create_condition_gt_18_tree() which adds the condition in dict form and is used a lot more widely now.

@JadeCara JadeCara added this pull request to the merge queue Jan 12, 2026
Merged via the queue into main with commit bcfc6ad Jan 12, 2026
51 of 52 checks passed
@JadeCara JadeCara deleted the ENG-2185-remove-unused-cols branch January 12, 2026 22:27
JadeCara added a commit that referenced this pull request Jan 13, 2026
Co-authored-by: Jade Wibbels <jade@ethyca.com>
mfbrown pushed a commit that referenced this pull request Jan 27, 2026
Co-authored-by: Jade Wibbels <jade@ethyca.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.

2 participants