Skip to content

Commit ae9ed66

Browse files
cici37k8s-publishing-bot
authored andcommitted
Address comment
Kubernetes-commit: a5f64b743e43687029173bd390854237a24b8579
1 parent 02998b3 commit ae9ed66

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/cel/environment/base.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ package environment
1818

1919
import (
2020
"fmt"
21-
"github.com/google/cel-go/checker"
22-
"github.com/google/cel-go/interpreter"
2321
"strconv"
2422
"sync"
2523

2624
"github.com/google/cel-go/cel"
25+
"github.com/google/cel-go/checker"
2726
"github.com/google/cel-go/ext"
27+
"github.com/google/cel-go/interpreter"
2828
"golang.org/x/sync/singleflight"
2929

3030
"k8s.io/apimachinery/pkg/util/version"
@@ -64,13 +64,15 @@ var baseOpts = []VersionedOptions{
6464
library.Lists(),
6565

6666
// cel-go v0.17.7 change the cost of has() from 0 to 1, but also provided the CostEstimatorOptions option to preserve the old behavior, so we enabled it at the same time we bumped our cel version to v0.17.7.
67+
// Since it is a regression fix, we apply it uniformly to all code use v0.17.7.
6768
cel.CostEstimatorOptions(checker.PresenceTestHasCost(false)),
6869
},
6970
ProgramOptions: []cel.ProgramOption{
7071
cel.EvalOptions(cel.OptOptimize, cel.OptTrackCost),
7172
cel.CostLimit(celconfig.PerCallLimit),
7273

7374
// cel-go v0.17.7 change the cost of has() from 0 to 1, but also provided the CostEstimatorOptions option to preserve the old behavior, so we enabled it at the same time we bumped our cel version to v0.17.7.
75+
// Since it is a regression fix, we apply it uniformly to all code use v0.17.7.
7476
cel.CostTrackerOptions(interpreter.PresenceTestHasCost(false)),
7577
},
7678
},

0 commit comments

Comments
 (0)