Skip to content

Commit

Permalink
eval: fix spurious warnings for event expressions (#1637)
Browse files Browse the repository at this point in the history
FinalExprEval stage would emit spurious warnings for event
expressions. Ignore the non time series expressions for the
eval processing as events are just passed through.
  • Loading branch information
brharrington authored Mar 29, 2024
1 parent cd48614 commit cb9421b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
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

0 comments on commit cb9421b

Please sign in to comment.