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

LJ-369 Moved ExecutionLogs into its own file, added tests #5903

Conversation

JadeCara
Copy link
Contributor

@JadeCara JadeCara commented Mar 18, 2025

Description Of Changes

Doing some clean up and adding some unit tests for elements in src/fides/api/models/privacy_requests.py. This file has gotten really large so moving this into a directory and breaking out well defined elements into their own files. This will also make adding unit tests less cumbersome.

This PR splits out Execution Log specific elements into their own file. I have also added several unit tests for each class/function.

Previous PR:

Current PR:

  • execution_logs.py - ExecutionLogs, EXECUTION_CHECKPOINTS, COMPLETED_EXECUTION_LOG_STATUSES, EXITED_EXECUTION_LOG_STATUSES, can_run_checkpoint

Future PRs in the pipeline will further break out:

Code Changes

  • Added src/fides/api/models/privacy_requests/execution_logs.py and moved ExecutionLogs, EXECUTION_CHECKPOINTS, COMPLETED_EXECUTION_LOG_STATUSES, EXITED_EXECUTION_LOG_STATUSES, can_run_checkpoint to that file
  • Added import statements to the __init__.py so that existing imports will continue to work.
  • Added unit tests for ExecutionLogs class and can_run_checkpoint.

Steps to Confirm

  1. There should be no change in functionality. All 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
  • 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 Mar 18, 2025

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

Name Status Preview Comments Updated (UTC)
fides-privacy-center ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 19, 2025 11:50pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Visit Preview Mar 19, 2025 11:50pm

@JadeCara JadeCara changed the title Lj 369 be update privacy requests class with comments and attachments pr2 LJ-369 Moved ExecutionLogs into its own file, added tests Mar 18, 2025
Copy link

codecov bot commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.03%. Comparing base (6750aa8) to head (4a6ba1b).

Additional details and impacted files
@@                                            Coverage Diff                                             @@
##           LJ-369-be-update-privacy-requests-class-with-comments-and-attachments_pr1    #5903   +/-   ##
==========================================================================================================
  Coverage                                                                      87.02%   87.03%           
==========================================================================================================
  Files                                                                            410      411    +1     
  Lines                                                                          25417    25428   +11     
  Branches                                                                        2749     2749           
==========================================================================================================
+ Hits                                                                           22120    22131   +11     
  Misses                                                                          2704     2704           
  Partials                                                                         593      593           

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

…nd-attachments_pr1' into LJ-369-be-update-privacy-requests-class-with-comments-and-attachments_pr2
Jade Wibbels and others added 2 commits March 19, 2025 08:45
…nd-attachments_pr1' into LJ-369-be-update-privacy-requests-class-with-comments-and-attachments_pr2
…nd-attachments_pr1' into LJ-369-be-update-privacy-requests-class-with-comments-and-attachments_pr2
@galvana galvana self-requested a review March 19, 2025 17:52
Base automatically changed from LJ-369-be-update-privacy-requests-class-with-comments-and-attachments_pr1 to main March 19, 2025 18:33
@JadeCara JadeCara requested a review from a team as a code owner March 19, 2025 18:33
@JadeCara JadeCara merged commit 2341db0 into main Mar 20, 2025
34 of 36 checks passed
@JadeCara JadeCara deleted the LJ-369-be-update-privacy-requests-class-with-comments-and-attachments_pr2 branch March 20, 2025 14:22
Copy link

cypress bot commented Mar 20, 2025

fides    Run #12693

Run Properties:  status check passed Passed #12693  •  git commit 2341db0903: LJ-369 Moved ExecutionLogs into its own file, added tests (#5903)
Project fides
Branch Review main
Run status status check passed Passed #12693
Run duration 00m 53s
Commit git commit 2341db0903: LJ-369 Moved ExecutionLogs into its own file, added tests (#5903)
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
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