-
Notifications
You must be signed in to change notification settings - Fork 86
[ENG-1404] Duplicate DSR - runner integration #6860
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
Changes from 146 commits
49d77ce
ea4fecd
1114b17
1af8571
c5ee7c2
4623459
7288af3
3beec51
aa008ea
25b64e6
266a716
0006a61
473f04e
7ef5703
a4ead46
94eeaf6
ab760a5
71ca1c0
6e4e57c
a44d017
38d739d
0feb90c
180460f
68b4cfa
e404cfb
b0d00ed
50d0d16
2d7ab2b
fa3052e
082c99a
c328acc
cc61426
d340cb8
66dc29a
ded7171
b2d9d48
38eef26
973ea32
495a454
180bac0
37bf572
f951b23
ae41918
ada551b
638fd3f
c0b3470
5454ecd
ff4a31f
9c9f1fd
17c77b7
d1b781b
e972ee7
1284885
6781aed
03cf158
e99a87a
ea5b7a5
b3ff7b9
4862320
23e434f
eae970b
1663797
ad0cf2d
c3a23c0
bab5293
cb56f70
9f083ae
dfc2ef1
300c9b9
a86715d
b7440cc
8969999
d8bb57e
720d5d1
057176f
e4ac4ba
167ba3f
4feb500
3c8d77f
d551601
846cd64
42fdb1d
d4ccff3
c67da62
72578d8
c1b1269
a9400fb
78ae4e5
95bf81c
63c6048
e96b91c
000b0d3
0e98d06
58e8b1b
369ddbe
cd66519
9400fe5
6a35f07
4b25171
5e000be
4e1a40f
3ca1228
ff3eaa5
07a4e15
7408e09
af63f91
cb5db8b
f05b503
8d289b6
583cad5
b50ab9c
40bc68d
921aa6d
5cc32d6
4e49d97
ff58137
6e02bea
dfa41cb
f7884d2
0f2dde4
7ae2e6a
bc487fa
4ff8144
7a59899
86f8ed7
742a60c
f579a9f
1c0fbd7
9373b8d
904dc3e
2a59c67
ea2ead1
20c7eb0
9db13b3
fb9e3a3
9710c1c
a4de7ea
08f8014
f57f4a5
575ca2e
8bca866
cb3b621
761f918
1b72113
b3534d8
c762467
1d3ca0a
3188fa4
6e6af19
7405cf8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,6 +71,9 @@ | |
| get_attachments_content, | ||
| process_attachments_for_upload, | ||
| ) | ||
| from fides.api.service.privacy_request.duplication_detection import ( | ||
| DuplicateDetectionService, | ||
| ) | ||
| from fides.api.service.storage.storage_uploader_service import upload | ||
| from fides.api.task.filter_results import filter_data_categories | ||
| from fides.api.task.graph_runners import access_runner, consent_runner, erasure_runner | ||
|
|
@@ -446,6 +449,19 @@ def run_privacy_request( | |
| logger.info("Terminating privacy request: request deleted.") | ||
| return | ||
|
|
||
| duplicate_detection_service = DuplicateDetectionService(session) | ||
| # Service initializes with ConfigProxy, so we can check if duplicate detection is enabled | ||
| if duplicate_detection_service.config.enabled: | ||
|
||
| logger.info( | ||
| "Duplicate detection is enabled. Checking if privacy request is a duplicate." | ||
| ) | ||
| if duplicate_detection_service.is_duplicate_request(privacy_request): | ||
| logger.info("Terminating privacy request: request is a duplicate.") | ||
| privacy_request.update( | ||
| session, data={"status": PrivacyRequestStatus.duplicate} | ||
| ) | ||
| return | ||
|
|
||
| logger.info("Dispatching privacy request") | ||
| privacy_request.start_processing(session) | ||
|
|
||
|
|
||
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.
I might makes this
_configbecause people probably shouldn't be accessing it directly, and just hide whatever we are using in a public property (likeenabled)