Skip to content

fix: do not execute providers and models in dry-run mode - #14334

Merged
glours merged 2 commits into
docker:mainfrom
glours:fix-dry-run-provider-exec
Oct 13, 2026
Merged

glours merged 2 commits into
docker:mainfrom
glours:fix-dry-run-provider-exec

Conversation

@glours

@glours glours commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

What this PR does

docker compose up|create|run|down|stop|pull --dry-run really executed provider services and pulled/configured models. Both are external processes (a provider binary, the docker model plugin) that the dry-run API client cannot intercept: up --dry-run could create the resource a provider manages, and down --dry-run could destroy it.

Providers and models are now skipped in dry-run mode while their progress events are still emitted. The read-only commands (provider metadata, docker model ls|status) still run, so the binary and required parameters are still validated, "Pulling" is only reported for a model that is really missing, and the model variables are still computed.

AI tool used (if applicable)

AI Tool: Generated with Claude Code

(not mandatory) A picture of a cute animal, if possible in relation to what you did
image

Dry-run only wraps the Docker API client, so provider services, which
are external processes, were still executed: up and create ran the
provider's up command, down and stop ran theirs.

Skip the process in executePlugin when dry-run is set while still
emitting the progress events, and return early from runPlugin so no
relay is deployed or removed for a provider that never ran. The
metadata command is still invoked to keep validating the binary and
its required parameters.

Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
The docker model plugin is an external process the dry-run API client
cannot intercept, so up, create and run --dry-run really pulled the
models and changed the runner configuration.

Skip pull and configure when dry-run is set while still emitting the
progress events. The read-only ls and status commands still run, so
pulling is only reported for a model that is actually missing and the
model variables are still computed.

Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
@glours
glours requested review from a team as code owners October 13, 2026 09:29
@glours
glours requested a review from ndeloof October 13, 2026 09:29

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

@glours
glours enabled auto-merge (rebase) October 13, 2026 11:36
@glours
glours merged commit 4f9bec6 into docker:main Oct 13, 2026
116 of 119 checks passed
@glours
glours deleted the fix-dry-run-provider-exec branch October 13, 2026 11:44
@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

3 participants