Skip to content

Conversation

@Vagoasdf
Copy link
Contributor

@Vagoasdf Vagoasdf commented Nov 5, 2025

Ticket INTS-334

Description Of Changes

Adding missing ignore_error support on send.
The task still would still be failing, but the error thrown is more detailed that the classic

Before
imagen

After
imagen

Code Changes

Steps to Confirm

  1. Run Bazaarvoice Access request for any email twice in a row. Error should be expanded

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

vercel bot commented Nov 5, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Nov 10, 2025 7:59pm
fides-privacy-center Ignored Ignored Nov 10, 2025 7:59pm

@Vagoasdf Vagoasdf marked this pull request as ready for review November 5, 2025 19:18
@Vagoasdf Vagoasdf requested a review from a team as a code owner November 5, 2025 19:18
@Vagoasdf Vagoasdf requested review from vcruces and removed request for a team November 5, 2025 19:18
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 adds ignore_errors parameter support to initial async DSR requests (both access and erasure operations) by passing it to client.send() calls. However, the implementation has critical logic errors.

Key Changes:

  • Line 313: Added read_request.ignore_errors parameter to client.send() for access requests
  • Line 366: Added request.ignore_errors parameter to client.send() for erasure requests
  • Lines 368-371: Added error checking for erasure requests

Critical Issue:
The code passes ignore_errors to client.send() but then immediately raises an exception if response.ok is false. This defeats the purpose of ignore_errors - when errors are configured to be ignored, client.send() already handles them by returning the response without raising. The subsequent unconditional checks will raise exceptions even when errors should be ignored.

Impact:
This will cause requests to fail even when ignore_errors is configured, preventing the intended behavior described in the PR description.

Confidence Score: 1/5

  • This PR contains critical logic errors that prevent it from working as intended
  • The implementation contradicts itself by passing ignore_errors to client.send() then unconditionally raising exceptions on non-OK responses. This will cause requests to fail even when errors should be ignored, breaking the core functionality the PR aims to add.
  • src/fides/api/service/async_dsr/strategies/async_dsr_strategy_polling.py requires immediate attention - both error handling blocks need to be fixed

Important Files Changed

File Analysis

Filename Score Overview
src/fides/api/service/async_dsr/strategies/async_dsr_strategy_polling.py 3/5 Added ignore_errors support to initial requests, but error handling logic conflicts with the intended behavior of ignore_errors

Additional Comments (1)

  1. src/fides/api/service/async_dsr/strategies/async_dsr_strategy_polling.py, line 313-318 (link)

    logic: Contradictory logic: passing ignore_errors to client.send() then immediately raising exception if !response.ok defeats the purpose of ignore_errors. When ignore_errors=True or specific status codes are ignored, client.send() returns the response without raising, making the subsequent check incorrect.

    If ignore_errors is configured, the error should be logged/handled differently rather than always raising FidesopsException.

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment on lines 366 to +371
response = client.send(prepared_request, request.ignore_errors)

if not response.ok:
raise FidesopsException(
f"Initial erasure request failed with status code {response.status_code}: {response.text}"
)
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Same contradictory logic as line 313: passing request.ignore_errors to client.send() then raising exception if !response.ok defeats the purpose. The ignore_errors flag should determine whether to raise here.

Consider:

if not response.ok and not request.ignore_errors:
    raise FidesopsException(...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For future documentation: I Agree, however, directly ignoring the error like we do for other requests would just keep the polling going on. More work is required to gracefully handle errors here

@Vagoasdf Vagoasdf requested a review from Linker44 November 5, 2025 19:29
@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.31%. Comparing base (9672d8d) to head (fa4d7db).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...async_dsr/strategies/async_dsr_strategy_polling.py 33.33% 2 Missing ⚠️

❌ Your patch status has failed because the patch coverage (33.33%) 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    #6924   +/-   ##
=======================================
  Coverage   87.30%   87.31%           
=======================================
  Files         524      524           
  Lines       34382    34384    +2     
  Branches     3957     3958    +1     
=======================================
+ Hits        30017    30022    +5     
+ Misses       3505     3500    -5     
- Partials      860      862    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Vagoasdf Vagoasdf removed the request for review from vcruces November 6, 2025 14:34
Copy link
Contributor

@Linker44 Linker44 left a comment

Choose a reason for hiding this comment

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

looks good!

@Vagoasdf Vagoasdf added this pull request to the merge queue Nov 11, 2025
Merged via the queue into main with commit d30da14 Nov 11, 2025
68 of 69 checks passed
@Vagoasdf Vagoasdf deleted the INTS-334_Adding-ignore-error-support branch November 11, 2025 13:43
@greptile-apps greptile-apps bot mentioned this pull request Nov 11, 2025
jjdaurora pushed a commit that referenced this pull request Dec 5, 2025
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