-
Notifications
You must be signed in to change notification settings - Fork 4
Support specifying commit in execution/task node definition #175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for specifying a commit in execution and task node definitions to enable library steps functionality. This allows pipeline nodes to reference steps from different commits or external libraries rather than only the current project's steps.
- Added
commit
property to execution and task node schemas and implementations - Refactored schema definitions to eliminate code duplication between execution and task nodes
- Updated linting logic to skip step validation when a commit is specified
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
valohai_yaml/schema_data.py | Refactored schema definitions and added commit property support |
valohai_yaml/objs/pipelines/execution_node.py | Added commit parameter and updated linting logic |
tests/test_pipeline.py | Added test for pipeline with commit functionality |
tests/conftest.py | Added test fixture for commit-based pipeline |
tests/snapshots/test_validation.ambr | Updated error message formatting with quotes |
examples/pipeline-with-different-commit.yaml | Added example configuration showing commit usage |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
) -> None: | ||
super().__init__(name=name, actions=actions, on_error=on_error) | ||
self.step = step | ||
self.commit = str(commit) if commit else None |
Copilot
AI
Oct 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converting commit to string when it's not None could cause issues if commit is already a string or if it's an unexpected type. Consider using self.commit = commit
directly since the type hint indicates it should be Optional[str].
self.commit = str(commit) if commit else None | |
self.commit = commit |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks simple enough, the more complex part is the other side of the implementation 😆
Required for supporting library steps