Repository navigation
Conversation
Adds a dryRun flag to triggerBackfill that reports what a run would create/update (counts by entity type plus a sample of affected records) without persisting anything or enqueuing a job. The dry-run and real run share the same read/detection logic via a new detectLedgerRange helper, so the preview cannot drift from reality.
|
@0xjerah 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
|
Hi @0xjerah - CI is failing on build-and-test, at the lint step - three These are auto-fixable. From (or just |
Auto-fixed multi-line parameter/type wrapping flagged by CI lint step.
Author
|
Hi @Cedarich Done |
…ckfill-dry-run # Conflicts: # app/backend/src/onchain/ledger-backfill.service.ts
Author
|
@Cedarich Please kindly review and merge. I have fixed everything |
This branch has not been deployed
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.
Summary
dryRunflag toLedgerBackfillService.triggerBackfillthat previews what a backfill run would create/update without persisting anything or enqueuing a jobdetectLedgerRangehelper used by both the real run (processLedgerRange) and the new preview path (previewBackfill), so dry-run and real-run behavior can't drift aparteventType: lock/unlock/disburse), and a capped sample (20 records) of affected entriesdryRunthroughPOST /admin/ledger/backfillonLedgerAdminControllerand updates the Swagger docsapp/backend/README.md's existing Ledger Backfill usage notesCloses #1182
Test plan
npx jest ledger-backfill.service.spec.ts— all 13 tests pass, including new dry-run coverage (no checkpoint/job created, counts and sample match detected entries)tsc --noEmit— no type errors in changed files