Skip to content

Commit

Permalink
Adding checks for backward compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com>
  • Loading branch information
pedro-stanaka committed May 21, 2024
1 parent 35dfb9e commit 397d99f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/query/remote_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ func (r *remoteQuery) Exec(ctx context.Context) *promql.Result {
}

ts := msg.GetTimeseries()
if ts == nil {
continue
}
builder.Reset()
for _, l := range ts.Labels {
builder.Add(strings.Clone(l.Name), strings.Clone(l.Value))
Expand Down Expand Up @@ -378,6 +381,9 @@ func (r *remoteQuery) Exec(ctx context.Context) *promql.Result {
}

ts := msg.GetTimeseries()
if ts == nil {
continue
}
builder.Reset()
for _, l := range ts.Labels {
builder.Add(strings.Clone(l.Name), strings.Clone(l.Value))
Expand Down

0 comments on commit 397d99f

Please sign in to comment.