kernel_source_installer: add local_path support for PatchModifier#4413
Merged
LiliDeng merged 1 commit intomicrosoft:mainfrom Apr 13, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends kernel_source_installer’s PatchModifier to support applying patches from controller-local files via a new local_path glob pattern, in addition to the existing repo-based patch sourcing. It also introduces schema validation requiring exactly one of repo or local_path and applies local patches in sorted order for determinism.
Changes:
- Add
local_pathtoPatchModifierSchemaand validate mutual exclusivity withrepo(and withfile_pattern). - In
PatchModifier.modify(), expand a controller-side glob, upload matching patch files to the node, and apply them sequentially. - Keep existing repo-based patch flow (clone +
file_pattern) for backward compatibility whenrepois used.
a7539ea to
8a175e0
Compare
LiliDeng
reviewed
Apr 10, 2026
8a175e0 to
6c66f72
Compare
Add support for specifying local patch files in PatchModifier via a new 'local_patches' field. This allows users to provide a glob pattern pointing to patch files on the LISA controller machine, which are then copied to the remote node and applied to the kernel source. Previously, patches could only be sourced from a git repository using the 'repo' field. With this change, 'repo' becomes optional and users must specify exactly one of 'repo' or 'local_patches'. The 'local_patches' field accepts glob patterns (e.g., '/path/to/*.patch'). Matching files are expanded on the controller, copied to the node, and applied in sorted order for deterministic behavior. Validation ensures: - 'repo' and 'local_patches' are mutually exclusive - exactly one of the two must be provided - 'local_patches' and 'file_pattern' are mutually exclusive Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>
6c66f72 to
4ce21c6
Compare
LiliDeng
approved these changes
Apr 13, 2026
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.
Description
Add support for specifying local patch files in PatchModifier via a new 'local_path' field. This allows users to provide a glob pattern pointing to patch files on the LISA controller machine, which are then copied to the remote node and applied to the kernel source.
Previously, patches could only be sourced from a git repository using the 'repo' field. With this change, 'repo' becomes optional and users must specify exactly one of 'repo' or 'local_path'.
The 'local_path' field accepts glob patterns (e.g., '/path/to/*.patch'). Matching files are expanded on the controller, copied to the node, and applied in sorted order for deterministic behavior.
Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
Tested verify_cloud_hypervisor_integration tests with internal ADO pipeline.
Impacted LISA Features:
Kernel source installer tansformer
Tested Azure Marketplace Images:
None
Test Results