Skip to content

fix(release): update the deployment script - #138

Merged
Ayush8923 merged 3 commits into
mainfrom
feat/update-deployment-script
Jul 28, 2026
Merged

fix(release): update the deployment script#138
Ayush8923 merged 3 commits into
mainfrom
feat/update-deployment-script

Conversation

@Ayush8923

@Ayush8923 Ayush8923 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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 -af to the end of the deploy command chain in both workflows:

  1. .github/workflows/cd-staging.yml
  2. .github/workflows/cd-production.yml

Checklist

Before submitting a pull request, please ensure that you mark these task.

  • Ran fastapi run --reload app/main.py or docker compose up in the repository root and test.
  • If you've fixed a bug or added code that is tested and has test cases.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The deployment workflows add Docker BuildKit cleanup and increase SSM polling intervals. The PII analysis notebook reformats presentation code without changing validation or metric behavior.

Changes

Deployment workflow updates

Layer / File(s) Summary
Deployment cleanup and polling
.github/workflows/cd-production.yml, .github/workflows/cd-staging.yml
SSM deployment commands now run docker builder prune -af after image pruning, and polling waits 25 seconds between status checks.

PII notebook formatting

Layer / File(s) Summary
PII analysis presentation updates
backend/notebooks/analysis-pii.py
Markdown cells, imports, validator construction, and DataFrame column displays are reformatted while preserving existing content and behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is related to the release workflows, but it is too generic to convey the main change. Rename it to mention the Docker BuildKit cleanup, e.g. 'fix(release): prune BuildKit cache after deployment'.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/update-deployment-script

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Ayush8923 Ayush8923 changed the title fix(release): update the release script fix(release): update the deployment script Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR only includes formatting-related CI fixes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between b6ef0c8 and ad915f9.

📒 Files selected for processing (3)
  • .github/workflows/cd-production.yml
  • .github/workflows/cd-staging.yml
  • backend/notebooks/analysis-pii.py

Comment thread .github/workflows/cd-production.yml
@Ayush8923
Ayush8923 merged commit 4857af1 into main Jul 28, 2026
2 checks passed
@Ayush8923
Ayush8923 deleted the feat/update-deployment-script branch July 28, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants