fix(release): update the deployment script - #138
Conversation
📝 WalkthroughWalkthroughThe deployment workflows add Docker BuildKit cleanup and increase SSM polling intervals. The PII analysis notebook reformats presentation code without changing validation or metric behavior. ChangesDeployment workflow updates
PII notebook formatting
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
this PR only includes formatting-related CI fixes.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/cd-production.yml:
- Line 34: Update the SSM deployment commands in
.github/workflows/cd-production.yml line 34 and .github/workflows/cd-staging.yml
line 33 to prevent docker builder prune -af from exceeding the workflow’s
polling window: either extend the associated SSM wait/poll duration beyond five
minutes or cap the prune step while preserving successful deployment completion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 98b462b6-e45a-4071-b70c-9cb16ce2a0b7
📒 Files selected for processing (3)
.github/workflows/cd-production.yml.github/workflows/cd-staging.ymlbackend/notebooks/analysis-pii.py
Summary
The EC2 hosts running staging and production were repeatedly filling up their EBS volumes. The culprit was BuildKit build cache: every deploy runs docker compose build, which writes a fresh set of cache layers, and nothing ever reclaimed them. The existing docker image prune -f only removes dangling images — it does not touch build cache, so the cache grew unbounded until deploys started failing on "no space left on device".
This PR appends
docker builder prune -afto the end of the deploy command chain in both workflows:Checklist
Before submitting a pull request, please ensure that you mark these task.
fastapi run --reload app/main.pyordocker compose upin the repository root and test.