azure-sdk-for-python
azure-sdk-for-python copied to clipboard
[dsl.pipeline] Pipeline support variable args as pipeline input
Description
Pipeline support variable args as pipeline inputs. Custorm can use *args and *kwargs to set the variable inputs. The value in *args will be named as args_[index]
@dsl.pipeline
def pipeline_func(component_in_number: int, component_in_path: Input, *args, **kwargs):
node = component_func1(component_in_number=component_in_number, component_in_path=component_in_path)
node_args = component_func1(component_in_number=args[0], component_in_path=args[1])
node_kwargs = component_func1(component_in_number=kwargs["component_in_number1"],
component_in_path=kwargs["component_in_path1"])
node_with_arg_kwarg = pipeline_with_variable_args(*args, **kwargs)
pipeline = pipeline_func(10, data, 11, data, component_in_number1=11, component_in_path1=data)
All SDK Contribution checklist:
- [ ] The pull request does not introduce [breaking changes]
- [ ] CHANGELOG is updated for new features, bug fixes or other significant changes.
- [ ] I have read the contribution guidelines.
General Guidelines and Best Practices
- [ ] Title of the pull request is clear and informative.
- [ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.
Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.
API change check
APIView has identified API level changes in this PR and created following API reviews.
please take a look at the conflicts