feat(pipeline): add parameters support to luca run#82
Merged
Conversation
…ipeline feat(pipeline): add PipelineParameter model and parameters field to Pipeline
…line parameters feat(pipeline): add ParameterResolver for validating and merging pipeline parameters
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
parameters:block to pipeline YAML files, allowing pipelines to declare named input parameters with optional descriptions and default values.--param KEY=VALUE(repeatable) and substituted into task commands using${name}syntax before execution.default:) causes a clear error if not supplied via--param.luca runpipeline feature.Design decisions:
ParameterResolveris a separate Core component (protocol + struct) following the existing DI pattern, making it independently testable and injectable.${key}) is applied inPipelineRunnerjust before subprocess execution, keeping the pipeline model immutable.PipelineRunningprotocol gains aparameters:overload via a protocol extension default, so all existing callers remain unchanged.--paramvalues with=in the value (e.g. URLs) are handled correctly viamaxSplits: 1.Type of Change
How Has This Been Tested?
New tests added (32 tests across 4 files):
PipelineLoaderTests—parameters:block decoded from YAML, nil when absent, full fixture round-tripParameterResolverTests— 11 tests covering all resolution paths: defaults, required params, unknown params, multiple params, error descriptionsPipelineRunnerTests— 4 substitution tests: single token, multiple tokens, empty params (command unchanged), unknown token (left as-is)Manual smoke tests:
Full test suite: 444 tests, all passing.
Screenshots / Demo (if applicable)
Pipeline YAML example:
Checklist
CI Considerations
Breaking Changes?
Additional Notes
The
when:conditional execution clause (skip tasks based on parameter values) was deliberately deferred to a follow-up iteration to keep this PR focused.