kfp-tekton
kfp-tekton copied to clipboard
fix(sdk): update loop dsl to handle same argument in nested loop
Which issue is resolved by this Pull Request: Resolves #1045
Description of your changes: The original loop dsl only returns the original argument name no matter the loop is nested or not, updating loop dsl to handle same argument in nested loops.
Environment tested:
- Python Version (use
python --version): - Tekton Version (use
tkn version): - Kubernetes Version (use
kubectl version): - OS (e.g. from
/etc/os-release):
Checklist:
- [x] The title for your pull request (PR) should follow our title convention. Learn more about the pull request title convention used in this repository.
cc @Udiknedormin I have to change the way how the dsl name the argument in order to fix this issue. Let me know if you see any problem with this approach.
@ScrapCodes for the sdk/python/tests/compiler/testdata/nested_loop_same_arg.yaml example, the pipeline loop cache hit triggered despite the argument is different in the next nested loop. I think your caching logic was based on the spec and and argument name, but the nested loop could have the same argument name but passing down a different value. So we may need a better way to check for this edge case as well.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Tomcli, yhwang
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [Tomcli,yhwang]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment