Skip to content

batch emails now check for action types#7271

Merged
JadeCara merged 5 commits intomainfrom
consent_erasure_email_error
Jan 29, 2026
Merged

batch emails now check for action types#7271
JadeCara merged 5 commits intomainfrom
consent_erasure_email_error

Conversation

@JadeCara
Copy link
Copy Markdown
Contributor

@JadeCara JadeCara commented Jan 29, 2026

Ticket ENG-2467

Description Of Changes

When consent DSRs run they still check all of the erasure email connection configs which can cause errors unrelated to consent requests.

Screenshot 2026-01-29 at 11 55 42 AM

Additionally if a consent request has multiple rules ie consent and erasure it will only send the erasure email regardless of how the config/toggles are set.

Code Changes

  • src/fides/api/service/connectors/base_erasure_email_connector.py - removes artificial restriction from erasure emails
  • src/fides/api/service/request_runner_service.py - Optimized needs_batch_email_send() to only check connectors relevant to the policy's action types
  • test_request_runner_service.py - Added regression test to prevent future issues

Steps to Confirm

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

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Jan 29, 2026

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

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Jan 29, 2026 8:21pm
fides-privacy-center Ignored Ignored Jan 29, 2026 8:21pm

Request Review

Jade Wibbels added 2 commits January 29, 2026 12:09
@JadeCara JadeCara marked this pull request as ready for review January 29, 2026 19:18
@JadeCara JadeCara requested a review from a team as a code owner January 29, 2026 19:18
@JadeCara JadeCara requested review from erosselli and removed request for a team January 29, 2026 19:18
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Jan 29, 2026

Greptile Overview

Greptile Summary

Fixed a bug where consent/erasure DSRs were checking all email connectors regardless of policy action types, which caused errors when irrelevant connectors were misconfigured. The needs_batch_email_send() function now filters connectors based on the policy's action types:

  • Consent-only policies now only check consent email connectors
  • Erasure-only policies now only check erasure email connectors
  • Policies with multiple action types check all relevant connector types

The fix includes a comprehensive regression test that verifies misconfigured connectors of the wrong type don't cause errors.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are well-scoped, logically sound, and include comprehensive test coverage. The optimization prevents unnecessary connector checks and eliminates a class of configuration errors.
  • No files require special attention

Important Files Changed

Filename Overview
src/fides/api/service/privacy_request/request_runner_service.py Optimized to only check email connectors matching policy action types
tests/ops/service/privacy_request/test_request_runner_service.py Added regression test to verify policies only check relevant connectors

Copy link
Copy Markdown
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.

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Jade Wibbels added 2 commits January 29, 2026 12:57
@JadeCara
Copy link
Copy Markdown
Contributor Author

@greptile please review

Copy link
Copy Markdown
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.

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if this is going into the release, update the changelog.md directly :) since it's already been created

@JadeCara JadeCara enabled auto-merge January 29, 2026 20:33
@JadeCara JadeCara added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit 0b3c39c Jan 29, 2026
55 checks passed
@JadeCara JadeCara deleted the consent_erasure_email_error branch January 29, 2026 21:05
JadeCara added a commit that referenced this pull request Jan 29, 2026
Co-authored-by: Jade Wibbels <jade@ethyca.com>
@greptile-apps greptile-apps bot mentioned this pull request Feb 3, 2026
18 tasks
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.

2 participants