Commit Graph

117 Commits

Author SHA1 Message Date
Tommy Li b219b2ee1e
fix(sdk): Add new logic to cover new tekton runafter condition (#1016)
* add new logic to cover new tekton runafter condition

* fix loop condition error
2022-07-28 20:30:55 +00:00
Tommy Li 909c4f2953
fix(sdk): fix exit handler param with empty exit task (#1015) 2022-07-27 19:18:11 +00:00
Tommy Li eaac53de79
Update result name to be case sensitive (#1013)
* update result name to be case sensitive

* add custom task test case
2022-07-26 21:03:16 +00:00
Tommy Li 26b445551b
fix(sdk): Fix big data passing with multiple type of volume templates (#1006)
* fix big data passing with multiple type of volume templates

* fix lint and license

* fix multi input step bug

* refactor update volume code

* add missing tests
2022-07-19 17:53:51 +00:00
Tommy Li 126021b9d0
sdk(feat): Add big data passing with custom volume on kfp-tekton (#995)
* add big data passing with custom volume on kfp-tekton

* fix vscode typos and address errors

* Update compiler.py
2022-07-13 21:15:33 +00:00
Tommy Li 52f06b66bf
feat(sdk): Add labels for artifact outputs when tasks are not referred (#967)
* add labels for artifact outputs when tasks are not referred

* do not generate noninline test

* add option to also do individual artifactoutput

* add option to also do individual artifactoutput

* remove all output to artifact label

* fix sorting for test

* fix upstream conflicts
2022-06-20 16:20:37 +00:00
Tommy Li 566b587a9d
Add pipelinerun pod template support for security context and automou… (#955)
* add pipelinerun pod template support for security context and automount_service_account_token

* update flag to the correct type

* update flag to the correct type

* update flag to the correct type

* update usage docs
2022-05-27 17:34:13 +00:00
Tommy Li 00eaffc4ea
fix(sdk): Fix param prefix replacement (#952) 2022-05-24 15:36:57 +00:00
Yihong Wang 282353d3f9
feat(sdk): Add helper class AddOnGroup (#920)
* feat(sdk): Add helper class AddOnGroup

add a helper class for users to write a custom
OpsGroup which maps to a custom task in Tekton.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

* move finally under pipelineSpec

`finally` shall be  under `pipelineSpec`.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

* Enhance params of AddOnGroup

make `params` argument of AddOnGroup class support
static and dynamic values.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

* Add post_param() api in AddOnGroup

Add `post_param()` api to update the params of
the task

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

* Handle intermediate params

Create a dedicated API to create intermediate params
which are only used by downstream Ops/OpsGroup, but not
list in the spec.params

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

* fix incorrect param value

properly handle params that are created
from AddOnGroups in downstream Ops

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

* handle nested AddOnGroup case

An AddOnGroup can contains another AddOnGroup
as downstream OpsGroup. The group name of an AddOnGroup
needs to follow the correct name pattern to allow
the compiler to calculate the nested case properly.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

* clean up params inside the taskSpec.pipelineSpec

only keep params that are used by downstream tasks in
taskSpec.pipelineSpec.params

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

* support annotations and labels

Add properties in AddOnGroup to store annotations
and labels. Then add their key/value pairs to
metadata.annotation and metadata.labels.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

* rename the annotation property to annotations

amend the property name to plural

Signed-off-by: Yihong Wang <yh.wang@ibm.com>
2022-05-10 17:51:07 +00:00
Tommy Li ea1221a264
Fix multiple nested condition in loops issue (#928)
* fix multiple nested condition in loops issue

* update test cases to work with community cel custom task;
2022-05-04 20:58:33 +00:00
Michalina Kotwica 284891c8b0
fix(sdk) add test for any-seq inside of loop (#927)
* add test for any-seq inside of loop

* fix style: newline at the end of file

* recur when handling tekton pipeline variables

* update test name

* refactor adding a param

* add type to extracted task params inside loop

* fix style: no spaces in single-elem dict
2022-05-04 16:10:32 +00:00
Tommy Li 8ba08e28ef
fix(SDK): Update sanitization logic to sync with kfp dsl (#919)
* map sanitization logic to original kfp

* update test data to reproduce sanitization bug

* fix upstream dsl bugs on undeterministic params on long names
2022-04-22 18:17:41 +00:00
Yihong Wang b14f952ceb
fix(sdk): Apply node_selector in PipelineConf (#918)
* fix(sdk): Apply node_selector in PipelineConf

Apply the node_selector in PipelineConf to spec.podTemplate
instead of taskPodTemplate of each task.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

* update Makefile under pipelineloop

when running cli, it should do update target first

Signed-off-by: Yihong Wang <yh.wang@ibm.com>
2022-04-13 19:46:53 +00:00
Tommy Li 51c5cdd3a7
fix(sdk): fix nested loop global param bug (#917)
* fix nested loop global param bug

* fix nested loop global param bug

* add license

* fix recursion bug
2022-04-13 15:44:54 +00:00
Yihong Wang eac02f0633
fix(sdk): handle the node selectors (#916)
Handle the node selector info from PipelineConf in
compiler. Node selector info in Op level could overide
PipelinConf.
settings.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>
2022-04-12 20:43:56 +00:00
Yihong Wang 53fa9e7521
feat(sdk): extension function `Loop.enumerate()` (#901)
* feat(SDK): extension function `Loop.enumerate()`

Add helper function: `enumerate()` in Loop to
return indices and item. It could be used to get
current iteration number and item value.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

* add logic to handle nested loop

Add logic to handle nested loop and test cases

Signed-off-by: Yihong Wang <yh.wang@ibm.com>
2022-04-01 22:30:05 +00:00
Michalina Kotwica b85d4e146f
fix(sdk) add tests for non-literal separator (#896)
* add tests for non-literal separator

* plug-in the tests

* process 'separator' like 'from'-'step'-'to'

* explicitly allow PipelineParam as a separator
2022-03-28 16:21:51 +00:00
Michalina Kotwica d5e2e43992
fix(sdk) add test for custom-tasks with literals. Fixes #880 (#881)
* add test for custom-tasks with literals

* fix orig_params check for custom tasks

* fix: style: min 2 spaces before inline comment

* fix: style: 2 empty line before function decl
2022-03-17 16:19:10 +00:00
Prashant Sharma b00e8ccf82
Break task sdk update (#871)
* Update SDK to support break task as custom task.

* Added tests

* updated testdata
2022-03-08 22:24:10 +00:00
Tommy Li 9843872b3a
Fix Tekton conditional dependency on sub-dag (#866)
* Fix Tekton conditional dependency on sub-dag

* fix tekton conditional dependency on group ops
2022-03-02 17:35:04 +00:00
Michalina Kotwica 42cc312ad0
fix(sdk) add test for empty loops (#864)
* add test for empty loops

* treat no-tasks and tasks-list-empty the same

* add licenses
2022-02-28 17:07:37 +00:00
Tommy Li 6166c7c2cc
Add loop numeric sdk support (#838)
* add loop numeric sdk support

* address comments

* fix comments

* add pipelineparam as input type for loop range function
2022-02-04 17:52:44 +00:00
Tommy Li ca81bf0c75
Add support to parse pipeline param in json string (#841)
* add support to parse pipeline param in json string

* update license
2022-01-27 19:47:11 +00:00
Michalina Kotwica dc74cb2374
feat(sdk): implement loop DSL ext: from_string. Part of #791 (#837)
* handle DSL for loop item separator

* handle compilation for separator

* add tests for loop with separator

* style: self -> cls in classmethods

* fix: dsl+compile

* update test results

* style: remove unused import

* style: blank lines

* add license to tests

* fix tests: no value passing of str loop src
2022-01-25 17:38:20 +00:00
Tommy Li 1f7507120b
Enable pipelineparam for container env (#825) 2022-01-19 18:26:28 +00:00
Tommy Li b16bd8863a
Add tekton loop dsl extension skeleton (#799) 2021-12-16 01:55:35 +00:00
Prashant Sharma 0ba4831d5d
Remove noninlined files for those tests, it is not required. Added a CI check. (#755)
* Remove noninlined files for those tests, it is not required. Added a CI check.

* added the check to CI

* fixed the build

* fixed the build
2021-10-19 22:02:14 -07:00
Prashant Sharma cb7abf1535
Support data passing pipeline. (#750) 2021-10-14 09:44:08 -07:00
huixa b5c907d380
[Only review]Fix #733 the pipeline parameter consumed as file (#740) 2021-09-29 15:36:10 -07:00
Tommy Li 043d734147
Fix(sdk): chain nested conditions to work on non-dependable condition tasks. (#732)
* chain nested conditions

* add missing license

* add dependency check to remove unnecessary when expression

* minor improvement to check for the exact condition rather than just the condition task
2021-09-15 15:08:55 -07:00
Prashant Sharma cdbb588c52
feat(sdk): Update SDK to support custom task timeout on Tekton 0.27 (#709) 2021-08-23 17:52:39 -07:00
Tommy Li 9fbccd6276
Fix(sdk): Tekton copy result step sanitization (#711) 2021-08-23 13:51:39 -07:00
Tommy Li b5fe66cd9c
Make results to store in multi-steps if needed (#702)
* make results to store in multi-steps if needed

* add warning messages on oversized parameter

* regenerate tesrs

* fix copy-results format

* optimize the bin packing problem

* add docs and warning test cases
2021-08-20 10:55:54 -07:00
Tommy Li 8d8d2b3c6d
Migrate volume and loop unit tests to component.yaml and verify with v2 (#692)
* migrate unit tests to component.yaml and verify with v2

* update readme to remove volumesnapshot

* address comments
2021-08-10 13:21:25 -07:00
Michalina Kotwica 982ad5565d
fix(sdk): add test for taskRef-vs-taskSpec params (#688)
* add test for taskRef-vs-taskSpec params

* fix: taskSpec accepting params

* add license headers

* m: no spaces around "buzz"

* fix: test file custom_task_spec.yaml

* m: follow links on newlines

* fix: big_data_passing test result yamls

* fix: yamls of other tests

* factor out conditions to process params

* fix big data rewrite for regular tasks
2021-08-03 15:01:41 -07:00
Tommy Li 186a9e301f
Update code to limit loop resource group name (#686)
* update code to limit loop resource group name

* add license
2021-08-02 19:57:11 -07:00
Tommy Li d9b8539b0d
feature(backend): Allow KFP apiserver to create recursion pipelineLoop CRs for the users (#512)
* add auto apply custom task CRs before pipelineRun creation

* fix lint

* store loop resource in ordered dict

* Update kfp-admin-guide.md

* sorted pipeline params to avoid randomness

* sorted pipeline params to avoid randomness

* regenerate tests

* convert template string from yaml to json

* regenerate tests

* clean up unnecessary helper function

* resolve merge conflicts

* resolve merge conflicts

* remove unnecessary go mod package

* only opt-in to embed the recursion loop annotations

* only opt-in to embed the recursion loop annotations

* enable opt-in only via package variable

* add example for how to inline recursive loops

* resolve conflicts

* regenerate tests

* make auto generate and apply recursive pipelineloop in annotations as default

* move parameter sorting to the end

* add parameter sorting for recursion loops

* sort recursive task parameters

* add more details on how to opt-out auto apply custom resource
2021-07-21 00:26:50 -07:00
Gang Pu 592b5d2205
Fix the yaml dump issue of boolean value (#665)
* Fix the yaml dump issue of boolean value

* update conditions_with_global_params.py file
2021-07-12 22:12:17 -07:00
Prashant Sharma dbd92cb7ec
feat(sdk): inline user defined custom tasks (#636) 2021-07-02 10:26:11 -07:00
Gang Pu 791fe5304a
Fix the issue when loop/graph inside a graph (#650) 2021-07-01 17:09:10 -07:00
Prashant Sharma 64d4324f2b
feat(sdk): Sdk ParallelFor task spec inline (#633)
* TODO1: PipelineLoop inlined including nested loops and added tests.

* Supported recursive and parallel tasks inlining.

    For recursive tasks, we simply skip them.
    For Parallel tasks, relevant tests were added.

* Run all tests against inlined taskSpec and normal taskRefs

* Added CLI Flag disable/enable spec inlining.
2021-06-29 19:07:36 -07:00
Tommy Li aae4671e7b
Fix nested recursion with condition custom task and parameter mapping (#625)
* fix nested recursion with condition custom task and parameter mapping

* fix alpine commands and add licenses
2021-06-18 14:56:14 -07:00
Tommy Li af9f03d000
fix(sdk): Fix nested recursion runafter and param mapping; (#609) 2021-06-03 20:07:37 -07:00
Gang Pu a033f33b30
Fix and verify nested recursive workflow (#600)
* Fix and verify nested recursive workflow

* Fix unit_test error

* Update compiler.py

* Try to fix travis error

* Refresh yaml

Co-authored-by: Tommy Li <Tommy.chaoping.li@ibm.com>
2021-06-01 00:25:04 -07:00
Tommy Li 73d5445482
Add support to generate custom task with custom task cr (#593) 2021-05-22 02:53:30 -07:00
Gang Pu 95557c6d36
Support parallelism feature on DSL side (#592) 2021-05-20 00:51:46 -07:00
Tommy Li 1bf5aa5d13
Fix custom task condition I/O behaviors on recursion and for loop (#587)
* fix custom task I/O behaviors on recursion and while loop

* Fix comment typo
2021-05-15 02:00:29 -07:00
Gang Pu 98b356cbb1
Fix the issue when there's a conditional loop (#562) 2021-04-23 09:44:43 -07:00
Tommy Li e68e03e6c3
Fix recursive loop bug with no sub_group.ops (#556) 2021-04-21 06:15:41 -07:00
Tommy Li 103ae3b79b
Fix long param compile errors (#549) 2021-04-20 10:13:41 -07:00