Skip to content

fix: don't show Podman Machine message on Linux when a connection is provided - #4680

Open
xhon-pelushi wants to merge 1 commit into
containers:mainfrom
xhon-pelushi:fix/2010-linux-misleading-podman-machine-message
Open

fix: don't show Podman Machine message on Linux when a connection is provided#4680
xhon-pelushi wants to merge 1 commit into
containers:mainfrom
xhon-pelushi:fix/2010-linux-misleading-podman-machine-message

Conversation

@xhon-pelushi

Copy link
Copy Markdown

What does this PR do?

On Linux, checkContainerConnectionStatusAndResources() only short-circuited to native status when no connection was explicitly passed. When a caller (e.g. the RAG AI Lab's model-checker) passes an explicit connection on Linux, it fell through to the podman-machine CPU/memory checks and could surface "Update your Podman Machine to improve performance" — a message that doesn't apply on Linux, where Podman runs natively.

Narrowed the guard to trigger on env.isLinux alone, so Linux always reports native regardless of whether a connection was specified.

Kept the diff minimal: did not add 'native' to ContainerConnectionInfoStatus in the shared types, since it's unused anywhere in the codebase — an unrelated change that got a previous attempt (#4395) maintainer pushback ("How come is this new method changing something").

What issues does this PR fix or reference?

Fixes #2010

How to test this PR?

  • pnpm run test:backend — 531 passed, including a new regression test ('return native on Linux even when a connection is explicitly provided') covering this exact path.
  • pnpm run typecheck:backend — clean.
  • npx eslint on the changed files — clean.

checkContainerConnectionStatusAndResources only skipped the podman
machine resource checks on Linux when no connection was passed in
options. When a caller (e.g. the RAG AI Lab) explicitly passed a
connection, Linux users could fall through to the low-resources check
and see "Update your Podman Machine to improve performance", a
message that doesn't apply since Podman runs natively on Linux
without a VM.

Fixes containers#2010
Signed-off-by: xhon-pelushi <xhon@pelushi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misleading message

1 participant