fix: drop :latest tag from CI, make worker count configurable #116
No reviewers
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-database#116
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/ci-tags-and-workers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
:latestDocker tag from CI builds to match Paper Dynasty convention:version+:environmentonly (:devor:production)WEB_WORKERSenv var to Dockerfile (default 2), overridable via docker-composeNote
Akamai docker-compose currently pulls
:latest— must be updated to:productionbefore the next CalVer release. Tracked separately.Test plan
devtag, verify CI build succeeds:devimage is updated, no new:latestpushed🤖 Generated with Claude Code
AI Code Review
Files Reviewed
.gitea/workflows/docker-build.yml(modified)Dockerfile(modified)Findings
Correctness
Dockerfile: shell form CMD loses PID 1 signal handling
The change from exec form to shell form introduces a signal delivery regression:
When
docker stopis issued, SIGTERM goes to PID 1. With shell form, PID 1 is/bin/sh, which does not forward signals to child processes. Uvicorn never receives SIGTERM and gets SIGKILL after Docker's stop timeout (10s). This bypasses uvicorn's graceful shutdown — in-flight requests are cut off and worker processes are killed hard.Fix: Use exec form with an explicit shell invocation and
execto replace the shell with uvicorn:The
execprefix replaces the shell process with uvicorn, making uvicorn PID 1 and restoring correct signal delivery.Security
Style & Conventions
:latestfrom push tags and summary) is clean and correct.:productionbefore next release is appropriate — important operational prerequisite.Suggestions
Verdict: REQUEST_CHANGES
One correctness issue: the shell form
CMDcauses SIGTERM to be delivered to the intermediate shell rather than uvicorn, preventing graceful shutdown. UseCMD ["sh", "-c", "exec uvicorn ..."]to preserve PID 1 behavior while still expanding$WEB_WORKERS. The CI:latestremoval is clean and correct.Automated review by Claude PR Reviewer
Addressed review feedback in
6efba47:Fixed: shell form CMD → exec form CMD
Changed
Dockerfileline 34 from:to:
The
execprefix replaces the shell with uvicorn, making uvicorn PID 1 so it receives SIGTERM directly fromdocker stopand can shut down gracefully rather than being SIGKILLed after the stop timeout.AI Code Review
Files Reviewed
.gitea/workflows/docker-build.yml(modified)Dockerfile(modified)Findings
Correctness
CMD ["sh", "-c", "uvicorn ..."]withoutexecwould lose PID 1 — the shell would sit at PID 1 and SIGTERM would never reach uvicorn. The updated CMD correctly usesexec uvicorn, which replaces the shell process so uvicorn becomes PID 1 and receives SIGTERM directly. Graceful shutdown now works correctly.$WEB_WORKERSis set viaENV WEB_WORKERS=2before the CMD — sh expands it correctly at container start. Overridable viadocker-composeenvironment section as intended.:latestremoved from both thetags:block (line 61) and the Build Summary step (line 74). Both are consistent — no stale:latestreference remains.Security
No issues found.
WEB_WORKERSexposes no sensitive data. No hardcoded credentials introduced.Style & Conventions
No issues found. Dockerfile follows existing patterns. YAML changes are minimal.
Suggestions
\ No newline at end of file). Not introduced by this PR — out of scope.Verdict: COMMENT
Approved. The PID 1 fix from the previous review has been applied correctly (
exec uvicorn). CI:latestremoval is clean and consistent. TheWEB_WORKERSenv var addition is correct and the default of 2 is reasonable.Reminder per PR note: Akamai
docker-compose.prod.ymlmust be updated to pull:productioninstead of:latestbefore the next CalVer release.Automated review by Claude PR Reviewer
Reviewed and approved. Merging now.