Skip to content

feat: graceful deep-research image pull during upgrade#8

Merged
joeldrotleff merged 4 commits intomainfrom
joel/graceful-deep-research-pull
Feb 5, 2026
Merged

feat: graceful deep-research image pull during upgrade#8
joeldrotleff merged 4 commits intomainfrom
joel/graceful-deep-research-pull

Conversation

@joeldrotleff
Copy link
Contributor

@joeldrotleff joeldrotleff commented Feb 5, 2026

Summary

Pull deep-research image during upgrade/install and handle failures gracefully.

Changes

  • compose.go: Pull() now takes variadic services, pulls each individually, returns []PullResult with per-service errors
  • updater.go & installer.go:
    • Include deep-research in pull list when EnableDeepResearch is true
    • Log success/failure per service
    • Only fail if backend/frontend fail; warn and continue for deep-research
  • AGENTS.md: Remove stale image hash from docs (point to manager.go instead)

Behavior

  • Deep research image is now pulled during upgrade (previously skipped)
  • If deep-research pull fails (e.g., auth issue), upgrade continues with other services
  • Next upgrade will retry pulling deep-research since it's always attempted when enabled
  • Backend/frontend pull failures still fail the entire upgrade (critical services)

Summary by CodeRabbit

  • New Features

    • Docker image pulls now report detailed per-service results and continue when optional services fail.
  • Bug Fixes

    • Error messages for image pulls now include the specific service name.
  • Documentation

    • Updated configuration example to change the default deep_research_image reference.
  • Tests

    • Adjusted tests to reflect updated Docker argument expectations.

- 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
@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

Warning

Rate limit exceeded

@joeldrotleff has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 3 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

Walkthrough

This 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 Diagram

sequenceDiagram
    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
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐇 I nudged each image, one by one,

backend first, then frontend fun,
deep-research hops in when allowed,
small fails whisper, big ones get loud,
I nibble logs and dance — changes done!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: graceful deep-research image pull during upgrade' accurately describes the main change: enabling graceful (non-fatal) pulling of deep-research images during upgrades.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch joel/graceful-deep-research-pull

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 and usage tips.

joeldrotleff and others added 3 commits February 4, 2026 18:03
- 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
@joeldrotleff joeldrotleff merged commit 74ca72a into main Feb 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant