Repository navigation
fix(desktop): open Docker Desktop only when it has run before; keep each installation on its engine - #831
Conversation
…hen it is not; never Podman in its place With Docker Desktop installed but quit, setup found no answering engine and installed Podman behind an administrator prompt: a second engine on a machine that already had Docker, and one local Intelligence refuses. On macOS and Windows the engine is now Docker Desktop. Installed and stopped, it is opened and waited for. Missing, Docker's own installer (4.96.3, pinned to the digests Docker publishes) is downloaded with progress, installed without accepting Docker's terms, and opened so the person accepts them in Docker's window. A Podman somebody already has is still used; a stopped docker with no Docker Desktop (OrbStack, Colima) is left for its owner to start. Linux is unchanged.
The non-macOS branch mapped a spawned process to Default::default(), leaving the type to inference, which had nothing to go on: error[E0282] on Linux and Windows. It is std::process::ExitStatus's default, which reads as success; a started Docker Desktop is the whole job there.
|
Linux and Windows CI failed to compile this branch: root cause and fix
|
The engine choice on macOS and Windows is now: a Docker that answers is used; an installed Docker Desktop that is stopped is started; any other stopped `docker` (OrbStack, Colima) is left for its owner; a machine with no Docker gets Podman, as it did before; an existing Podman is used. OpenBot no longer installs Docker Desktop itself, so its pinned installers, the streamed download and the 15-minute first-start wait are removed. Linux is unchanged.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36f69695af
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…nd its CLI in ~/Applications Starting a stopped Docker Desktop returned from the install step into the Podman-only machine steps, which fail at `podman machine list` on a machine with no Podman. engine_ready now detects again after the install step and returns an answering engine (with Compose) directly. The CLI fallback for macOS looked only in /Applications/Docker.app, while setup also starts a Docker Desktop in ~/Applications; Docker answering was never seen and the start timed out. The CLI places are now derived from docker_desktop::app_places, so the two lists cannot drift.
place_compose asks Podman whether Compose runs. On a Docker-only machine there is no Podman, so it downloaded a docker-compose provider into OpenBot's tools directory. Docker's `docker compose` looks for plugins in its cli-plugins directories, never on PATH, so nothing used it. Docker Desktop ships Compose itself, and engine_ready checks Docker's Compose once Docker answers.
|
No Compose download after starting Docker Desktop (048bf48)
|
…ach installation on its engine OpenBot opened any installed Docker Desktop and waited up to 5 minutes for Docker to answer. A Docker Desktop that was installed and never opened shows its subscription terms first, and nothing outside it tells that window from a helper prompt, a required sign-in or a slow boot. So a person could be put in front of Docker's terms and left waiting. A new installation now uses, in order: a Docker that answers; on macOS and Windows, a stopped Docker Desktop whose VM disk exists (it has run, so its terms are done), which is opened; otherwise Podman, as before. A stopped `docker` with no Docker Desktop behind it is no longer an error: it gets Podman. The disk is checked with a stat only, which on macOS 27.0.1 raises no "access data from other apps" request (checked against the TCC log). The engine chosen is saved with the installation (.openbot-engine.json, preparation::saved_engine) and every later install, Start and sign-in uses only that engine. A Podman installation no longer moves to a Docker that happens to answer, onto an empty database, and the reverse. A saved Docker whose Docker Desktop is stopped is opened before Start, with a 3-minute limit and a message for one that stops on a screen of its own. Installations from before this record are pinned on their next successful Start.
…at install Only install started the Podman machine. Reopening OpenBot goes straight to Start, which only looked for an engine, so after a restart a Podman installation failed with "podman is installed but not answering. Start it and try again." Nobody this app is for can act on that. Start now brings up the saved engine first, before startup is held: a saved Docker opens Docker Desktop, and a saved Podman (or an installation from before engines were saved, with nothing answering) starts OpenBot's own machine when it exists. No machine is created at Start and nobody else's is started. An older installation that was on Docker cannot land on an empty machine: Start requires the installation's images on the engine it uses.
Takes main's engine choice (#831): Docker Desktop is opened only when it has run before, and each installation stays on the engine it was set up on. The old copy of #831 on this branch is dropped, including after_engine_install, which duplicated main's answering_after_install and ignored the saved engine. Kept from this branch: path_with_docker, downloads chosen by the machine's architecture on Windows on ARM, and the per-user Docker Desktop location on Windows. Takes main's #823 and #821 (StartFresh replaces DatabaseReset; the local Intelligence screen offers it too), #860, and #858's Recorder step label. The web app keeps main's theme and skin picker (#856); this branch's CopilotKit reskin of the app and its two fonts are dropped. Its desktop CSS (room for the macOS window buttons, sidebar resize) stays.
…man machine Which engine OpenBot uses is main's (#831): Docker if it answers, Docker Desktop if it has run before, otherwise Podman, saved with the installation. This commit no longer changes that choice. Local Intelligence's k3d needs rootful Podman (CopilotKit/Intelligence#2147), so the machine OpenBot creates is `--rootful`, and OpenBot addresses it through its `<name>-root` connection, the rootful engine, both for its own machine and for a running machine it adopts. On a rootful Windows machine the host-gateway setting goes to the system configuration. An existing rootless machine is never switched; local Intelligence setup and start decline there instead, with a `rootless-podman` failure whose row names `podman machine set --rootful`. Every Intelligence CLI process gets COPILOTKIT_LOCAL_ENGINE for the engine OpenBot runs on, recorded when the engine is ready (also where Docker answers right after the install step) and when Start pins it; before either, the installation's saved engine. For a Podman machine it also gets CONTAINER_HOST and DOCKER_HOST naming the machine's forwarded API, drops an inherited DOCKER_CONTEXT, and has Podman's directory on PATH. While Podman installs, the step row names the password prompt macOS or Linux raises. The window's runtime row no longer says Docker Desktop.
…man machine Which engine OpenBot uses is main's (#831): Docker if it answers, Docker Desktop if it has run before, otherwise Podman, saved with the installation. This commit no longer changes that choice. Local Intelligence's k3d needs rootful Podman (CopilotKit/Intelligence#2147), so the machine OpenBot creates is `--rootful`, and OpenBot addresses it through its `<name>-root` connection, the rootful engine, both for its own machine and for a running machine it adopts. On a rootful Windows machine the host-gateway setting goes to the system configuration. An existing rootless machine is never switched; local Intelligence setup and start decline there instead, with a `rootless-podman` failure whose row names `podman machine set --rootful`. Every Intelligence CLI process gets COPILOTKIT_LOCAL_ENGINE for the engine OpenBot runs on, recorded when the engine is ready (also where Docker answers right after the install step) and when Start pins it; before either, the installation's saved engine. For a Podman machine it also gets CONTAINER_HOST and DOCKER_HOST naming the machine's forwarded API, drops an inherited DOCKER_CONTEXT, and has Podman's directory on PATH. While Podman installs, the step row names the password prompt macOS or Linux raises. The window's runtime row no longer says Docker Desktop.
What
On macOS and Windows, a new OpenBot Desktop installation picks its container engine in this order:
dockercommand that does not answer.The engine chosen is saved with the installation (
.openbot-engine.jsonin the installation folder, read withpreparation::saved_engine). Every later install, Start and sign-in uses only that engine:Start brings the engine up. Before, only install started the Podman machine. Reopening OpenBot goes straight to Start, which only looked for an engine, so after a restart a Podman installation failed with "podman is installed but not answering. Start it and try again." Now Start first brings up the saved engine:
openbotmachine when it exists.No machine is created at Start, and nobody else's is started. An older installation that was on Docker cannot land on an empty machine: Start requires the installation's images on the engine it uses.
Linux: a Docker that answers is used, and anything else gets Podman, as before.
Why
With Docker Desktop installed but quit, setup found no engine that answered and installed Podman behind an administrator prompt, a second engine on a machine that already had Docker.
The first fix opened any installed Docker Desktop and waited 5 minutes for Docker. A Docker Desktop that was never opened shows Docker's subscription terms first. From outside, OpenBot cannot tell that window from a password prompt, a required sign-in or a slow boot, so it would put a person in front of Docker's terms and wait on them. OpenBot must never do that.
How "has run before" is checked
Docker Desktop's VM disk holds every image and container. Docker creates it when its engine first starts, and Docker Desktop does not run until its terms are accepted. These are the places Docker documents in How to back up and restore your Docker Desktop data:
~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw%LOCALAPPDATA%\Docker\wsl\disk\docker_data.vhdx(WSL 2). Also checked: the olderwsl\data\docker_data.vhdxandwsl\data\ext4.vhdx,%LOCALAPPDATA%\Docker\vm-data\DockerDesktop.vhdx(Docker VMM) and%ProgramData%\DockerDesktop\vm-data\DockerDesktop.vhdx(Hyper-V).The check is a
statonly. On macOS the disk is inside Docker's app container, where reading or listing raises "would like to access data from other apps". Astatraises nothing: on macOS 27.0.1, stats ofDocker.raw(with and without following links) produced notccdrequest, while the same process'sdockercalls do logkTCCServiceSystemPolicyAppDataDetailedrequests. OpenBot never runsdockerfor this check.A disk moved elsewhere in Docker's settings is not found, and that machine gets Podman, which is the safe side.
Kept from earlier revisions
~/Applicationsincluded.OpenBot does not install Docker Desktop.
Test
install::tests::the_engine_is_chosen_by_this_tablecovers every row:dockerwith no Docker Desktop (Podman);install::testsrun the install step itself for these cases. No Podman is ever installed beside a Docker Desktop that is opened, and a Podman installation never moves to an answering Docker.docker_desktop::testscover:tests::start_brings_up_the_engine_this_installation_runs_onanda_machine_that_fails_to_start_stops_start_with_its_own_words(main.rs): Start opens Docker Desktop for a saved Docker, starts OpenBot's machine for a saved or older Podman installation, creates or starts no other machine, and does nothing on Linux or when the engine answers.preparation::tests::the_saved_engine_outlives_a_new_preparation: the saved engine survives a new release being prepared.cargo fmt --check,cargo clippy --all-targets -- -D warningsandcargo test --lib --bins(659 + 156) pass.cargo xwin check --target x86_64-pc-windows-msvc --all-targetscompiles. Windows clippy with-D warningsfails only on dead code and unused imports already onmain(vault.rs,provider_oauth_lock.rs,stack.rs), none in this change.