Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdates add a client-side chunk-reload recovery script and include it in the app layout; adjust Docker Compose to set graceful shutdown and controlled rolling updates/rollbacks for the web service; and modify GitHub Actions deployment workflows to ensure the overlay network exists non-fatally, add a fixed post-deploy pause, and move system prune to after deployment. Changes
Sequence Diagram(s)sequenceDiagram
participant CI as CI Runner
participant SSH as Remote Host (SSH)
participant Docker as Docker Engine / Swarm
CI->>SSH: SSH + run deploy script
SSH->>Docker: docker network create --driver overlay vision || true
SSH->>Docker: docker pull <image>
SSH->>Docker: docker stack deploy ...
SSH->>SSH: sleep 60
SSH->>Docker: docker system prune -f
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 Tip CodeRabbit can suggest fixes for GitHub Check annotations.Configure the |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/staging.yml (1)
115-117: Network creation safeguard looks good.The
|| trueidiom correctly handles the case where the network already exists.Consider adding the
sleep 60anddocker system prune -fpattern frommaster.ymlfor consistency, though this may be less critical for staging:💡 Optional: Align with master.yml deployment pattern
docker network create --driver overlay vision || true docker pull ecency/vision-next:develop docker stack deploy -c <(docker-compose config) vision + sleep 60 + docker system prune -f🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/staging.yml around lines 115 - 117, Add the same post-pull/pre-deploy housekeeping used in master.yml by inserting a short pause and a cleanup step after the image pull and before docker stack deploy: after the docker pull ecency/vision-next:develop command, run a sleep 60 to allow the image layer propagation and then run docker system prune -f to remove unused data; keep the existing docker network create --driver overlay vision || true and then run docker stack deploy -c <(docker-compose config) vision as-is.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/web/public/scripts/chunk-reload.js`:
- Around line 26-29: The catch block currently falls through to
window.location.reload() which can cause an infinite reload loop if
sessionStorage is unavailable; modify the logic inside the catch to detect and
set a one-time guard using a URL parameter (e.g., check for a "chunkReloaded"
query param) or an in-memory flag so that the reload is only performed once, and
when reloading append/replace the URL with that param (or skip reload if it's
already present); update the code paths around sessionStorage access and the
window.location.reload invocation to honor this guard and avoid repeated
reloads.
---
Nitpick comments:
In @.github/workflows/staging.yml:
- Around line 115-117: Add the same post-pull/pre-deploy housekeeping used in
master.yml by inserting a short pause and a cleanup step after the image pull
and before docker stack deploy: after the docker pull ecency/vision-next:develop
command, run a sleep 60 to allow the image layer propagation and then run docker
system prune -f to remove unused data; keep the existing docker network create
--driver overlay vision || true and then run docker stack deploy -c
<(docker-compose config) vision as-is.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8ca83e9c-ed8e-4418-806a-dc894ee8f793
📒 Files selected for processing (6)
.github/workflows/master.yml.github/workflows/staging.ymlapps/web/docker-compose.production.ymlapps/web/docker-compose.ymlapps/web/public/scripts/chunk-reload.jsapps/web/src/app/layout.tsx
Summary by CodeRabbit
New Features
Chores