[ENG-2613] Make privacy request diagnostics endpoint return download URL instead of direct json payload#7481
Merged
nreyes-dev merged 9 commits intomainfrom Feb 26, 2026
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
This comment was marked as resolved.
This comment was marked as resolved.
src/fides/service/privacy_request/privacy_request_diagnostics.py
Outdated
Show resolved
Hide resolved
Contributor
Author
|
@greptileai re-review pls |
src/fides/service/privacy_request/privacy_request_diagnostics.py
Outdated
Show resolved
Hide resolved
src/fides/service/privacy_request/privacy_request_diagnostics.py
Outdated
Show resolved
Hide resolved
src/fides/service/privacy_request/privacy_request_diagnostics.py
Outdated
Show resolved
Hide resolved
This comment was marked as resolved.
This comment was marked as resolved.
galvana
approved these changes
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make privacy request diagnostics endpoint return download URL instead of direct json payload
Ticket ENG-2613
Description Of Changes
Endpoint behavior change
Before:
GET /privacy-request/{privacy_request_id}/diagnosticsreturns the diagnostics JSON payload directly.New: the endpoint generates a ZIP file, uploads it to storage, and returns a JSON response containing a downloadable URL (freshly generated signed/presigned URL) rather than returning the full diagnostics inline.
Refactor: module split / code organization
The diagnostics feature has been reorganized into a dedicated module for clearer separation of concerns:
src/fides/service/privacy_request/privacy_request_diagnostics.py→ moved intosrc/fides/service/privacy_request/diagnostics/gather.py(data-gathering logic)src/fides/service/privacy_request/diagnostics/schemas.py: Pydantic schemas for non-PII diagnostics payload + export responsegather.py: DB/query helpers to assemble the diagnostics payloadexport.py: ZIP serialization + upload + signed URL generationexceptions.py:DefaultStorageNotConfiguredError__init__.py: re-exports the public APIStorageConfig selection (behavior change)
Diagnostics exports now use the active default storage configuration via
get_active_default_storage_config(db).Artifact naming and storage key layout
Always upload a ZIP named like:
privacy-request-diagnostics/{privacy_request_id}/{timestamp}-{random}.zip20260226T185655Z)Unit Tests
Updated existing diagnostics endpoint tests to assert:
download_url(and not the full JSON payload)422behavior when default storage isn’t configureddiagnostics.jsonand excludes raw identity valuesSteps to Confirm
GET /privacy-request/{privacy_request_id}/diagnosticsfor any existingprivacy_request_id.download_url,object_key, andstorage_type.privacy_request_idand confirm a new export is generated each time (differentobject_key) and the URL is freshly generated each time.Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works