Skip to content

Commit

Permalink
chore: Remove unused filter name. Closes argoproj#872 (argoproj#888)
Browse files Browse the repository at this point in the history
* chore: Remove unused filter name. Closes argoproj#872

* fix test case
  • Loading branch information
whynowy committed Sep 25, 2020
1 parent 8298cea commit 0043769
Show file tree
Hide file tree
Showing 13 changed files with 231 additions and 328 deletions.
7 changes: 0 additions & 7 deletions api/openapi-spec/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions api/sensor.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 0 additions & 20 deletions api/sensor.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/tutorials/07-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ The data filter offers `comparator` “>=”, “>”, “=”, “!=”, “<
e.g.,

filters:
name: data-filter
data:
- path: body.value
type: number
Expand Down
1 change: 0 additions & 1 deletion examples/sensors/data-filter-comparator-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ spec:
eventSourceName: webhook
eventName: example
filters:
name: data-filter
data:
- path: body.value
type: number
Expand Down
1 change: 0 additions & 1 deletion examples/sensors/data-filter-value-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ spec:
eventSourceName: webhook
eventName: example
filters:
name: data-filter
data:
- path: body.value
type: number
Expand Down
1 change: 0 additions & 1 deletion examples/sensors/data-filter-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ spec:
eventSourceName: webhook
eventName: example
filters:
name: data-filter
data:
- path: bucket
type: string
Expand Down
1 change: 0 additions & 1 deletion examples/tutorials/07-filters/sensor-data-filters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ spec:
eventSourceName: webhook
eventName: example
filters:
name: data-filter
data:
- path: body.message
type: string
Expand Down
490 changes: 225 additions & 265 deletions pkg/apis/sensor/v1alpha1/generated.pb.go

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions pkg/apis/sensor/v1alpha1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions pkg/apis/sensor/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions pkg/apis/sensor/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,13 @@ type DependencyGroup struct {

// EventDependencyFilter defines filters and constraints for a event.
type EventDependencyFilter struct {
// Name is the name of event filter
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
// Time filter on the event with escalation
Time *TimeFilter `json:"time,omitempty" protobuf:"bytes,2,opt,name=time"`
Time *TimeFilter `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"`
// Context filter constraints
Context *EventContext `json:"context,omitempty" protobuf:"bytes,3,opt,name=context"`
Context *EventContext `json:"context,omitempty" protobuf:"bytes,2,opt,name=context"`

// Data filter constraints with escalation
Data []DataFilter `json:"data,omitempty" protobuf:"bytes,4,rep,name=data"`
Data []DataFilter `json:"data,omitempty" protobuf:"bytes,3,rep,name=data"`
}

// TimeFilter describes a window in time.
Expand Down
1 change: 0 additions & 1 deletion sensors/dependencies/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ func TestFilterEvent(t *testing.T) {
eventTime := time.Date(now.Year(), now.Month(), now.Day(), 16, 36, 34, 0, time.UTC)

filter := v1alpha1.EventDependencyFilter{
Name: "test-filter",
Time: &v1alpha1.TimeFilter{
Start: "09:09:09",
Stop: "19:19:19",
Expand Down

0 comments on commit 0043769

Please sign in to comment.