Skip to content

Conversation

@galvana
Copy link
Contributor

@galvana galvana commented Jan 9, 2026

Ticket ENG-2324

Description Of Changes

When a privacy request is retried via the Admin UI, the retry endpoint previously checked if identity data was still in the Redis cache. If the cache had expired (which can happen for long-running or stuck requests), the endpoint would automatically trigger a full resubmit of the request instead of a retry.

This was a workaround because verify_cache_for_identity_data() only checked the cache and didn't fall back to the database. Now that verify_cache_for_identity_data() properly falls back to the persisted identity data in the database when the cache is empty (#6896), this auto-resubmit fallback is no longer necessary and can be removed.

This simplifies the retry flow and ensures that clicking "Reprocess" in the Admin UI actually retries the request rather than unexpectedly resubmitting it.

Code Changes

  • Removed the auto-resubmit fallback from restart_privacy_request_from_failure endpoint in privacy_request_endpoints.py

Steps to Confirm

  1. Create a privacy request that goes into an error state
  2. Wait for the Redis identity cache to expire (or manually clear it)
  3. Click "Reprocess" in the Admin UI
  4. Confirm the request is retried (not resubmitted) - the request ID should remain the same
  5. Confirm the identity data is successfully retrieved from the database and re-cached

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
    • Updates unreleased work already in Changelog, no new entry necessary
  • UX feedback:
    • All UX related changes have been reviewed by a designer
    • No UX review needed
  • Followup issues:
    • Followup issues created
    • 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

@galvana galvana requested a review from a team as a code owner January 9, 2026 21:34
@galvana galvana requested review from erosselli and removed request for a team January 9, 2026 21:34
@vercel
Copy link
Contributor

vercel bot commented Jan 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Review Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Jan 9, 2026 9:38pm
fides-privacy-center Ignored Ignored Jan 9, 2026 9:38pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR removes the auto-resubmit functionality for privacy requests with expired identity data. The changes are straightforward and safe:

Key Changes

  • Removed 11 lines of code from restart_privacy_request_from_failure endpoint that automatically resubmitted requests when identity cache was expired
  • Removed the verify_cache_for_identity_data() method which was only used by the auto-resubmit logic

Context

The auto-resubmit logic was introduced after PR #6896 added fallback-to-database functionality. Since get_cached_identity_data() now automatically falls back to the database when cache expires, the auto-resubmit is no longer necessary. Privacy requests can proceed normally even with expired cache.

Review Notes

  • No test coverage found for the removed auto-resubmit functionality
  • The resubmit_privacy_request endpoint and service method remain available for manual resubmission if needed
  • The removal is clean with no dangling references

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The changes are minimal, well-contained, and simply remove a now-unnecessary workaround. The fallback-to-database functionality (added in #6896) already handles expired cache gracefully, making the auto-resubmit logic redundant. No breaking changes or side effects identified.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
src/fides/api/api/v1/endpoints/privacy_request_endpoints.py 5/5 Removed auto-resubmit logic for privacy requests with expired identity data. The removal is clean and doesn't affect any other functionality since the fallback to DB (added in #6896) already handles expired cache gracefully.
src/fides/api/models/privacy_request/privacy_request.py 5/5 Removed unused verify_cache_for_identity_data() method which was only used by the now-removed auto-resubmit logic. The method had no other references in the codebase.

Copy link
Contributor

@erosselli erosselli left a comment

Choose a reason for hiding this comment

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

Actually -- we don;t store derived identities in the DB, so we'd need to check if the request has derived identities and re-submit then still :)

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.

3 participants