feat: graceful deep-research image pull during upgrade#8
Conversation
- Pull deep-research image when EnableDeepResearch is true - Pull services individually and track per-service errors - Only fail upgrade if critical services (backend/frontend) fail - Warn and continue if deep-research pull fails - Remove stale image hash from AGENTS.md docs Agent-thread: https://ampcode.com/threads/T-019c2af3-1401-74c1-870f-613091f6d405 Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019c2af3-1401-74c1-870f-613091f6d405
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThis PR changes image-pulling to operate per-service. internal/docker/compose.go introduces a PullResult type and a Pull(ctx, composePath, services...) function that defaults to ["backend","frontend"] and returns per-service results; a pullService helper pulls a single service. installer and updater now build a list of services (optionally including deep-research), call per-service pulls, log per-service outcomes, and treat failures in critical services (backend/frontend) as fatal while non-critical failures are warned. Minor docs, test, and logger printing adjustments are included. Sequence DiagramsequenceDiagram
participant Caller as Caller
participant Pull as Pull Function
participant ServicePull as pullService
participant Docker as Docker
Caller->>Pull: Pull(ctx, composePath, services...)
activate Pull
alt services provided
Pull->>Pull: use provided services
else no services provided
Pull->>Pull: default to ["backend","frontend"]
end
loop for each service
Pull->>ServicePull: pullService(ctx, composePath, service)
activate ServicePull
ServicePull->>Docker: docker compose pull <service>
alt pull succeeds
Docker-->>ServicePull: success
ServicePull-->>Pull: nil
else pull fails
Docker-->>ServicePull: error
ServicePull-->>Pull: error (with service name)
end
deactivate ServicePull
Pull->>Pull: accumulate PullResult{service, error}
end
Pull-->>Caller: []PullResult
deactivate Pull
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 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 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 |
- Update inference tests to expect --chunked-prefill-size -1 - Fix non-constant format string lint errors in logger by using fmt.Fprint instead of fmt.Fprintf (SprintfFunc already formats) Agent-thread: https://ampcode.com/threads/T-019c2b87-f41b-75bf-8dc8-297698b4f416 Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019c2b87-f41b-75bf-8dc8-297698b4f416
- Remove unused getImage function in inference.go - Add explicit error ignores for json.Encode calls in handlers - Add explicit error ignores for completion generation calls - Add explicit error ignores for fmt.Sscanf in version comparison Agent-thread: https://ampcode.com/threads/T-019c2b87-f41b-75bf-8dc8-297698b4f416 Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019c2b87-f41b-75bf-8dc8-297698b4f416
golangci-lint v1.64.8 is built with Go 1.24 and cannot lint projects targeting Go 1.25.0 yet. Agent-thread: https://ampcode.com/threads/T-019c2b8d-bae8-71ae-8ece-37ccbe0712b4 Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019c2b8d-bae8-71ae-8ece-37ccbe0712b4
Summary
Pull deep-research image during upgrade/install and handle failures gracefully.
Changes
Pull()now takes variadic services, pulls each individually, returns[]PullResultwith per-service errorsdeep-researchin pull list whenEnableDeepResearchis trueBehavior
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests