feat: add postdownload script support for agent types#2573
Merged
Conversation
a96a838 to
29f1bee
Compare
afcae14 to
db6b9b3
Compare
5896d6a to
dbcaa9f
Compare
29234fe to
69e4025
Compare
69e4025 to
46bd05d
Compare
DavSanchez
reviewed
Jun 19, 2026
| pub struct PostDownloadHook { | ||
| /// Absolute path to the command/executable (e.g., "/bin/bash", "/usr/bin/python3") | ||
| pub path: String, | ||
| /// Arguments where first element is the script path, followed by additional arguments. |
Contributor
There was a problem hiding this comment.
Align documentation with the other PostDownloadHook type:
Suggested change
| /// Arguments where first element is the script path, followed by additional arguments. | |
| /// Arguments passed to the executable on [`path`]. |
46bd05d to
56c6e3e
Compare
56c6e3e to
8d9d29e
Compare
danielorihuela
previously approved these changes
Jun 19, 2026
8d9d29e to
bce13a6
Compare
danielorihuela
approved these changes
Jun 19, 2026
DavSanchez
approved these changes
Jun 19, 2026
Comment on lines
+49
to
+51
| pub fn new(package_dir: PathBuf) -> Self { | ||
| Self { package_dir } | ||
| } |
Contributor
There was a problem hiding this comment.
Not to fix here, but this could have been a From implementation!
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.
Summary
Implements post-download hook functionality that executes custom scripts after OCI package extraction. This enables packages to perform installation steps, validations, and system configuration that cannot be handled through simple file extraction.
Changes
Core Implementation:
PostDownloadHookstruct withpath,args, andenvfields inpackage.rsandrendered.rspost_download_hook: Option<PostDownloadHook>toPackagestructPostDownloadHookExecutorto handle hook execution with proper error handling and timeoutsOCIPackageManager.install()workflowHook Execution:
path= interpreter/command,args[0]= script path,args[1..]= script argumentsAgent Type Structure: