-
Notifications
You must be signed in to change notification settings - Fork 84
Move DSR attachments into main clickme.html #7033
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Greptile OverviewGreptile SummaryThis PR consolidates DSR access package attachments from a separate Key Changes:
Issues Found:
Confidence Score: 3/5
Important Files ChangedFile Analysis
|
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.
Additional Comments (1)
-
src/fides/api/service/privacy_request/dsr_package/dsr_report_builder.py, line 419-472 (link)logic: tests still expect
attachments/index.htmlto exist in the zip file but this PR removes the code that creates itmultiple tests in
test_dsr_attachments.pyexplicitly check for and read fromattachments/index.html:- line 22 in
EXPECTED_FILES - lines 51, 56, 96, 133, 169, 327, 401, 405, 707, 883, 959, 1037
these tests will fail because the file is no longer generated
- line 22 in
2 files reviewed, 1 comment
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (92.30%) 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 #7033 +/- ##
=======================================
Coverage 87.24% 87.24%
=======================================
Files 532 532
Lines 34900 34896 -4
Branches 4036 4037 +1
=======================================
- Hits 30448 30446 -2
+ Misses 3570 3567 -3
- Partials 882 883 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Additional Comments (1)
-
src/fides/api/api/v1/endpoints/messaging_endpoints.py, line 326-336 (link)logic: exception handler order was swapped, which changes the logging behavior. Before:
ValueError/KeyErrorexceptions were logged with error details. After:ValidationErrorexceptions are caught first and not logged. This change appears unrelated to moving DSR attachments and may have been introduced during merge conflict resolution. The original order should be restored:
6 files reviewed, 1 comment
johnewart
left a comment
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 just have a few comments / questions; I don't see anything blocking so I will approve it but, if they're easy to do and make sense, you might be able to reduce a lot of overhead 😄
| ) | ||
| except (ValueError, KeyError) as e: | ||
| logger.error(f"Invalid secrets found on {messaging_config.service_type.value} messaging configuration: {Pii(str(e))}") # type: ignore | ||
| except ValidationError: |
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.
Can we fold this into the other errors and have one except block? Looks like the behavior is identical (except the logger) for ValueError, KeyError and ValidationError
| heading: Optional[str] = None, | ||
| description: Optional[str] = None, | ||
| data: Optional[dict[str, Any]] = None, | ||
| **kwargs: Any, |
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.
Is there a reason to not use extra_template_data: Optional[dict[str, Any]]? Taking a splat means if you need a new argument later, it becomes extra work (and then it's also clear what the data is used for).
| class TestDSRReportBuilderAttachments(TestDSRReportBuilderBase): | ||
| """Tests for attachment handling in DSR reports""" | ||
|
|
||
| def test_webhook_attachments( |
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.
These test changes make sense but it also looks like we could reduce the number of nearly-duplicated tests if we had a few parameterized tests - it looks they all do (more-or-less) the exact same thing only looking for different strings. If it's reasonable to do, consider consolidating them to cut down on complexity 😄
Ticket ENG-1398
Description Of Changes
Moves the files previously in
./attachments.htmlin DSR access packages to be in the mainclickme.html.Steps to Confirm
execution.require_manual_request_approvalto trueattachment_typeofinclude_with_access_packageclickme.htmland there should be noattachmentsfolderPre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works