Skip to content

Commit 93f726f

Browse files
authored
chore(docs): Move loop to custom feature since it's not Tekton native (kubeflow#1067)
1 parent de32d58 commit 93f726f

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

sdk/FEATURES.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ and test pipelines found in the KFP repository.
1818
- [Affinity, Node Selector, and Tolerations](#affinity-node-selector-and-tolerations)
1919
- [ImagePullSecrets](#imagepullsecrets)
2020
- [Exit Handler](#exit-handler)
21-
- [Pipeline Loops](#pipeline-loops)
2221
- [Any Sequencer](#any-sequencer)
2322
- [Tekton Pipeline Variables](#tekton-pipeline-variables)
2423
- [Sidecars](#sidecars)
@@ -31,6 +30,7 @@ and test pipelines found in the KFP repository.
3130
- [Input Artifacts](#input-artifacts)
3231
- [Output Artifacts](#output-artifacts)
3332
- [Caching](#caching)
33+
- [Pipeline Loops](#pipeline-loops)
3434
- [Enforce Artifact Tracking](#enforce-artifact-tracking)
3535
- [Features with Limitations](#features-with-limitations)
3636
- [Variable Substitutions](#variable-substitutions)
@@ -128,25 +128,6 @@ the [exit_handler](/sdk/python/tests/compiler/testdata/exit_handler.py) compiler
128128

129129
The `finally` syntax is supported since Tekton version `0.14.0`.
130130

131-
### Pipeline Loops
132-
133-
PipelineLoops is a feature for running a component or a set of component tasks multiple times in a loop. Right now, Tekton supports loop pipeline/tasks via an implementation of [Tekton Custom Tasks Controller](https://github.com/tektoncd/community/blob/master/teps/0002-custom-tasks.md) named as "PipelineLoop". Please refer to the examples [here](/tekton-catalog/pipeline-loops/examples) to understand more details about the usage of loops.
134-
135-
By default, the SDK will not compile all the recursion loop resources in the pipelineRun annotations. If you want to apply the recursion loop resources together with pipelinerun as an admin, add the following code snippet before compiling the pipeline.
136-
```python
137-
import kfp_tekton
138-
kfp_tekton.compiler.LOOP_RESOURCES_IN_SEPARATE_YAML=False
139-
```
140-
141-
To use this feature, please ensure Tekton version >= v0.19, and "data.enable-custom-tasks" is "true" in feature-flags configmap:
142-
`kubectl edit cm feature-flags -n tekton-pipelines`
143-
144-
To see how the Python SDK provides this feature, refer to the examples below:
145-
- [loop_static](/sdk/python/tests/compiler/testdata/loop_static.py)
146-
- [withparam_global](/sdk/python/tests/compiler/testdata/withparam_global.py)
147-
- [withitem_nested](/sdk/python/tests/compiler/testdata/withitem_nested.py)
148-
- [parallelfor_item_argument_resolving](/sdk/python/tests/compiler/testdata/parallelfor_item_argument_resolving.py)
149-
150131
### Any Sequencer
151132

152133
When any one of the task dependencies completes successfully and the conditions meet, the dependent task will be started. Order of execution of the dependencies doesn’t matter, and the pipeline doesn't wait for all the task dependencies to complete before moving to the next step. Condition can be applied to enforce the task dependencies completes as expected. The condition expression should be the same format as is in Kubeflow ConditionOperator, and the result of containerOps can be used in expression. Notice the expression should only contain results from only one task because the purpose here is to check the simple condition for the task's output when a task complete. And also the operand in the expression should be int or string, other python types will be transferred to string automatically.
@@ -257,6 +238,25 @@ By default compiling a pipeline will add metadata annotations and labels so that
257238

258239
The specific annotations and labels that are added to the task spec metadata to enable caching are: `annotations={'tekton.dev/template': ""}` and `labels={'pipelines.kubeflow.org/cache_enabled': 'true', 'pipelines.kubeflow.org/pipelinename': '', 'pipelines.kubeflow.org/generation': ''}`.
259240

241+
### Pipeline Loops
242+
243+
PipelineLoops is a feature for running a component or a set of component tasks multiple times in a loop. Right now, Tekton supports loop pipeline/tasks via an implementation of [Tekton Custom Tasks Controller](https://github.com/tektoncd/community/blob/master/teps/0002-custom-tasks.md) named as "PipelineLoop". Please refer to the examples [here](/tekton-catalog/pipeline-loops/examples) to understand more details about the usage of loops.
244+
245+
By default, the SDK will not compile all the recursion loop resources in the pipelineRun annotations. If you want to apply the recursion loop resources together with pipelinerun as an admin, add the following code snippet before compiling the pipeline.
246+
```python
247+
import kfp_tekton
248+
kfp_tekton.compiler.LOOP_RESOURCES_IN_SEPARATE_YAML=False
249+
```
250+
251+
To use this feature, please ensure Tekton version >= v0.19, and "data.enable-custom-tasks" is "true" in feature-flags configmap:
252+
`kubectl edit cm feature-flags -n tekton-pipelines`
253+
254+
To see how the Python SDK provides this feature, refer to the examples below:
255+
- [loop_static](/sdk/python/tests/compiler/testdata/loop_static.py)
256+
- [withparam_global](/sdk/python/tests/compiler/testdata/withparam_global.py)
257+
- [withitem_nested](/sdk/python/tests/compiler/testdata/withitem_nested.py)
258+
- [parallelfor_item_argument_resolving](/sdk/python/tests/compiler/testdata/parallelfor_item_argument_resolving.py)
259+
260260
### Enforce Artifact Tracking
261261

262262
If you pipelines require artifact tracking in order to run, enforce artfact tracking to be always on for your pipelines using one of the two ways.

0 commit comments

Comments
 (0)