fix: don't show Podman Machine message on Linux when a connection is provided - #4680
Open
xhon-pelushi wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
On Linux,
checkContainerConnectionStatusAndResources()only short-circuited tonativestatus 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.isLinuxalone, so Linux always reportsnativeregardless of whether a connection was specified.Kept the diff minimal: did not add
'native'toContainerConnectionInfoStatusin 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 eslinton the changed files — clean.