Skip to content

Commit 7520a4f

Browse files
author
Serhii Zakharov
committed
implemented conditional gathering
1 parent ec28e6e commit 7520a4f

27 files changed

+1128
-112
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"metadata": {
3+
"name": "example",
4+
"namespace": "openshift-cluster-samples-operator",
5+
"selfLink": "/apis/image.openshift.io/v1/namespaces/openshift-cluster-samples-operator/imagestreams/example",
6+
"uid": "bd11bcb8-b0be-4605-9f11-9697e84897f9",
7+
"resourceVersion": "79100",
8+
"generation": 1,
9+
"creationTimestamp": "2021-05-24T16:40:22Z"
10+
},
11+
"spec": {
12+
"lookupPolicy": {
13+
"local": false
14+
}
15+
},
16+
"status": {
17+
"dockerImageRepository": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
I0524 13:15:17.126969 28 cmd.go:331] Waiting for process with process name "cluster-samples-operator" ...
2+
I0524 13:15:17.127720 28 cmd.go:341] Watching for changes in: ([]string) (len=2 cap=2) {
3+
(string) (len=33) "/proc/14/root/etc/secrets/tls.crt",
4+
(string) (len=33) "/proc/14/root/etc/secrets/tls.key"
5+
}
6+
I0524 13:15:17.136324 28 observer_polling.go:155] Starting file observer
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
time="2021-05-24T16:37:58Z" level=info msg="processing file processserver64-postgresql-persistent-s2i.json from dir /opt/openshift/operator/x86_64/processserver/templates"
2+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir python from dir /opt/openshift/operator/x86_64"
3+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir imagestreams from dir /opt/openshift/operator/x86_64/python"
4+
time="2021-05-24T16:37:58Z" level=info msg="processing file python-rhel.json from dir /opt/openshift/operator/x86_64/python/imagestreams"
5+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir rails from dir /opt/openshift/operator/x86_64"
6+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir templates from dir /opt/openshift/operator/x86_64/rails"
7+
time="2021-05-24T16:37:58Z" level=info msg="processing file rails-pgsql-persistent.json from dir /opt/openshift/operator/x86_64/rails/templates"
8+
time="2021-05-24T16:37:58Z" level=info msg="processing file rails-postgresql-example.json from dir /opt/openshift/operator/x86_64/rails/templates"
9+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir redis from dir /opt/openshift/operator/x86_64"
10+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir imagestreams from dir /opt/openshift/operator/x86_64/redis"
11+
time="2021-05-24T16:37:58Z" level=info msg="processing file redis-rhel.json from dir /opt/openshift/operator/x86_64/redis/imagestreams"
12+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir templates from dir /opt/openshift/operator/x86_64/redis"
13+
time="2021-05-24T16:37:58Z" level=info msg="processing file redis-ephemeral.json from dir /opt/openshift/operator/x86_64/redis/templates"
14+
time="2021-05-24T16:37:58Z" level=info msg="processing file redis-persistent.json from dir /opt/openshift/operator/x86_64/redis/templates"
15+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir rhdm from dir /opt/openshift/operator/x86_64"
16+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir imagestreams from dir /opt/openshift/operator/x86_64/rhdm"
17+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhdm-decisioncentral-rhel8.json from dir /opt/openshift/operator/x86_64/rhdm/imagestreams"
18+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhdm-kieserver-rhel8.json from dir /opt/openshift/operator/x86_64/rhdm/imagestreams"
19+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir templates from dir /opt/openshift/operator/x86_64/rhdm"
20+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhdm78-authoring-ha.json from dir /opt/openshift/operator/x86_64/rhdm/templates"
21+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhdm78-authoring.json from dir /opt/openshift/operator/x86_64/rhdm/templates"
22+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhdm78-kieserver.json from dir /opt/openshift/operator/x86_64/rhdm/templates"
23+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhdm78-prod-immutable-kieserver-amq.json from dir /opt/openshift/operator/x86_64/rhdm/templates"
24+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhdm78-prod-immutable-kieserver.json from dir /opt/openshift/operator/x86_64/rhdm/templates"
25+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhdm78-trial-ephemeral.json from dir /opt/openshift/operator/x86_64/rhdm/templates"
26+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir rhpam from dir /opt/openshift/operator/x86_64"
27+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir imagestreams from dir /opt/openshift/operator/x86_64/rhpam"
28+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhpam-businesscentral-monitoring-rhel8.json from dir /opt/openshift/operator/x86_64/rhpam/imagestreams"
29+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhpam-businesscentral-rhel8.json from dir /opt/openshift/operator/x86_64/rhpam/imagestreams"
30+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhpam-kieserver-rhel8.json from dir /opt/openshift/operator/x86_64/rhpam/imagestreams"
31+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhpam-smartrouter-rhel8.json from dir /opt/openshift/operator/x86_64/rhpam/imagestreams"
32+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir templates from dir /opt/openshift/operator/x86_64/rhpam"
33+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhpam78-authoring-ha.json from dir /opt/openshift/operator/x86_64/rhpam/templates"
34+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhpam78-authoring.json from dir /opt/openshift/operator/x86_64/rhpam/templates"
35+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhpam78-kieserver-externaldb.json from dir /opt/openshift/operator/x86_64/rhpam/templates"
36+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhpam78-kieserver-mysql.json from dir /opt/openshift/operator/x86_64/rhpam/templates"
37+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhpam78-kieserver-postgresql.json from dir /opt/openshift/operator/x86_64/rhpam/templates"
38+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhpam78-managed.json from dir /opt/openshift/operator/x86_64/rhpam/templates"
39+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhpam78-prod-immutable-kieserver-amq.json from dir /opt/openshift/operator/x86_64/rhpam/templates"
40+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhpam78-prod-immutable-kieserver.json from dir /opt/openshift/operator/x86_64/rhpam/templates"
41+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhpam78-prod-immutable-monitor.json from dir /opt/openshift/operator/x86_64/rhpam/templates"
42+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhpam78-prod.json from dir /opt/openshift/operator/x86_64/rhpam/templates"
43+
time="2021-05-24T16:37:58Z" level=info msg="processing file rhpam78-trial-ephemeral.json from dir /opt/openshift/operator/x86_64/rhpam/templates"
44+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir ruby from dir /opt/openshift/operator/x86_64"
45+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir imagestreams from dir /opt/openshift/operator/x86_64/ruby"
46+
time="2021-05-24T16:37:58Z" level=info msg="processing file ruby-rhel.json from dir /opt/openshift/operator/x86_64/ruby/imagestreams"
47+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir sso from dir /opt/openshift/operator/x86_64"
48+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir imagestreams from dir /opt/openshift/operator/x86_64/sso"
49+
time="2021-05-24T16:37:58Z" level=info msg="processing file redhat-sso70-openshift-rhel7.json from dir /opt/openshift/operator/x86_64/sso/imagestreams"
50+
time="2021-05-24T16:37:58Z" level=info msg="processing file redhat-sso71-openshift-rhel7.json from dir /opt/openshift/operator/x86_64/sso/imagestreams"
51+
time="2021-05-24T16:37:58Z" level=info msg="processing file redhat-sso72-openshift-rhel7.json from dir /opt/openshift/operator/x86_64/sso/imagestreams"
52+
time="2021-05-24T16:37:58Z" level=info msg="processing file redhat-sso73-openshift-rhel7.json from dir /opt/openshift/operator/x86_64/sso/imagestreams"
53+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso74-openshift-rhel8.json from dir /opt/openshift/operator/x86_64/sso/imagestreams"
54+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir templates from dir /opt/openshift/operator/x86_64/sso"
55+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso72-https.json from dir /opt/openshift/operator/x86_64/sso/templates"
56+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso72-mysql-persistent.json from dir /opt/openshift/operator/x86_64/sso/templates"
57+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso72-mysql.json from dir /opt/openshift/operator/x86_64/sso/templates"
58+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso72-postgresql-persistent.json from dir /opt/openshift/operator/x86_64/sso/templates"
59+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso72-postgresql.json from dir /opt/openshift/operator/x86_64/sso/templates"
60+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso73-https.json from dir /opt/openshift/operator/x86_64/sso/templates"
61+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso73-mysql-persistent.json from dir /opt/openshift/operator/x86_64/sso/templates"
62+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso73-mysql.json from dir /opt/openshift/operator/x86_64/sso/templates"
63+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso73-ocp4-x509-https.json from dir /opt/openshift/operator/x86_64/sso/templates"
64+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso73-ocp4-x509-mysql-persistent.json from dir /opt/openshift/operator/x86_64/sso/templates"
65+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso73-ocp4-x509-postgresql-persistent.json from dir /opt/openshift/operator/x86_64/sso/templates"
66+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso73-postgresql-persistent.json from dir /opt/openshift/operator/x86_64/sso/templates"
67+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso73-postgresql.json from dir /opt/openshift/operator/x86_64/sso/templates"
68+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso74-https.json from dir /opt/openshift/operator/x86_64/sso/templates"
69+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso74-ocp4-x509-https.json from dir /opt/openshift/operator/x86_64/sso/templates"
70+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso74-ocp4-x509-postgresql-persistent.json from dir /opt/openshift/operator/x86_64/sso/templates"
71+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso74-postgresql-persistent.json from dir /opt/openshift/operator/x86_64/sso/templates"
72+
time="2021-05-24T16:37:58Z" level=info msg="processing file sso74-postgresql.json from dir /opt/openshift/operator/x86_64/sso/templates"
73+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir webserver from dir /opt/openshift/operator/x86_64"
74+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir imagestreams from dir /opt/openshift/operator/x86_64/webserver"
75+
time="2021-05-24T16:37:58Z" level=info msg="processing file jboss-webserver31-tomcat7-openshift-rhel7.json from dir /opt/openshift/operator/x86_64/webserver/imagestreams"
76+
time="2021-05-24T16:37:58Z" level=info msg="processing file jboss-webserver31-tomcat8-openshift-rhel7.json from dir /opt/openshift/operator/x86_64/webserver/imagestreams"
77+
time="2021-05-24T16:37:58Z" level=info msg="processing file jboss-webserver53-openjdk11-tomcat9-openshift-rhel7.json from dir /opt/openshift/operator/x86_64/webserver/imagestreams"
78+
time="2021-05-24T16:37:58Z" level=info msg="processing file jboss-webserver53-openjdk8-tomcat9-openshift-rhel7.json from dir /opt/openshift/operator/x86_64/webserver/imagestreams"
79+
time="2021-05-24T16:37:58Z" level=info msg="processing subdir templates from dir /opt/openshift/operator/x86_64/webserver"
80+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws31-tomcat7-basic-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
81+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws31-tomcat7-https-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
82+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws31-tomcat7-mysql-persistent-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
83+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws31-tomcat7-mysql-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
84+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws31-tomcat7-postgresql-persistent-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
85+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws31-tomcat7-postgresql-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
86+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws31-tomcat8-basic-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
87+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws31-tomcat8-https-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
88+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws31-tomcat8-mysql-persistent-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
89+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws31-tomcat8-mysql-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
90+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws31-tomcat8-postgresql-persistent-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
91+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws53-openjdk11-tomcat9-basic-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
92+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws53-openjdk11-tomcat9-https-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
93+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws53-openjdk11-tomcat9-mysql-persistent-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
94+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws53-openjdk11-tomcat9-mysql-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
95+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws53-openjdk11-tomcat9-postgresql-persistent-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
96+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws53-openjdk8-tomcat9-basic-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
97+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws53-openjdk8-tomcat9-https-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
98+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws53-openjdk8-tomcat9-mysql-persistent-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
99+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws53-openjdk8-tomcat9-mysql-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
100+
time="2021-05-24T16:37:58Z" level=info msg="processing file jws53-openjdk8-tomcat9-postgresql-persistent-s2i.json from dir /opt/openshift/operator/x86_64/webserver/templates"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[
2+
{
3+
"conditions": [
4+
{
5+
"type": "alert_is_firing",
6+
"params": {
7+
"name": "SamplesImagestreamImportFailing"
8+
}
9+
}
10+
],
11+
"gathering_functions": {
12+
"image_stream_definitions_of_namespace": {
13+
"namespace": "openshift-cluster-samples-operator"
14+
},
15+
"logs_of_namespace": {
16+
"label_selector": "",
17+
"namespace": "openshift-cluster-samples-operator",
18+
"tail_lines": 100
19+
}
20+
}
21+
}
22+
]

