Skip to content

Conversation

SeddikBellamine
Copy link
Contributor

@SeddikBellamine SeddikBellamine commented Oct 16, 2025

This PR introduces comprehensive bulk processing capabilities for the DataProtector SDK, enabling efficient processing of multiple protected data orders simultaneously.

Key Features Added:

  • Bulk Order Creation: Enhanced function with parameter and new utility for creating bulk dataset orders
  • Bulk Processing: New function that processes multiple protected data orders with intelligent order matching and volume management
  • Smart Order Matching: Implements a while loop that matches orders until the full volume is reached, with automatic waiting for workerpool orders when none are available
  • Comprehensive Testing: Added extensive unit tests covering input validation, error scenarios, and edge cases for the new bulk processing functionality

Technical Implementation:
The bulk processing system uses a sophisticated approach where a single request order represents the entire bulk operation, while multiple deals are created by matching with different workerpool orders until the target volume is achieved.

@SeddikBellamine SeddikBellamine changed the title feat: add bulk processing support for protected data feat: add bulk processing support for data protector Oct 16, 2025
- Add createBulkOrder utility function for creating bulk dataset orders
- Add allowBulk parameter to GrantAccessParams
- Add bulk order creation flow in grantAccess function
- Add CREATE_BULK_ORDER and PUBLISH_BULK_ORDER status types
- Add processBulkRequest function for processing multiple protected data orders
- Implement while loop to match orders until volume is reached
- Support waiting for workerpool orders when none are available
- Add processBulkRequest method to IExecDataProtectorCore class
- Return deals, transaction hashes, and signed request orders
- Add ProcessBulkRequestStatuses, ProcessBulkRequestParams, ProcessBulkRequestResponse types
- Add allowBulk parameter to GrantAccessParams
- Add bulkOnly filter to GetGrantedAccessParams
- Update GrantAccessStatuses with bulk order statuses
- Add comprehensive unit tests for processBulkRequest function
- Test input validation for all parameters
- Test error scenarios (no app orders, whitelist validation, voucher errors)
- Add mock bulk orders array for consistent testing
- Remove tests that cause infinite loops in unit test environment
- Update package.json and package-lock.json dependencies
- Update getGrantedAccess to support bulkOnly filter
- Update test configurations for bulk processing support
- Update e2e tests for grantAccess and getGrantedAccess
- Remove pricePerAccess and volume parameters from createBulkOrder call in grantAccess
- Keep createBulkOrder function simple with infinite volume and zero price
- Fix TypeScript compilation error
- Fix TypeScript error in processBulkRequest unit tests
- Update mock to return Record<number, string> instead of string
- Add proper Jest typing for pushRequesterSecret mock function
- Apply Prettier formatting to Jest mock function
- Break long mock function call into multiple lines for better readability
@PierreJeanjacquot PierreJeanjacquot force-pushed the feat/add-bulk-processing-support branch from 2ded68e to 61a1318 Compare October 20, 2025 13:15
@PierreJeanjacquot PierreJeanjacquot force-pushed the feat/add-bulk-processing-support branch from 9c1b9d5 to 929cc36 Compare October 20, 2025 15:50
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