Repository navigation
refactor: centralize file status management - #6641
Merged
Merged
Conversation
- Remove TTL parameter from setStatus method (use constant DEFAULT_TTL) - Improve formatting with proper constructor parameter wrapping - Add safety check for empty UUID before caching Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Inject StatusCacheService for distributed cache management - Update cache after every file status update - Rename updateFileStatus to update for consistency - Ensure cache is updated for parent files and children Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Inject FileStatusService for centralized status management - Add update method that delegates to FileStatusService - Provides consistent interface for file updates across codebase Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Replace FileMapper with FileStatusService for status updates - Remove updateFileStatus method in favor of FileStatusService - Directly set status and delegate timestamp management to service Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…sService - Use FileStatusService instead of direct FileMapper calls - Remove setStatusEnum calls, use setStatus with integer value - Ensures consistent status change timestamp handling Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Inject FileService for centralized file operations - Replace direct FileMapper calls with FileService.update - Remove manual metadata timestamp handling Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Replace direct FileMapper.update with FileStatusService.update - Remove manual metadata timestamp management - Remove updateCacheAfterDbSave duplicate method - Add sequential signing validation before signing Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Replace FileMapper.update calls with FileService.update - Ensures all file updates go through centralized service - Maintains consistency across signature flow updates Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Inject FileService for file operations - Replace direct FileMapper.update with FileService.update - Maintains centralized file management pattern Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Remove TTL parameter from cacheFileStatus method - Add logic to allow ordered flow downgrade from ABLE_TO_SIGN to DRAFT - Split update logic into explicit conditions for clarity Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Update condition to allow updates when status is DRAFT or ABLE_TO_SIGN - Enables proper status management in ordered signing flows Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add pollForProgressChange method using progress hash comparison - Implement buildProgressHash for detecting any progress changes - Add comprehensive logging for debugging poll behavior - Fix status code priority to check signed status first - Optimize cache check to return early if status already changed Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add check for single file (totalCount === 1) to stop polling - Prevents unnecessary polling after single file signature completion - Improves UX by completing immediately for single file scenarios Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Inject FileStatusService mock in setUp - Update createFileService to include new dependency - Ensures tests reflect actual service dependencies Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add StatusCacheService mock in setUp - Update constructor to include cache service - Rename test method from updateFileStatus to update - Ensures tests match refactored service interface Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Replace FileMapper mock with FileStatusService mock - Update test expectations to match new update method behavior - Simplify assertions to check status value only - Remove metadata timestamp assertions (handled by service) Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Replace FileMapper mock with FileStatusService mock - Add willReturnArgument(0) to update method expectations - Improve callback formatting with proper indentation - Ensures tests match refactored service pattern Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add FileService mock to coordinator test - Replace FileMapper.update with FileService.update expectations - Add clearSignRequestError expectations for proper cleanup - Simplify assertions to check status only (no metadata checks) - Add willReturnArgument(0) to update method mocks Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add mock for shouldUseParallelProcessing to return false - Replace FileMapper.update with FileStatusService.update expectation - Add willReturnArgument(0) to update method mock - Ensures test passes with centralized status management Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add envelopeProgressChangeProvider with test cases - Test pollForStatusOrErrorChange with progress hash changes - Add mock for getChildrenFiles to simulate child status changes - Verify polling stops when envelope child progress changes Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add testUpdateStatusAllowsOrderedFlowDowngrade test case - Verify ABLE_TO_SIGN to DRAFT downgrade in ordered numeric flow - Test hasPendingLowerOrderSigners validation logic - Ensures status can be downgraded when lower order signers pending Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Create ProgressPollDecisionPolicy to encapsulate polling logic - Centralizes decision making for when to stop polling - Improves testability and separation of concerns Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Test all polling stop conditions - Verify error detection stops polling - Test progress hash change detection - Test cache status change detection Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Inject ProgressPollDecisionPolicy for cleaner separation - Simplify pollForProgressChange with policy delegation - Improve code readability and testability Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Inject ProgressPollDecisionPolicy mock in setUp - Update test expectations for new dependencies - Ensures tests reflect refactored service structure Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Member
Author
|
/backport to stable33 |
Member
Author
|
/backport to stable32 |
This was referenced Jan 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.