docs/insights-archive-sample/insights-operator/gathers.json

+21
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,27 @@
265265
"records_count": 1,
266266
"errors": null,
267267
"panic": null
268+
},
269+
{
270+
"name": "conditional/conditional_gatherer_rules",
271+
"duration_in_ms": 0,
272+
"records_count": 1,
273+
"errors": null,
274+
"panic": null
275+
},
276+
{
277+
"name": "conditional/image_stream_definitions_of_namespace/namespace=openshift-cluster-samples-operator",
278+
"duration_in_ms": 135,
279+
"records_count": 1,
280+
"errors": null,
281+
"panic": null
282+
},
283+
{
284+
"name": "conditional/logs_of_namespace/namespace=openshift-cluster-samples-operator,tail_lines=100",
285+
"duration_in_ms": 498,
286+
"records_count": 2,
287+
"errors": null,
288+
"panic": null
268289
}
269290
],
270291
"memory_alloc_bytes": 17411816,

pkg/gather/gather.go

+9-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"github.com/openshift/insights-operator/pkg/config/configobserver"
1717
"github.com/openshift/insights-operator/pkg/gatherers"
1818
"github.com/openshift/insights-operator/pkg/gatherers/clusterconfig"
19+
"github.com/openshift/insights-operator/pkg/gatherers/conditional"
1920
"github.com/openshift/insights-operator/pkg/gatherers/workloads"
2021
"github.com/openshift/insights-operator/pkg/record"
2122
"github.com/openshift/insights-operator/pkg/recorder"
@@ -63,8 +64,9 @@ func CreateAllGatherers(
6364
gatherKubeConfig, gatherProtoKubeConfig, metricsGatherKubeConfig, anonymizer,
6465
)
6566
workloadsGatherer := workloads.New(gatherProtoKubeConfig)
67+
conditionalGatherer := conditional.New(gatherProtoKubeConfig, metricsGatherKubeConfig)
6668

