-
Notifications
You must be signed in to change notification settings - Fork 84
Ints 334 bazaarvoice allow optional return on polling override #6887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ints 334 bazaarvoice allow optional return on polling override #6887
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
453de90 to
9eb3b43
Compare
Codecov Report❌ Patch coverage is
❌ 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. 🚀 New features to boost your workflow:
|
…n-polling-override
There was a problem hiding this 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_functionto acceptOptional[PollingResult]as valid return type - Added null check in
_process_completed_sub_requestto skip result storage when polling result isNone - 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
Nonevalues 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
| # 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) |
There was a problem hiding this comment.
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
| # 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)" | |
| ) |
|
Can we add a simple test for this? |
Linker44
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to go
…n-polling-override
Ticket INTS-334
Description Of Changes
Allows for Optional Poling results on Request overrides for polling access requests.
Code Changes
Steps to Confirm
Tests for this path are present on the Paired PR, for the none-data on access
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works