Skip to content

DB migration and initial refactor#5984

Merged
galvana merged 15 commits intomainfrom
LJ-553-db-migrations-and-initial-refactor
Apr 7, 2025
Merged

DB migration and initial refactor#5984
galvana merged 15 commits intomainfrom
LJ-553-db-migrations-and-initial-refactor

Conversation

@galvana
Copy link
Copy Markdown
Contributor

@galvana galvana commented Apr 2, 2025

Description Of Changes

Starting point for https://ethyca.atlassian.net/browse/LJ-553. Separating out these changes first to not distract the main diff in a later PR

Code Changes

  • DB migrations to add password_login_enabled and totp_secret to the fidesuser table
  • Refactoring of the existing UserService into the current style

Steps to Confirm

  1. Tests should pass, no new functionality. The new table columns don't have any logic yet

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

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 2, 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 Apr 7, 2025 4:31pm
fides-privacy-center ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 7, 2025 4:31pm

Comment thread src/fides/service/user/user_service.py
Copy link
Copy Markdown
Contributor

@JadeCara JadeCara left a comment

Choose a reason for hiding this comment

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

Only question - are there any unit tests for the service code? This might be a good opportunity to add some. :)

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 2, 2025

Codecov Report

Attention: Patch coverage is 85.18519% with 12 lines in your changes missing coverage. Please review.

Project coverage is 86.94%. Comparing base (8ce92e8) to head (9d7d69b).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/fides/service/user/user_service.py 85.71% 5 Missing and 3 partials ⚠️
src/fides/api/models/fides_user.py 83.33% 1 Missing and 1 partial ⚠️
src/fides/api/models/fides_user_invite.py 0.00% 1 Missing and 1 partial ⚠️

❌ Your patch status has failed because the patch coverage (85.18%) 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             @@
##             main    #5984      +/-   ##
==========================================
- Coverage   86.95%   86.94%   -0.01%     
==========================================
  Files         418      418              
  Lines       25736    25757      +21     
  Branches     2779     2782       +3     
==========================================
+ Hits        22378    22395      +17     
- Misses       2758     2760       +2     
- Partials      600      602       +2     

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

@galvana galvana merged commit 5ca76c9 into main Apr 7, 2025
39 of 40 checks passed
@galvana galvana deleted the LJ-553-db-migrations-and-initial-refactor branch April 7, 2025 18:00
@cypress
Copy link
Copy Markdown

cypress Bot commented Apr 7, 2025

fides    Run #12770

Run Properties:  status check passed Passed #12770  •  git commit 5ca76c9396: DB migration and initial refactor (#5984)
Project fides
Branch Review main
Run status status check passed Passed #12770
Run duration 00m 49s
Commit git commit 5ca76c9396: DB migration and initial refactor (#5984)
Committer Adrian Galvan
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