Add missing apptainer dispatch path for mlca / mlc apptainer run - #254
Merged
Conversation
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
🤖 AI PR Review Summary\n\nThis PR adds support for an 'apptainer' action to the script target in the MLCFlow CLI. It updates the CLI help table, extends the ScriptAction class with apptainer and apptainer_run methods that delegate to a script module function, and includes a unit test to verify the delegation. The changes are low risk, primarily additive, and follow the existing design pattern used for the 'docker' action. No major design issues detected. |
🤖 AI PR Review Summary\n\nThis PR adds support for a new 'apptainer' action in the script target of the MLCFlow CLI. It updates the CLI help table, extends the ScriptAction class with apptainer and apptainer_run methods that delegate to a script module function, and adds a unit test to verify this delegation. The changes are low risk as they follow the existing pattern used for the 'docker' action, but the new functionality depends on the presence and correctness of the 'apptainer' script module which is not shown here. |
Copilot
AI
changed the title
[WIP] Support mlca - mlc apptainer run like mlc docker run
Add missing apptainer dispatch path for Jul 4, 2026
mlca / mlc apptainer run
🤖 AI PR Review Summary\n\nThis PR adds support for an 'apptainer' action to the ScriptAction class, enabling scripts to be run inside an Apptainer containerized environment. It updates the CLI help table, integrates the new action into the dispatch logic, and provides a dedicated method with documentation. A new unit test verifies that the apptainer action correctly delegates to the script module function. The changes are low risk, mostly additive, and follow existing design patterns. However, the new action's implementation relies on the presence of an 'apptainer' script module function, which should be verified separately. |
arjunsuresh
requested changes
Jul 4, 2026
arjunsuresh
left a comment
Contributor
There was a problem hiding this comment.
@copilot can you add a github action test too like we have for mlc docker script?
Contributor
Author
Added a dedicated GitHub Actions workflow for apptainer coverage in commit |
🤖 AI PR Review Summary\n\nAdds support for 'apptainer' as a new script action in the mlc CLI, including command help updates, implementation in script_action.py, and a dedicated unit test. Also introduces a GitHub Actions workflow to run tests on Python 3.9 and 3.14. Risks are minimal but include ensuring the new 'apptainer' action integrates correctly with existing script handling and that the CI workflow triggers as expected. Design is consistent with existing patterns, but the new workflow's Python 3.14 usage may require validation for compatibility. |
🤖 AI PR Review Summary\n\nAdds Apptainer support to the MLCFlow CLI and script actions, including new subcommands and delegation methods. Introduces a GitHub Actions workflow to test Apptainer-related functionality on Python 3.9 and 3.14. Adds unit tests for the Apptainer script action delegation. Risks include potential inconsistencies in CLI argument parsing and the need to ensure Apptainer integration does not break existing workflows. The design extends existing patterns for Docker and other container runtimes, maintaining consistency. |
🤖 AI PR Review Summary\n\nAdds support for 'apptainer' and 'apptainer-run' actions in the mlc CLI and ScriptAction class, including new unit tests and a dedicated GitHub Actions workflow for testing these features. The changes introduce new commands and extend existing parsing and dispatch logic. Risks include potential integration issues with the new 'apptainer' commands and ensuring the new tests cover all edge cases. The design is consistent with existing patterns but requires validation of the new workflow and command handling. |
arjunsuresh
marked this pull request as ready for review
July 4, 2026 14:40
🤖 AI PR Review Summary\n\nAdds support for 'apptainer' and 'apptainer-run' actions in the mlc CLI and ScriptAction class, including CLI parser updates, action dispatch, and documentation. Introduces a new GitHub Actions workflow to test the Apptainer-related functionality on Python 3.9 and 3.14. Adds a unit test for the apptainer action delegation. Updates version to 1.2.5. Risks are low but include ensuring the new apptainer commands integrate correctly with existing CLI and script execution flows. Design is consistent with existing patterns but requires careful validation of the new workflow and CLI changes. |
🤖 AI PR Review Summary\n\nAdds support for 'apptainer' and 'apptainer-run' actions to the mlcflow CLI and ScriptAction class, enabling running scripts inside Apptainer containers. Introduces a new GitHub Actions workflow to test these features on Python 3.9 and 3.14. Includes a unit test for the new apptainer action delegation. Risks are low but include potential CLI parsing conflicts and ensuring the new actions integrate smoothly with existing command logic. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
mlcasupport was incomplete becauseScriptActionlacked a concrete apptainer dispatch path, somlc apptainer runwas not wired equivalently to docker flow. This PR adds the missing routing inmlcflowand aligns help text/docs for the action.✅ PR Checklist
dev📌 Note: PRs must be raised against
dev. Do not commit directly tomain.ScriptAction.apptainer()/apptainer_run()delegation tocall_script_module_function("apptainer", run_args).elif function_name == "apptainer"branch incall_script_module_function(...)to invokeautomation_instance.apptainer(run_args).✅ Testing & CI
📚 Documentation
📁 File Hygiene & Output Handling
🛡️ Safety & Security
🙌 Contribution Hygiene
Fixes #orCloses #.