Repository navigation
fix: mark only listed dead-lettered units and give the full revive statement - #5534
Conversation
…atement Refs linuxfoundation/lfx-cdp-insights-ops#1238 Signed-off-by: Uroš Marolt <uros@marolt.me>
PR SummaryLow Risk Overview Alert content adds each sync unit’s id in the bullet list and replaces vague revive guidance with a full Reviewed by Cursor Bugbot for commit 6affa05. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
@themarolt I'm starting review 1 of this pull request now (started 2026-12-06 19:34 UTC using review agent v0.1.37). This usually takes a few minutes. I'll update this comment with the summary when I'm done. If there's no summary here after about 45 minutes, the review stopped: push a new commit, or post a comment that begins with a mention of me followed by Hi Uros Marolt, thanks for the follow-up fix. SummaryThis pull request makes the dead-letter alert mark only the units its Slack message lists as alerted, and it gives the full revive statement with each unit's id. The change is small and well tested, and I found no concerns. Decision✅ Approved DetailsOverall impression: The change fixes a real gap: units cut off by the 20-line or size cap were marked as alerted without being named. Extracting Documentation reminder: changed Rule files: read Questions, problems, or feedback: https://github.com/linuxfoundation/lfx-review-agent/issues |
lfx-one
left a comment
There was a problem hiding this comment.
The change correctly marks only the units the Slack message actually lists, and countFittingLines and capLines share the same cap logic. I found no blocking, security or privacy issues. The new test covers the overflow case.
Documentation
This pull request changes behavior that may also be described outside this repository, such as product pages or an external docs site. I can't read those, so please check them; the author and maintainers own those updates. Changed here:
dead-letter Slack alert content(each unit now shows its id, and the alert gives a full revive statement)
Confidence Score: 5/5
[Medium impact] This PR appears safe to merge. SummaryFixes dead-letter alerts so only listed units are remembered as alerted. Adds unit IDs and a full recovery statement that clears the failure count.
Reviews (1) · Last reviewed commit: "fix: mark only listed dead-lettered unit..." · Reviewed by Greptile |
There was a problem hiding this comment.
🟡 Changes recommended
The tests lack character-cap regression coverage verifying that units omitted by the size budget remain unmarked in Redis and are listed on subsequent runs.
1 open issue
What changed in this PR
This follow-up to #5533 improves connector dead-letter alerts so omitted units remain eligible for later notifications and operators receive complete revival instructions.
Changes:
- Mark only units actually listed in Slack as alerted.
- Include unit IDs and SQL that resets failure state.
- Share cap-counting logic and test deferred notifications.
| File | Description |
|---|---|
| services/libs/data-access-layer/src/connectors/syncUnits.ts | Removes a redundant comment; no behavior change. |
| services/apps/cron_service/src/jobs/syncUnitDeadLetter.ts | Tracks listed units and supplies complete revival SQL. |
| services/apps/cron_service/src/jobs/syncUnitDeadLetter.test.ts | Tests unit IDs, failure reset instructions, and overflow retries. |
| services/apps/cron_service/src/jobs/octolensMappingHealth.ts | Extracts shared line-counting logic. |
Review effort: Balanced

Summary
Follow-up to #5533, from its review comments. The dead-letter alert marked every new unit as alerted even when the Slack message cut it off past 20 lines, so units beyond the cap were never named. Its revive instruction also left the failure count at the threshold, so a revived unit went straight back to dead-letter on its next failure.
Changes
nextRunAt, lock), matchingreviveDeadLetteredSyncUnits.countFittingLinesis split out ofcapLinesso both share the cap logic.Type of change
Related issue
Refs linuxfoundation/lfx-cdp-insights-ops#1238