fix(import): make rollback all-or-nothing at the queue level - #1321
Merged
RUKAYAT-CODER merged 1 commit intoAug 31, 2026
Merged
Conversation
|
@Priyanshu1-62 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Thank you for conyributing to the project |
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.
Description
Summary:
This addresses the import atomicity issue: "validate all rows up front" and "roll back atomically."
validator.ts: No code changes.runValidationPipelinealready iterates every row regardless of earlier row failures and returns full succeeded/failed/records results, the "validate all rows up front" behavior already exists as written.rollback.ts: Updated so rollback is all-or-nothing at the queue level. Previously,rollback()unconditionally cleared all registered actions after attempting them, even when some failed, silently discarding the fact that cleanup was incomplete. Now the queue only clears on full success; failed actions remain registered so a retry only re-attempts what didn't complete.Implementation Details:
RollbackResultgains a complete:booleanfield, true only when every action succeeded and the queue is now empty.rollback()no longer unconditionally zeroes actions. On partial failure, failed actions are re-queued in their original relative order instead of being discarded.sizenow honestly reflects incomplete rollback state (non-zero after a partial failure) instead of always reading 0 post-rollback.register(),clear(), and execution order (reverse/LIFO) are unchanged.Related Issue
Closes #1180
Type of Change
Checklist