Skip to content

Commit

Permalink
feat(API): Add TriggerPolicy to pipeline_spec (kubeflow#5080)
Browse files Browse the repository at this point in the history
* Add TriggerPolicy to pipeline_spec

* fix comments
  • Loading branch information
chensun authored Feb 3, 2021
1 parent 6f1ab50 commit 628e970
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions api/v2alpha1/pipeline_spec.proto
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,21 @@ message PipelineTaskSpec {
// Reference to a component. Use this field to define either a DAG or an
// executor.
ComponentRef component_ref = 7;

// Trigger policy defines how the task gets triggered. If a task is not
// triggered, it will run into NOT_TRIGGERED state.
message TriggerPolicy {
// An expression which will be evaluated into a boolean value. True to
// trigger the task to run. The expression follows the language of
// [CEL Spec][https://github.com/google/cel-spec]. It can access the data
// from [ExecutorInput][] message of the task.
// For example:
// - `inputs.artifacts['model'][0].properties['accuracy']*100 > 90`
// - `inputs.parameters['type'] == 'foo' && inputs.parameters['num'] == 1`
string condition = 1;
}
// Trigger policy of the task.
TriggerPolicy trigger_policy = 8;
}

message ComponentRef {
Expand Down

0 comments on commit 628e970

Please sign in to comment.