Skip to content

Commit c638cf9

Browse files
committed
query: suppress plan is not a logicalplan.Node errors
This failed cast is not really an error and it floods logs with message when using Ruler with gRPC queries. Signed-off-by: Lukasz Mierzwa <lukasz@cloudflare.com>
1 parent cdca548 commit c638cf9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

pkg/api/query/querypb/plan.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
package querypb
55

66
import (
7-
"github.com/pkg/errors"
87
"github.com/thanos-io/promql-engine/api"
98
"github.com/thanos-io/promql-engine/logicalplan"
109
)
1110

1211
func NewJSONEncodedPlan(plan api.RemoteQuery) (*QueryPlan, error) {
1312
node, ok := plan.(logicalplan.Node)
1413
if !ok {
15-
return nil, errors.New("plan is not a logicalplan.Node")
14+
return nil, nil
1615
}
1716
bytes, err := logicalplan.Marshal(node)
1817
if err != nil {

0 commit comments

Comments
 (0)