Commit Graph

271 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 e2aa560a4c
Add alpha feature to output big data passing file path instead of task run name (#993)
* stage

* regenerate tests

* regenerate tests

* update comments

* resolve conflicts

* fix immediate bug

* parametize path suffix name
2022-07-19 22:20:20 +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
Federica Filippini a9f148343b
fix(sdk): Support passing directories in step-copy-results-artifacts and step-copy-artifacts. Fixes #996 (#997)
* Added support to directories in step-copy-results-artifacts script

Check if the provided result (src) is a directory; if so, create a tar.gz archive and compute the ARTIFACT_SIZE on {src}.tar.gz.
Moreover, print on {dst} file the list of files in {src}.tar.gz (namely, the result of `tar -tzf {src}.tar.gz`) instead of copying directly {src} into {dst}

* Add support to directories in step-copy-artifacts script

Added check [ -d "$2" ] to allow directories to be transmitted as artifacts

* Update unit tests

* Update sdk/python/kfp_tekton/compiler/_data_passing_rewriter.py

Co-authored-by: Tommy Li <Tommy.chaoping.li@ibm.com>

* reducing script size

* generated tests

* removed whitespace identified by lint test

* fixed error (missing suffix)

* generated tests

Co-authored-by: Tommy Li <Tommy.chaoping.li@ibm.com>
2022-07-19 17:51:49 +00:00
Tommy Li 7d9f8c9a30
Add alpha preview feature into compiler (#991)
* add alpha preview feature into compiler

* address comments

* fix typo
2022-07-18 17:07:09 +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 00339aa99f
Update sdk version to 1.2.3 (#1002)
* update sdk version to 1.2.3

* Update README.md
2022-07-12 21:26:02 +00:00
Alan Chin 243c15c87f
`chore(sdk) Bump kfp dependency to 1.8.13` (#999) 2022-07-12 17:03:31 +00:00
Yihong Wang 933945480e
eliminate the use of `taskSpec.script` (#992)
when using script, it generates an init container to process the script.
we'd like to avoid the init container in pipelinerun.
remove `script` and use `command` and `arg` instead.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>
2022-07-08 18:43:52 +00:00
Maximilien de Bayser bce9814651
fix(sdk): Verify binary data in step copy-results-artifacts. Fixes #984 (#985)
* Add binary character check to copy-results-artifacts

* Update unit tests
2022-07-06 19:46:45 +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 7c0cc3a365
Update sdk dependency and release version to address private python package pull (#979)
* update sdk dependency and releases

* update sdk dependency and releases
2022-06-17 22:32:34 +00:00
Yihong Wang 66c09441a9
fix(sdk): update condition template (#975)
eliminate the use of `script`, replace it with
command and args. this also removes the init container that
prepares the script.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>
2022-06-07 22:11:15 +00:00
Yihong Wang 80739c0239
upgrade tekton to 0.36.0 (#938)
* upgrade tekton to 0.35.1

Upgrade tekton to 0.35.1, including:
- tekton manifests
- go.mod to use new pkg and update all related pkgs
- update pipeline-loops to also use new tekton pkg

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

* update tekton to 0.36

update tekton, license files, and cache server

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

* fix compile error on test code

for taskrun's step, it doesn't use container data struct
any more

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

* update compiler

add `type` for the taskSpec.results and update all
yaml files accordingly

Signed-off-by: Yihong Wang <yh.wang@ibm.com>
2022-06-03 21:57:26 +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 1ef7b03af4
Update sdk release to 1.2.1 (#929) 2022-05-06 15:04:50 +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 c854c27108
Add necessary env variables for resource op owner reference (#925) 2022-04-29 19:52:00 +00:00
Tommy Li 7dd94985b3
Add resource op owner reference mapping (#922) 2022-04-28 16:27: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
Tommy Li be74f6612d
Add 1.2 release changes (#875)
* add 1.2 release changes

* update install readme
2022-03-10 22:46:54 +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 94dbd2a65a
Add caching labels for inline loops and custom tasks (#870) 2022-03-08 00:25:28 +00:00
Tommy Li 119e6acf62
Update kfp sdk dependency to 1.8.10+ (#868)
* update kfp sdk dependency to 1.8.10+

* Remove local env details

* update upper bound kfp dependency to 1.8.11 for more stable releases
2022-03-04 18:06:59 +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 acd5d53717
Add KFP-Tekton 1.1.1 release (#847)
* add 1.1.1-release patch

* add 1.1.1-release patch

* update patche for openshift permission
2022-02-10 22:27:40 +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
Michalina Kotwica eab7b4c606
fix(sdk) separator param. Part of #791 (#842)
* m: typo in a comment

* remove separator param in loop spec

* update test
2022-02-01 17:53:59 +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 89f4e418bc
Update performance script to include more metrics (#832) 2022-01-22 02:34:46 +00:00
ted chang 793854829e
Additional param to enable running copies of same pipeline concurrently (#828)
Signed-off-by: ted chang <htchang@us.ibm.com>
2022-01-20 18:50:53 +00:00
Tommy Li 1f7507120b
Enable pipelineparam for container env (#825) 2022-01-19 18:26:28 +00:00
Tommy Li b1bb32b4e9
kfp-tekton 1.1 release (#814)
* add kfp-tekton 1.1 release

* update manifest with the latest commits

* migrating rest of v1beta1 to v1 api
2022-01-12 19:11:10 +00:00
Tommy Li ed7673cd37
Add option to produce pipelinerun taskspec as taskref (#810)
* add option to produce taskspec as taskref

* add rbac for task templates
2022-01-11 01:19:42 +00:00
Tommy Li 3bb2767d1b
Chore: regenerate python tests (#812) 2022-01-06 22:01:41 +00:00
Tommy Li 2fac70f1d4
Reduce component spec annotations (#805)
* reduce component spec annotations

* add option to opt out component spec annotations

* fix lint
2022-01-06 18:28:36 +00:00
Tommy Li b16bd8863a
Add tekton loop dsl extension skeleton (#799) 2021-12-16 01:55:35 +00:00