Repository navigation
fix: keep the sessionize probe running when one event is refused - #5445
Conversation
Sessionize answers 403 for an event the organizer account cannot export. The probe treated that as a dead session and skipped every later event. It now uses the session per event and stops only after five refusals in a row. Refs linuxfoundation/lfx-cdp-insights-ops#1156 Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
|
|
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit 188574e. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
@mbani01 I'm starting review 1 of this pull request now (started 2026-11-25 14:33 UTC using review agent v0.1.34). 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 Mouad BANI, thanks for the clear write-up and the focused fix. SummaryThis pull request makes the Sessionize export probe build its HTTP client per event, so one refused event no longer blocks later ones. It also changes the stop rule to count consecutive failures per error class. The change is small and matches its description. Decision✅ Approved DetailsOverall impression: The stop rule in Other reviewers and CI checks: Copilot and Cursor Bugbot also found no issues. The required Documentation reminder: changed Rule files: read Questions, problems, or feedback: https://github.com/linuxfoundation/lfx-review-agent/issues |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified in the Sessionize probe failure-handling changes.
No open issues 🎉
What changed in this PR
This PR makes the Sessionize export probe continue past isolated event refusals while retaining stop rules for repeated failures and rate limits.
Changes:
- Creates a fixed-session HTTP client for each event and includes failure classes in event logs.
- Stops after five consecutive authentication failures, two consecutive unavailable failures, or one rate-limit failure.
- Updates stop-rule tests to cover isolated and consecutive authentication failures.
| File | Description |
|---|---|
services/apps/connectors_worker/src/sessionizeExportProbe.ts |
Tracks consecutive failures by error class and applies stop thresholds. |
services/apps/connectors_worker/src/sessionizeExportProbe.test.ts |
Updates test cases for authentication-failure stop rules. |
services/apps/connectors_worker/src/bin/probe-sessionize-exports.ts |
Creates clients per event and logs failure classes. |
Review effort: Balanced
[Medium impact] The changes affect the bounded Sessionize export probe workflow. The PR appears safe to merge, with a non-blocking gap in regression coverage.
|
| try { | ||
| const file = await downloadSessionizeExport( | ||
| http, | ||
| createSessionizeFixedSessionHttp(cookie), |
There was a problem hiding this comment.
Tests miss the original failure
The new tests check only nextProbeRunState. They would still pass if the HTTP client were moved back outside the event loop, restoring the bug where one 403 blocks later exports. Add a regression test that returns 403 for one event, then a valid export for the next. Check that the second export is saved using the same cookie without another sign-in.
Prompt To Fix With AI
This is a comment left during a code review.
Path: services/apps/connectors_worker/src/bin/probe-sessionize-exports.ts
Line: 109
Comment:
**Tests miss the original failure**
The new tests check only `nextProbeRunState`. They would still pass if the HTTP client were moved back outside the event loop, restoring the bug where one 403 blocks later exports. Add a regression test that returns 403 for one event, then a valid export for the next. Check that the second export is saved using the same cookie without another sign-in.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
lfx-one
left a comment
There was a problem hiding this comment.
Looks good. The stop rule now counts consecutive failures per error class, which matches the PR description, and I found no blocking or minor issues. The new nextProbeRunState cases cover the single refusal, the non-consecutive refusals and the five refusals in a row.
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:
provider.authstop threshold (now 5 consecutive failures instead of an immediate stop)- per-event Sessionize HTTP client in the export probe
Problem
The Sessionize export probe stopped at the first 403 and skipped every later event. In production, Sessionize answered 403 for one event that the organizer account cannot export. A second run confirmed that the session was still valid: the same new session downloaded another event and was then refused for that one event again.
Change
provider.authfailures in a row, which is the sign of a session that is really dead. A rate limit still stops the run at once, and twoprovider.unavailablefailures in a row still stop it.Tests
sessionizeExportProbe.test.ts: 50 of 50 pass. The stop-rule cases cover a single refusal, refusals that are not in a row, and five refusals in a row.Refs linuxfoundation/lfx-cdp-insights-ops#1156