Repository navigation
fix(liteparse): answer the container readiness probe so it is not logged as an error - #854
polylane[bot] wants to merge 1 commit into
Conversation
…ged as an error Co-authored-by: polylane[bot] <277585245+polylane[bot]@users.noreply.github.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
|
Tip Expected to resolve the linked issue. Linked issue: iss_11c99c80f0015974uq22x87h — liteparse container logs its readiness probe as a request error Checked the added Also considered · 2 refuted
Analysed against 2 Cloudflare Workers and 1 repository
Polylane analysed Rate this review: 👍 helpful · 👎 not helpful · 😕 confusing Suggested observability improvementsThese are advisory and do not affect the production-impact verdict. Review them on this branch when convenient: After this change the readiness probe is logged as a successful |
|
Fixes: Liteparse container logs its readiness probe as a request error, reporting ~50% false errors
The liteparse container reported roughly half of its requests as errors, but almost all of those were the Cloudflare Containers runtime checking that the container port is ready. The container answered that probe with 404 and recorded it as a failure, so its error telemetry was unusable and raised a false capacity alarm while 99.3% of real extraction requests succeeded. After this change the container answers the readiness probe with 200, so it counts as a served request and the error signal reflects real extraction outcomes.
sequenceDiagram participant DO as WorkspaceFileProcessor (DO) participant RT as "@cloudflare/containers runtime" participant S as "liteparse server.mjs" RT->>S: "GET http://ping/ (readiness probe, path /)" Note over S: before: no / route, logged outcome=error S--)RT: "404 Not found" Note over S: after fix: GET / answered S--)RT: "200 status ok, logged outcome=success" DO->>S: "POST /parse/pdf, /prepare/pdf, /preview/image" S--)DO: "200 result, or 422/503 real outcome"Detection evidence
Affected:
acc_0ffb6c6e7001s4bfa5fafx1tWhy this fix
The
@cloudflare/containersruntime probes the port withGET http://ping/before routing work, and treats any response as the port being ready (dist/lib/container.js:342,664). The container has no/route, so it returned 404 and its request logger mapped that tooutcome=error(server.mjs:139). In the 7 days to 2026-10-08T17:34Z, 286 of 288 error events were exactly this probe; real endpoints succeeded 274/276. AnsweringGET /with 200 makes the probe a served request, so the error ratio now reflects actual extraction failures. Capacity settings are unchanged and the 503 load-shed path is untouched.Fix walkthrough
Watch the fix explained (2:47). Recorded for commit
e0d3a27c8192a970e0a18f8c51a6fb309ca8ec91.Causal chain
1 file changed (+8/-0)
containers/liteparse/server.mjs: modified, +8/-0Generated by Polylane. You can ask follow-ups by mentioning @polylane in a comment.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.