Skip to content

fix(update): pull the update helper image first, so the in-app update works behind the socket proxy - #642

Closed
GeiserX wants to merge 3 commits into
mainfrom
fix/updater-image-behind-proxy
Closed

GeiserX wants to merge 3 commits into
mainfrom
fix/updater-image-behind-proxy

Conversation

@GeiserX

@GeiserX GeiserX commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Problem

On a worker behind the socket proxy, the first press of Update fails with "Docker refused to start the update helper." Nothing gets updated, and the dashboard gives no hint why.

The worker starts its helpers with containers.run("docker:27.5.1-cli", ...). docker-py pulls a missing image only when Docker answers 404 "No such image". Behind the proxy, the create never reaches Docker. The ownership check resolves the image first and returns its own 404:

POST /containers/create deny 404 owner policy could not resolve image "docker:27.5.1-cli" referenced by container Image

docker-py does not treat that message as ImageNotFound, so run raises instead of pulling. With the raw socket, the same call pulled the image and went on, which is why this only shows up behind the proxy. It affects every proxied install whose host does not already hold docker:27.5.1-cli.

We hit this on a real upgrade to 1.73.1. After a manual docker pull docker:27.5.1-cli on that host, the next Update ran and recreated only the worker, as it should.

Fix

Before the preflight, the worker checks for the helper image and pulls it if it is missing (GET /images/.../json, then POST /images/create; the policy allows both). A pull that fails becomes the proxy's refusal, or an outage message naming the image, and no helper is started.

Tests

TestUpdaterImage in tests/test_update_feature.py:

  • a missing image (the proxy's 404) is pulled before the first containers.run;
  • an image that is already there is not pulled again;
  • a refused pull starts nothing and gives a clear error.

All three fail on main and pass with this change. tests/test_update_feature.py: 55 passed. ruff check and format are clean.

Desktop needs nothing: it runs no socket proxy and has no in-app compose update.

… works behind the socket proxy

containers.run pulls a missing image only when Docker answers "No such
image". Behind the socket proxy the create is refused first with the
proxy's own 404 ("owner policy could not resolve image"), so on any host
that did not already hold docker:27.5.1-cli the Update button failed with
"Docker refused to start the update helper". The worker now checks for
the image and pulls it before the preflight.
@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 4f339d9 and 66f1f36.

Files selected for processing: 2

  • app/orchestrator.py
  • tests/test_update_feature.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@codecov

codecov Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.96%. Comparing base (4f339d9) to head (66f1f36).

Files with missing lines Patch % Lines
app/orchestrator.py 95.65% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #642      +/-   ##
==========================================
- Coverage   93.97%   93.96%   -0.01%     
==========================================
  Files          74       74              
  Lines       15678    15701      +23     
==========================================
+ Hits        14733    14754      +21     
- Misses        945      947       +2     
Files with missing lines Coverage Δ
app/orchestrator.py 95.67% <95.65%> (-0.01%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GeiserX

GeiserX commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

Landed in #653 (f681889), which combined this fix with the others into one release.

@GeiserX GeiserX closed this Nov 7, 2026
@GeiserX
GeiserX deleted the fix/updater-image-behind-proxy branch November 7, 2026 21:42
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