Skip to content

Commit

Permalink
feat: allow configurable retryStrategy (#2010)
Browse files Browse the repository at this point in the history
Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Vigith Maurice <[email protected]>
Co-authored-by: Vigith Maurice <[email protected]>
  • Loading branch information
kohlisid and vigith authored Aug 30, 2024
1 parent 55230e8 commit 40a3d2f
Show file tree
Hide file tree
Showing 30 changed files with 2,752 additions and 724 deletions.
33 changes: 33 additions & 0 deletions api/json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -17808,6 +17808,21 @@
},
"type": "object"
},
"io.numaproj.numaflow.v1alpha1.Backoff": {
"description": "Backoff defines parameters used to systematically configure the retry strategy.",
"properties": {
"interval": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Duration",
"description": "Interval sets the delay to wait before retry, after a failure occurs."
},
"steps": {
"description": "Steps defines the number of times to try writing to a sink including retries",
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"io.numaproj.numaflow.v1alpha1.BasicAuth": {
"description": "BasicAuth represents the basic authentication approach which contains a user name and a password.",
"properties": {
Expand Down Expand Up @@ -19752,6 +19767,20 @@
},
"type": "object"
},
"io.numaproj.numaflow.v1alpha1.RetryStrategy": {
"description": "RetryStrategy struct encapsulates the settings for retrying operations in the event of failures. It includes a BackOff strategy to manage the timing of retries and defines the action to take upon failure.",
"properties": {
"backoff": {
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.Backoff",
"description": "BackOff specifies the parameters for the backoff strategy, controlling how delays between retries should increase."
},
"onFailure": {
"description": "OnFailure specifies the action to take when a retry fails. The default action is to retry.",
"type": "string"
}
},
"type": "object"
},
"io.numaproj.numaflow.v1alpha1.SASL": {
"properties": {
"gssapi": {
Expand Down Expand Up @@ -20064,6 +20093,10 @@
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.Log",
"description": "Log sink is used to write the data to the log."
},
"retryStrategy": {
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.RetryStrategy",
"description": "RetryStrategy struct encapsulates the settings for retrying operations in the event of failures."
},
"udsink": {
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.UDSink",
"description": "UDSink sink is used to write the data to the user-defined sink."
Expand Down
33 changes: 33 additions & 0 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -17812,6 +17812,21 @@
}
}
},
"io.numaproj.numaflow.v1alpha1.Backoff": {
"description": "Backoff defines parameters used to systematically configure the retry strategy.",
"type": "object",
"properties": {
"interval": {
"description": "Interval sets the delay to wait before retry, after a failure occurs.",
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Duration"
},
"steps": {
"description": "Steps defines the number of times to try writing to a sink including retries",
"type": "integer",
"format": "int64"
}
}
},
"io.numaproj.numaflow.v1alpha1.BasicAuth": {
"description": "BasicAuth represents the basic authentication approach which contains a user name and a password.",
"type": "object",
Expand Down Expand Up @@ -19738,6 +19753,20 @@
}
}
},
"io.numaproj.numaflow.v1alpha1.RetryStrategy": {
"description": "RetryStrategy struct encapsulates the settings for retrying operations in the event of failures. It includes a BackOff strategy to manage the timing of retries and defines the action to take upon failure.",
"type": "object",
"properties": {
"backoff": {
"description": "BackOff specifies the parameters for the backoff strategy, controlling how delays between retries should increase.",
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.Backoff"
},
"onFailure": {
"description": "OnFailure specifies the action to take when a retry fails. The default action is to retry.",
"type": "string"
}
}
},
"io.numaproj.numaflow.v1alpha1.SASL": {
"type": "object",
"required": [
Expand Down Expand Up @@ -20051,6 +20080,10 @@
"description": "Log sink is used to write the data to the log.",
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.Log"
},
"retryStrategy": {
"description": "RetryStrategy struct encapsulates the settings for retrying operations in the event of failures.",
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.RetryStrategy"
},
"udsink": {
"description": "UDSink sink is used to write the data to the user-defined sink.",
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.UDSink"
Expand Down
15 changes: 15 additions & 0 deletions config/base/crds/full/numaflow.numaproj.io_monovertices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3615,6 +3615,21 @@ spec:
type: object
log:
type: object
retryStrategy:
properties:
backoff:
properties:
interval:
default: 1ms
type: string
steps:
format: int32
type: integer
type: object
onFailure:
default: retry
type: string
type: object
udsink:
properties:
container:
Expand Down
15 changes: 15 additions & 0 deletions config/base/crds/full/numaflow.numaproj.io_pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7571,6 +7571,21 @@ spec:
type: object
log:
type: object
retryStrategy:
properties:
backoff:
properties:
interval:
default: 1ms
type: string
steps:
format: int32
type: integer
type: object
onFailure:
default: retry
type: string
type: object
udsink:
properties:
container:
Expand Down
15 changes: 15 additions & 0 deletions config/base/crds/full/numaflow.numaproj.io_vertices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3158,6 +3158,21 @@ spec:
type: object
log:
type: object
retryStrategy:
properties:
backoff:
properties:
interval:
default: 1ms
type: string
steps:
format: int32
type: integer
type: object
onFailure:
default: retry
type: string
type: object
udsink:
properties:
container:
Expand Down
45 changes: 45 additions & 0 deletions config/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6259,6 +6259,21 @@ spec:
type: object
log:
type: object
retryStrategy:
properties:
backoff:
properties:
interval:
default: 1ms
type: string
steps:
format: int32
type: integer
type: object
onFailure:
default: retry
type: string
type: object
udsink:
properties:
container:
Expand Down Expand Up @@ -15799,6 +15814,21 @@ spec:
type: object
log:
type: object
retryStrategy:
properties:
backoff:
properties:
interval:
default: 1ms
type: string
steps:
format: int32
type: integer
type: object
onFailure:
default: retry
type: string
type: object
udsink:
properties:
container:
Expand Down Expand Up @@ -21243,6 +21273,21 @@ spec:
type: object
log:
type: object
retryStrategy:
properties:
backoff:
properties:
interval:
default: 1ms
type: string
steps:
format: int32
type: integer
type: object
onFailure:
default: retry
type: string
type: object
udsink:
properties:
container:
Expand Down
45 changes: 45 additions & 0 deletions config/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6259,6 +6259,21 @@ spec:
type: object
log:
type: object
retryStrategy:
properties:
backoff:
properties:
interval:
default: 1ms
type: string
steps:
format: int32
type: integer
type: object
onFailure:
default: retry
type: string
type: object
udsink:
properties:
container:
Expand Down Expand Up @@ -15799,6 +15814,21 @@ spec:
type: object
log:
type: object
retryStrategy:
properties:
backoff:
properties:
interval:
default: 1ms
type: string
steps:
format: int32
type: integer
type: object
onFailure:
default: retry
type: string
type: object
udsink:
properties:
container:
Expand Down Expand Up @@ -21243,6 +21273,21 @@ spec:
type: object
log:
type: object
retryStrategy:
properties:
backoff:
properties:
interval:
default: 1ms
type: string
steps:
format: int32
type: integer
type: object
onFailure:
default: retry
type: string
type: object
udsink:
properties:
container:
Expand Down
Loading

0 comments on commit 40a3d2f

Please sign in to comment.