Skip to content
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

eval: fix spurious warnings for event expressions #1637

Merged
merged 2 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import com.netflix.atlas.core.model.StatefulExpr
import com.netflix.atlas.core.model.StyleExpr
import com.netflix.atlas.core.model.TimeSeries
import com.netflix.atlas.core.util.IdentityMap
import com.netflix.atlas.eval.model.ExprType
import com.netflix.atlas.eval.model.TimeGroup
import com.netflix.atlas.eval.model.TimeGroupsTuple
import com.netflix.atlas.eval.model.TimeSeriesMessage
Expand Down Expand Up @@ -101,6 +102,9 @@ private[stream] class FinalExprEval(exprInterpreter: ExprInterpreter)

// Compute the new set of expressions
recipients = sources
.filter { s =>
exprInterpreter.determineExprType(Uri(s.uri)).isTimeSeriesType
}
.flatMap { s =>
try {
val graphCfg = exprInterpreter.eval(Uri(s.uri))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ class FinalExprEvalSuite extends FunSuite {
}
}

test("ignore event exprs") {
val input = List(
sources(ds("a", "http://atlas/events?q=app,foo,:eq,(,message,),:table"))
)
val output = run(input)
assert(output.isEmpty)
}

test("division with no data should result in no data line") {
val input = List(
sources(ds("a", "http://atlas/graph?q=name,latency,:eq,:dist-avg")),
Expand Down
Loading