Skip to content

Conversation

@Horiodino
Copy link
Contributor

Description:
added validation to ensure hostPath is part of a configured mount. if the path is not mounted, an error is returned.

Testing:
added unit tests for isMounted

Signed-off-by: Praful Khanduri <holiodin@gmail.com>
@Horiodino Horiodino force-pushed the hostPath_mount_validation branch from 75f0a14 to 84ff74e Compare December 1, 2025 10:01
Signed-off-by: Praful Khanduri <holiodin@gmail.com>
@Horiodino Horiodino force-pushed the hostPath_mount_validation branch from 84ff74e to c44939c Compare December 1, 2025 12:25
@Horiodino Horiodino requested a review from AkihiroSuda December 2, 2025 13:43
Signed-off-by: Praful Khanduri <holiodin@gmail.com>
@Horiodino Horiodino force-pushed the hostPath_mount_validation branch from 57736fb to 6f59ab8 Compare December 3, 2025 12:31
Copy link
Member

Choose a reason for hiding this comment

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

Tests are failing on Windows

Also please squash the commits
https://lima-vm.io/docs/dev/git/#squashing-commits

}
if logs != "" {
callToolRes.Meta = map[string]any{
"io.lima-vm/logs": []string{logs},
Copy link
Member

Choose a reason for hiding this comment

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

This should be defined as a constant

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"io.lima-vm/logs": []string{logs},
const MetaWarnings = "io.lima-vm.mcp/warnings"

Copy link
Member

Choose a reason for hiding this comment

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

Also do not clear existing entries in Meta.
Such entries may not exist in the current code, but may appear in future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants