influxdata / influxdata/kapacitor

Fix TestServer_Alert_Aggregate

Open
#1,366 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.4k
Forks
479
Avg merge
4d 16h
Merged PRs (30d)
4

Description

```
--- FAIL: TestServer_Alert_Aggregate (1.18s)
server_test.go:8749: unexpected tcp request:
exp
[{ID:id-agg Message:Received 3 events in the last 100ms. Details:message
message
message Time:1970-01-01 00:00:00.002 +0000 UTC Duration:2ms Level:CRITICAL Data:{"series":[{"name":"alert","columns":["time","value"],"values":[["1970-01-01T00:00:00Z",3]]},{"name":"alert","columns":["time","value"],"values":[["1970-01-01T00:00:00.001Z",4]]},{"name":"alert","columns":["time","value"],"values":[["1970-01-01T00:00:00.002Z",2]]}]}}]
got
[{ID:id-agg Message:Received 1 events in the last 100ms. Details:message Time:1970-01-01 00:00:00 +0000 UTC Duration:0s Level:CRITICAL Data:{"series":[{"name":"alert","columns":["time","value"],"values":[["1970-01-01T00:00:00Z",3]]}]}}]
server_test.go:8775: unexpected topic events for aggregate topic:
got
{Link:{Relation:self Href:/kapacitor/v1preview/alerts/topics/tcp/events} Topic:tcp Events:[{Link:{Relation:self Href:/kapacitor/v1preview/alerts/topics/tcp/events/id-agg} ID:id-agg State:{Message:Received 1 events in the last 100ms. Details:message Time:1970-01-01 00:00:00 +0000 UTC Duration:0 Level:CRITICAL}}]}
exp
{Link:{Relation:self Href:/kapacitor/v1preview/alerts/topics/tcp/events} Topic:tcp Events:[{Link:{Relation:self Href:/kapacitor/v1preview/alerts/topics/tcp/events/id-agg} ID:id-agg State:{Message:Received 3 events in the last 100ms. Details:message
message
message Time:1970-01-01 00:00:00.002 +0000 UTC Duration:2000000 Level:CRITICAL}}]}
```

Contributor guide

Open the contributing guide

Research direction

Start with server_test.go around lines 8749 and 8775, where TestServer_Alert_Aggregate reports the unexpected TCP request and aggregate topic events. Run this test to reproduce the failure and inspect the expected versus actual aggregate state. Done means the test passes with all three events represented in the aggregate message and topic event.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.