-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fallback Pipeline addition in core/v2 #16
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
@@ -168,9 +168,13 @@ message CheckConfig { | |||
// Pipelines are the pipelines this check will use to process its events. | |||
repeated ResourceReference pipelines = 32 [ (gogoproto.jsontag) = "pipelines" ]; | |||
|
|||
repeated MetricThreshold output_metric_thresholds = 33 [ (gogoproto.jsontag) = "output_metric_thresholds,omitempty", (gogoproto.moretags) = "yaml: \"output_metric_thresholds,omitempty\"" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we need to avoid changing field numbers since they're used for serialization/deserialization. We might end up with a scenario where the data was stored with field number 33
in etcd and read back with field number 34, effectively breaking serialization.
v2/check.proto
Outdated
// MetricThresholds are a list of thresholds to apply to metrics in order to determine | ||
// the check status. | ||
repeated MetricThreshold output_metric_thresholds = 47 [ (gogoproto.jsontag) = "output_metric_thresholds,omitempty", (gogoproto.moretags) = "yaml: \"output_metric_thresholds,omitempty\"" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment about field numbers.
v2/check.proto
Outdated
@@ -328,11 +332,14 @@ message Check { | |||
// Pipelines are the pipelines this check will use to process its events. | |||
repeated ResourceReference pipelines = 46 [ (gogoproto.jsontag) = "pipelines" ]; | |||
|
|||
//fallback pieplines detials in order of execution | |||
repeated ResourceReference fallback_pipeline = 47 [ (gogoproto.jsontag) = "fallback_pipeline" ,(gogoproto.moretags) = "yaml: \"fallback_pipeline,omitempty\"" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there can be more than one this field should be plural (fallback_pipelines).
v2/check.proto
Outdated
@@ -328,11 +332,14 @@ message Check { | |||
// Pipelines are the pipelines this check will use to process its events. | |||
repeated ResourceReference pipelines = 46 [ (gogoproto.jsontag) = "pipelines" ]; | |||
|
|||
//fallback pieplines detials in order of execution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: should be details
v2/secret.proto
Outdated
@@ -1,7 +1,7 @@ | |||
syntax = "proto3"; | |||
|
|||
import "github.com/gogo/[email protected]/gogoproto/gogo.proto"; | |||
import "github.com/sensu/core/v2/meta.proto"; | |||
//import "github.com/sensu/core/v2/meta.proto"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not used it should be removed.
v2/types_gen.go
Outdated
// this at the time of this writing. | ||
|
||
// | ||
//TODO: go build will build the latest version of the protoc-gen-gofast module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: I think your editor might be removing the spaces after //
in comments. We probably want the spaces for consistency.
v2/pipeline.proto
Outdated
//FallbackPipelineListflow Pipelinelist = 2 [ (gogoproto.jsontag) = "pipelinelist", (gogoproto.moretags) = "yaml: \"pipelinelist\"" ]; | ||
repeated ResourceReference pipelist =2 [ (gogoproto.jsontag) = "pipelinelist", (gogoproto.moretags) = "yaml: \"pipelinelist\"" ]; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: no need for the extra empty lines.
v2/pipeline.proto
Outdated
|
||
// FallbackpipelineList contains one or more pipeline list. | ||
//FallbackPipelineListflow Pipelinelist = 2 [ (gogoproto.jsontag) = "pipelinelist", (gogoproto.moretags) = "yaml: \"pipelinelist\"" ]; | ||
repeated ResourceReference pipelist =2 [ (gogoproto.jsontag) = "pipelinelist", (gogoproto.moretags) = "yaml: \"pipelinelist\"" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it Pipelinelist
or pipelist
? I believe it should be PipelineList
with camel-case.
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
Signed-off-by: manisha kumari <[email protected]>
@fguimond addressed all review points |
Signed-off-by: manisha kumari <[email protected]>
Related to Fallback-pipeline execution task [https://github.com/sensu/sensu-enterprise-go/issues/1918]
Addition of FallbackPipeline Resource in core/v2 and related yaml structure