-
Notifications
You must be signed in to change notification settings - Fork 20
feat(documents): add support for non blocking IXP validation #1095
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
base: main
Are you sure you want to change the base?
feat(documents): add support for non blocking IXP validation #1095
Conversation
04271ef to
72ddae5
Compare
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.
Pull request overview
This PR adds non-blocking IXP extraction validation support to the Documents service, allowing developers to start validation actions and retrieve results asynchronously without blocking. The implementation also refactors exception handling by introducing reusable base exception classes.
Changes:
- Added
start_ixp_extraction_validation()andretrieve_ixp_extraction_validation_result()methods for non-blocking validation workflows - Introduced
OperationNotCompleteExceptionandOperationFailedExceptionas reusable exception classes - Refactored existing extraction result retrieval to use the new shared exception handling logic
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/uipath/platform/errors/_operation_not_complete_exception.py | New reusable exception for incomplete operations |
| src/uipath/platform/errors/_operation_failed_exception.py | New reusable exception for failed operations |
| src/uipath/platform/errors/_ixp_extraction_not_complete_exception.py | Refactored to inherit from OperationNotCompleteException |
| src/uipath/platform/errors/init.py | Exports new exception classes |
| src/uipath/platform/documents/documents.py | Added validated_extraction_result and data_projection fields to ValidateExtractionAction; refactored StartExtractionResponse to inherit from new StartOperationResponse |
| src/uipath/platform/documents/_documents_service.py | Added new IXP validation methods and refactored internal helpers for operation result retrieval |
| src/uipath/platform/documents/init.py | Exports StartOperationResponse |
| tests/sdk/services/test_documents_service.py | Comprehensive test coverage for new methods and error scenarios |
| tests/sdk/services/tests_data/documents_service/extraction_validation_action_response_unassigned.json | Test data for unassigned validation action |
| tests/sdk/services/tests_data/documents_service/extraction_validation_action_response_completed.json | Test data for completed validation action |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7b9d054 to
8d914d8
Compare
| validated_extraction_result: Optional[ExtractionResult] = Field( | ||
| alias="validatedExtractionResults", default=None | ||
| ) | ||
| data_projection: Optional[List[FieldGroupValueProjection]] = Field( |
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.
These two new attributes were added so you no longer need to use a separate function to get the validation result, as we do in the blocking version of the code. Once the action is completed, these two attributes will be populated.
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.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8d914d8 to
16e13c3
Compare
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.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Add support for non-blocking IXP validation via two methods:
Instead of passing a single object to
retrieve_ixp_extraction_validation_result, I passed each parameter individually to keep the same pattern used byretrieve_ixp_extraction_result. However, this differs from other methods (likeextractorstart_ixp_extraction_validation), which receive these parameters wrapped in an object rather than individually (like fromextraction_response). We should settle on a single, consistent approach in the futureTesting