Skip to content

Conversation

@Vagoasdf
Copy link
Contributor

@Vagoasdf Vagoasdf commented Oct 30, 2025

Ticket INTS-334

Description Of Changes

Allows for Optional Poling results on Request overrides for polling access requests.

Code Changes

  • Added Optional as a possible return for Access Polling overrides
  • Added check on sub requsts results for empty results to avoid errors

Steps to Confirm

  1. Pair with https://github.com/ethyca/fidesplus/pull/2712
  2. Create an access request with a random email (I.E empty@ethyca.com)
  3. Wait for the access request to end
  4. The Privacy request should be empty and should not error out

Tests for this path are present on the Paired PR, for the none-data on access

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 Oct 30, 2025

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

Project Deployment Preview Comments Updated (UTC)
fides-plus-nightly Ready Ready Preview Comment Oct 31, 2025 1:55pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
fides-privacy-center Ignored Ignored Oct 31, 2025 1:55pm

@Vagoasdf Vagoasdf force-pushed the INTS-334-Bazaarvoice-allow-optional-return-on-polling-override branch from 453de90 to 9eb3b43 Compare October 30, 2025 15:24
@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

❌ Patch coverage is 14.28571% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.47%. Comparing base (44024ab) to head (a6b3a2c).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...async_dsr/strategies/async_dsr_strategy_polling.py 0.00% 5 Missing ⚠️
...vice/saas_request/saas_request_override_factory.py 50.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (14.28%) 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    #6887      +/-   ##
==========================================
- Coverage   87.47%   87.47%   -0.01%     
==========================================
  Files         523      523              
  Lines       34088    34090       +2     
  Branches     3916     3917       +1     
==========================================
  Hits        29820    29820              
- Misses       3412     3414       +2     
  Partials      856      856              

☔ 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 marked this pull request as ready for review October 30, 2025 18:14
@Vagoasdf Vagoasdf requested a review from a team as a code owner October 30, 2025 18:14
@Vagoasdf Vagoasdf requested review from adamsachs and removed request for a team October 30, 2025 18:14
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

Allows polling access request overrides to return Optional[PollingResult] to handle cases where no data is available for access requests.

  • Updated validate_polling_result_override_function to accept Optional[PollingResult] as valid return type
  • Added null check in _process_completed_sub_request to skip result storage when polling result is None
  • Sub-requests with empty results are marked complete but excluded from aggregation

Confidence Score: 4/5

  • This PR is safe to merge with minor observability concerns
  • The changes correctly implement optional polling results, but the implementation silently handles None values without logging, which could make debugging harder if override functions have bugs. The core logic is sound - empty results are properly excluded from aggregation.
  • No files require special attention - changes are straightforward and localized

Important Files Changed

File Analysis

Filename Score Overview
src/fides/api/service/saas_request/saas_request_override_factory.py 5/5 Added Optional import and updated polling result override validation to accept Optional[PollingResult] return type
src/fides/api/service/async_dsr/strategies/async_dsr_strategy_polling.py 4/5 Added null check for polling results to handle empty responses, but sub-request completion logic may silently hide errors

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines 554 to 563
# Checks if we have a polling result, response could be empty in case there was no data to access
if polling_result:
# Ensure we have the expected polling result type
if not isinstance(polling_result, PollingResult):
raise PrivacyRequestError(
"Polling result must be PollingResult instance"
)

# Store results on the sub-request
self._store_sub_request_result(polling_result, sub_request, polling_task)
# Store results on the sub-request
self._store_sub_request_result(polling_result, sub_request, polling_task)
Copy link
Contributor

Choose a reason for hiding this comment

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

style: this silently marks the sub-request as complete even when polling_result is None, which could hide bugs in override functions. consider logging when polling_result is None to distinguish between legitimate empty results and potential errors

Suggested change
# Checks if we have a polling result, response could be empty in case there was no data to access
if polling_result:
# Ensure we have the expected polling result type
if not isinstance(polling_result, PollingResult):
raise PrivacyRequestError(
"Polling result must be PollingResult instance"
)
# Store results on the sub-request
self._store_sub_request_result(polling_result, sub_request, polling_task)
# Store results on the sub-request
self._store_sub_request_result(polling_result, sub_request, polling_task)
# Checks if we have a polling result, response could be empty in case there was no data to access
if polling_result:
# Ensure we have the expected polling result type
if not isinstance(polling_result, PollingResult):
raise PrivacyRequestError(
"Polling result must be PollingResult instance"
)
# Store results on the sub-request
self._store_sub_request_result(polling_result, sub_request, polling_task)
else:
logger.info(
f"Sub-request {sub_request.id} completed with no data (empty result)"
)

@Vagoasdf Vagoasdf requested a review from Linker44 October 30, 2025 19:04
@Linker44
Copy link
Contributor

Can we add a simple test for this?

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.

good to go

@Vagoasdf Vagoasdf added this pull request to the merge queue Oct 31, 2025
@adamsachs adamsachs removed their request for review October 31, 2025 15:24
Merged via the queue into main with commit 3a382cb Oct 31, 2025
67 of 68 checks passed
@Vagoasdf Vagoasdf deleted the INTS-334-Bazaarvoice-allow-optional-return-on-polling-override branch October 31, 2025 15:27
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