Repository navigation
fix(docker): worker HEALTHCHECK, align docling lab digest, lab pip cache - #3643
Conversation
- Dockerfile.worker: add a HEALTHCHECK on /health using WORKER_HEALTH_PORT, falling back to PORT (the same resolution as worker/health.ts). Railway ignores HEALTHCHECK and keeps using railway.worker.json's healthcheckPath. - eval/docling/Dockerfile: pin the same node:24-bookworm-slim digest as Dockerfile and Dockerfile.worker. - eval/docling/Dockerfile: BuildKit pip cache mounts for the two hashed venv installs. The Railway Dockerfiles stay free of cache mounts, as tests/container-ci-contract.test.ts requires.
There was a problem hiding this comment.
BigSimmo has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
🏁 CodeAnt Quality Gate ResultsCommit: ✅ Overall Status: PASSEDQuality Gate Details
|
PR Summary by QodoAdd worker Docker healthcheck and speed up Docling lab builds
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62dea8b3ab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Code Review by Qodo
No findings for this group No findings for this group No findings for this group Resolved findings 1.
|
- Configure the Compose worker health port - Allow the full worker health-check duration
Code Review ✅ Approved🟡 Medium risk · Adding a worker /health probe and Compose health port could mark the container unhealthy when the endpoint is unreachable, affecting orchestration. Adds a HEALTHCHECK to the worker Dockerfile that probes VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Approved For more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Important Your trial ends in 3 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more. Was this helpful? React with 👍 / 👎 | Gitar |
CodeAnt Nitpicks1 code suggestion1. With the Compose worker's default environment, neither port is set, so this probe always fails and Docker reports a working worker as unhealthy.Api mismatch · |
CodeAnt PR Risk: Low Risk
Assessed commit: |
|
Code review by qodo was updated up to the latest commit c561b7d |
User description
Summary
Small Docker review items (a companion to #3642, the Compose safety PR).
HEALTHCHECKon/health. It resolves the port the same wayworker/health.tsdoes (WORKER_HEALTH_PORT, thenPORT). If neither is set, the health server is off, so the probe exits 1 with an explicit message instead of reporting healthy. Railway compatibility: Railway ignores DockerHEALTHCHECK(docs) and keeps gating deploys onrailway.worker.jsonhealthcheckPath: /healthonPORT. The appDockerfilealready ships aHEALTHCHECKthe same way. The instruction sits on one line becausetests/tsx-server-only-runner.test.tsreads the firstCMD-prefixed line as the entrypoint.node:24-bookworm-slim@sha256:d6aa754f…digest asDockerfileandDockerfile.worker. The old pin was235600a8…. Both are valid multi-arch OCI indexes.eval/docling/Dockerfile), where--require-hashesstill verifies every artifact. I did not add them toDockerfileorDockerfile.worker:tests/container-ci-contract.test.ts("keeps Railway Dockerfiles portable across service IDs") forbids--mount=type=cachethere, and I left that check as it is.Areas touched: Delivery and assurance, Source intake and indexing
Verification
vitest runon container-ci-contract, docling-model-artifacts, worker-shadow-extraction, tsx-server-only-runner, sentry-release, railway-config, database-skills, ci-audit-contracts and worker-bundle →Test Files 9 passed (9) / Tests 202 passed (202)WORKER_HEALTH_PORT→ exit 0;PORT→ exit 0; neither set → exit 1 with "worker health server disabled"; server down → exit 1ci-change-scope→container_changed=true, so the required Docker image build and smoke run in CI. I couldn't build locally because the box has no Docker daemon.Risk and rollout
Notes
scripts/trivy-image-scan.mjs.Summary by cubic
Adds a container-runtime health probe to the worker image and aligns the docling lab image with the main Dockerfiles.
HEALTHCHECKprobes/healthonWORKER_HEALTH_PORT, falling back toPORTlikeworker/health.ts; if neither is set it exits 1 with an explicit message instead of claiming healthy.docker-compose.ymlsetsWORKER_HEALTH_PORT: 8000for the health probe; no host port is exposed.HEALTHCHECKand keeps gating onrailway.worker.json, so deploy behavior is unchanged.node:24-bookworm-slimpin now matches the digest used byDockerfileandDockerfile.worker.--require-hashesstill verifies every artifact, andrun-lab.shnow requires a BuildKit builder. The Railway images intentionally keep cache mounts out percontainer-ci-contract.test.ts.tsx-server-only-runner.test.tsreads the firstCMD-prefixed line as the entrypoint.Written for commit c561b7d. Summary will update on new commits.
CodeAnt-AI Description
Add worker container health checks and speed up Docling lab rebuilds
What Changed
/healthendpoint is unavailable; the probe reports unhealthy if no health port is configured.Impact
✅ Clearer worker container health status✅ Faster Docling lab rebuilds✅ Consistent base image across containers💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Summary by Gitar
WORKER_HEALTH_PORT: 8000on the worker service indocker-compose.ymlfor the internal health listenerThis will update automatically on new commits.
Summary by CodeRabbit