67-
return []gatherers.Interface{clusterConfigGatherer, workloadsGatherer}
69+
return []gatherers.Interface{clusterConfigGatherer, workloadsGatherer, conditionalGatherer}
6870
}
6971

7072
// CollectAndRecord gathers enabled functions of the provided gatherer and records the results to the recorder
@@ -176,7 +178,12 @@ func startGatheringConcurrently(
176178

177179
var tasks []Task
178180

179-
for functionName, gatheringClosure := range gatherer.GetGatheringFunctions() {
181+
gatheringFunctions, err := gatherer.GetGatheringFunctions(ctx)
182+
if err != nil {
183+
return nil, err
184+
}
185+
186+
for functionName, gatheringClosure := range gatheringFunctions {
180187
if !gatherAllFunctions && !utils.StringInSlice(functionName, gatherFunctionsList) {
181188
continue
182189
}

pkg/gather/mock_gatherers.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type MockGatherer struct {
1717

1818
func (*MockGatherer) GetName() string { return "mock_gatherer" }
1919

20-
func (g *MockGatherer) GetGatheringFunctions() map[string]gatherers.GatheringClosure {
20+
func (g *MockGatherer) GetGatheringFunctions(context.Context) (map[string]gatherers.GatheringClosure, error) {
2121
return map[string]gatherers.GatheringClosure{
2222
"name": {
2323
Run: func(ctx context.Context) ([]record.Record, []error) {
@@ -49,7 +49,7 @@ func (g *MockGatherer) GetGatheringFunctions() map[string]gatherers.GatheringClo
4949
},
5050
CanFail: g.CanFail,
5151
},
52-
}
52+
}, nil
5353
}
5454

5555
func (g *MockGatherer) GatherName(context.Context) ([]record.Record, []error) {
@@ -108,15 +108,15 @@ type MockCustomPeriodGatherer struct {
108108

109109
func (*MockCustomPeriodGatherer) GetName() string { return "mock_custom_period_gatherer" }
110110

111-
func (g *MockCustomPeriodGatherer) GetGatheringFunctions() map[string]gatherers.GatheringClosure {
111+
func (g *MockCustomPeriodGatherer) GetGatheringFunctions(context.Context) (map[string]gatherers.GatheringClosure, error) {
112112
return map[string]gatherers.GatheringClosure{
113113
"period": {
114114
Run: func(ctx context.Context) ([]record.Record, []error) {
115115
return g.GatherPeriod(ctx)
116116
},
117117
CanFail: false,
118118
},
119-
}
119+
}, nil
120120
}
121121

122122
func (g *MockCustomPeriodGatherer) ShouldBeProcessedNow() bool {
@@ -150,15 +150,15 @@ func (*MockCustomPeriodGathererNoPeriod) GetName() string {
150150
return "mock_custom_period_gatherer_no_period"
151151
}
152152

153-
func (g *MockCustomPeriodGathererNoPeriod) GetGatheringFunctions() map[string]gatherers.GatheringClosure {
153+
func (g *MockCustomPeriodGathererNoPeriod) GetGatheringFunctions(context.Context) (map[string]gatherers.GatheringClosure, error) {
154154
return map[string]gatherers.GatheringClosure{
155155
"should_be_processed": {
156156
Run: func(ctx context.Context) ([]record.Record, []error) {
157157
return g.GatherShouldBeProcessed(ctx)
158158
},
159159
CanFail: false,
160160
},
161-
}
161+
}, nil
162162
}
163163

164164
func (g *MockCustomPeriodGathererNoPeriod) ShouldBeProcessedNow() bool {

0 commit comments

Comments
 (0)