Skip to content

Commit bd4b057

Browse files
feat: add support for OnSuccess sink (#3040)
Signed-off-by: Vaibhav Tiwari <[email protected]> Signed-off-by: Vigith Maurice <[email protected]> Co-authored-by: Vigith Maurice <[email protected]>
1 parent 0745eba commit bd4b057

File tree

36 files changed

+10511
-1644
lines changed

36 files changed

+10511
-1644
lines changed

api/json-schema/schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22485,6 +22485,10 @@
2248522485
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.Log",
2248622486
"description": "Log sink is used to write the data to the log."
2248722487
},
22488+
"onSuccess": {
22489+
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.AbstractSink",
22490+
"description": "OnSuccess sink allows triggering a secondary sink operation only after the primary sink completes successfully The writes to OnSuccess sink will only be initiated if the ud-sink response field sets it. A new Message crafted in the Primary sink can be written on the OnSuccess sink."
22491+
},
2248822492
"pulsar": {
2248922493
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.PulsarSink",
2249022494
"description": "Pulsar sink is used to write the data to the Apache Pulsar."

api/openapi-spec/swagger.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22472,6 +22472,10 @@
2247222472
"description": "Log sink is used to write the data to the log.",
2247322473
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.Log"
2247422474
},
22475+
"onSuccess": {
22476+
"description": "OnSuccess sink allows triggering a secondary sink operation only after the primary sink completes successfully The writes to OnSuccess sink will only be initiated if the ud-sink response field sets it. A new Message crafted in the Primary sink can be written on the OnSuccess sink.",
22477+
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.AbstractSink"
22478+
},
2247522479
"pulsar": {
2247622480
"description": "Pulsar sink is used to write the data to the Apache Pulsar.",
2247722481
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.PulsarSink"

config/base/crds/full/numaflow.numaproj.io_monovertices.yaml

Lines changed: 667 additions & 0 deletions
Large diffs are not rendered by default.

config/base/crds/full/numaflow.numaproj.io_pipelines.yaml

Lines changed: 667 additions & 0 deletions
Large diffs are not rendered by default.

config/base/crds/full/numaflow.numaproj.io_servingpipelines.yaml

Lines changed: 667 additions & 0 deletions
Large diffs are not rendered by default.

config/base/crds/full/numaflow.numaproj.io_vertices.yaml

Lines changed: 667 additions & 0 deletions
Large diffs are not rendered by default.

config/install.yaml

Lines changed: 3245 additions & 577 deletions
Large diffs are not rendered by default.

config/namespace-install.yaml

Lines changed: 3245 additions & 577 deletions
Large diffs are not rendered by default.

docs/APIs.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12086,6 +12086,31 @@ it.
1208612086

1208712087
<td>
1208812088

12089+
<code>onSuccess</code></br> <em>
12090+
<a href="#numaflow.numaproj.io/v1alpha1.AbstractSink"> AbstractSink </a>
12091+
</em>
12092+
</td>
12093+
12094+
<td>
12095+
12096+
<em>(Optional)</em>
12097+
<p>
12098+
12099+
OnSuccess sink allows triggering a secondary sink operation only after
12100+
the primary sink completes successfully The writes to OnSuccess sink
12101+
will only be initiated if the ud-sink response field sets it. A new
12102+
Message crafted in the Primary sink can be written on the OnSuccess
12103+
sink.
12104+
</p>
12105+
12106+
</td>
12107+
12108+
</tr>
12109+
12110+
<tr>
12111+
12112+
<td>
12113+
1208912114
<code>retryStrategy</code></br> <em>
1209012115
<a href="#numaflow.numaproj.io/v1alpha1.RetryStrategy"> RetryStrategy
1209112116
</a> </em>

pkg/apis/numaflow/v1alpha1/const.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const (
6363
CtrUdf = "udf"
6464
CtrUdsink = "udsink"
6565
CtrFallbackUdsink = "fb-udsink"
66+
CtrOnSuccessUdsink = "ons-udsink"
6667
CtrUdsource = "udsource"
6768
CtrUdtransformer = "transformer"
6869
CtrUdSideInput = "udsi"
@@ -73,13 +74,14 @@ const (
7374
CtrUdStore = "udstore"
7475

7576
// user-defined container types
76-
UDContainerFunction = "udf"
77-
UDContainerSink = "udsink"
78-
UDContainerFallbackSink = "fb-udsink"
79-
UDContainerTransformer = "transformer"
80-
UDContainerSource = "udsource"
81-
UDContainerSideInputs = "udsi"
82-
UDContainerStore = "udstore"
77+
UDContainerFunction = "udf"
78+
UDContainerSink = "udsink"
79+
UDContainerFallbackSink = "fb-udsink"
80+
UDContainerOnSuccessSink = "ons-udsink"
81+
UDContainerTransformer = "transformer"
82+
UDContainerSource = "udsource"
83+
UDContainerSideInputs = "udsi"
84+
UDContainerStore = "udstore"
8385

8486
// components
8587
ComponentISBSvc = "isbsvc"

0 commit comments

Comments
 (0)