-
Notifications
You must be signed in to change notification settings - Fork 72
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
PROD-2700 Implement Soft Delete for PrivacyRequests #5321
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
revision = "75bb9ee843f5" | ||
down_revision = "9de4bb76307a" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to self: remember to update before merging
fides Run #10196
Run Properties:
|
Project |
fides
|
Branch Review |
refs/pull/5321/merge
|
Run status |
Passed #10196
|
Run duration | 00m 40s |
Commit |
42ddaa1100 ℹ️: Merge bf1cc0e21fa930a387a04104d2013d804cb11ae5 into feeeae1569e506af354d0adbde8b...
|
Committer | erosselli |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
4
|
Upgrade your plan to view test results. | |
View all changes introduced in this branch ↗︎ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wanted to call out that I tried to filter out the deleted requests from the places where it made sense, but also I don't know if I found all the places where we get a list of privacy requests. Wanted to point it out to get some extra eyes around that if possible
starting review - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty good but let's step back for a second and clarify with product about expected behavior around "soft deletes". What should be able to be retrieved about a privacy request once it has been soft deleted?
src/fides/api/alembic/migrations/versions/75bb9ee843f5_add_soft_delete_for_privacy_request.py
Outdated
Show resolved
Hide resolved
reviewing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me but I didn't do an additional round of testing - leaving that to you @erosselli !
36022fa
to
386c2ab
Compare
|
||
# revision identifiers, used by Alembic. | ||
revision = "75bb9ee843f5" | ||
down_revision = "68c590ff6e89" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check before merging
e72e867
to
1e8b546
Compare
1e8b546
to
bf1cc0e
Compare
fides Run #10203
Run Properties:
|
Project |
fides
|
Branch Review |
main
|
Run status |
Passed #10203
|
Run duration | 00m 37s |
Commit |
96cc4e17fa: PROD-2700 Implement Soft Delete for PrivacyRequests (#5321)
|
Committer | erosselli |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
4
|
Upgrade your plan to view test results. | |
View all changes introduced in this branch ↗︎ |
Closes PROD-2700
Description Of Changes
Adds support for soft deleting
PrivacyRequests
. The deletion is defined by the new columndeleted_at
, and we also stored who deleted it in thedeleted_by
column. A newPOST /privacy-request/id/soft-delete
endpoint is added in order to allow soft deleting requests, as well as an endpoint to bulk delete multiple requests at the same timePOST /privacy-request/bulk/soft-delete
.Code Changes
deleted_at
anddeleted_by
toPrivacyRequest
, both nullablePOST /privacy-request/id/soft-delete
and for bulk deleting themPOST /privacy-request/bulk/soft-delete
include_deleted_requests
, that isFalse
by defaultSteps to Confirm
Error cases
Trying to do anything that modifies the deleted privacy request should cause a 422 error. Some examples:
Pre-Merge Checklist
CHANGELOG.md
main
downgrade()
migration is correct and works