mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-08-23 22:26:49 +00:00
🌱 Bump github.com/google/cel-go from 0.26.0 to 0.26.1 (#1219)
Scorecard supply-chain security / Scorecard analysis (push) Failing after 24s
Post / coverage (push) Failing after 24s
Post / images (amd64, addon-manager) (push) Failing after 26s
Post / images (amd64, placement) (push) Failing after 28s
Post / images (amd64, registration) (push) Failing after 17s
Post / images (amd64, registration-operator) (push) Failing after 25s
Post / images (amd64, work) (push) Failing after 16s
Post / images (arm64, addon-manager) (push) Failing after 18s
Post / images (arm64, placement) (push) Failing after 28s
Post / images (arm64, registration) (push) Failing after 23s
Post / images (arm64, registration-operator) (push) Failing after 24s
Post / images (arm64, work) (push) Failing after 19s
Post / image manifest (addon-manager) (push) Has been skipped
Post / image manifest (placement) (push) Has been skipped
Post / image manifest (registration) (push) Has been skipped
Post / image manifest (registration-operator) (push) Has been skipped
Post / image manifest (work) (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Failing after 27s
Scorecard supply-chain security / Scorecard analysis (push) Failing after 24s
Post / coverage (push) Failing after 24s
Post / images (amd64, addon-manager) (push) Failing after 26s
Post / images (amd64, placement) (push) Failing after 28s
Post / images (amd64, registration) (push) Failing after 17s
Post / images (amd64, registration-operator) (push) Failing after 25s
Post / images (amd64, work) (push) Failing after 16s
Post / images (arm64, addon-manager) (push) Failing after 18s
Post / images (arm64, placement) (push) Failing after 28s
Post / images (arm64, registration) (push) Failing after 23s
Post / images (arm64, registration-operator) (push) Failing after 24s
Post / images (arm64, work) (push) Failing after 19s
Post / image manifest (addon-manager) (push) Has been skipped
Post / image manifest (placement) (push) Has been skipped
Post / image manifest (registration) (push) Has been skipped
Post / image manifest (registration-operator) (push) Has been skipped
Post / image manifest (work) (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Failing after 27s
Bumps [github.com/google/cel-go](https://github.com/google/cel-go) from 0.26.0 to 0.26.1. - [Release notes](https://github.com/google/cel-go/releases) - [Commits](https://github.com/google/cel-go/compare/v0.26.0...v0.26.1) --- updated-dependencies: - dependency-name: github.com/google/cel-go dependency-version: 0.26.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
@@ -12,7 +12,7 @@ require (
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
|
||||
github.com/evanphx/json-patch v5.9.11+incompatible
|
||||
github.com/ghodss/yaml v1.0.0
|
||||
github.com/google/cel-go v0.26.0
|
||||
github.com/google/cel-go v0.26.1
|
||||
github.com/google/go-cmp v0.7.0
|
||||
github.com/mochi-mqtt/server/v2 v2.7.9
|
||||
github.com/onsi/ginkgo/v2 v2.25.1
|
||||
|
||||
@@ -186,8 +186,8 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
|
||||
github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
|
||||
github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI=
|
||||
github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM=
|
||||
github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ=
|
||||
github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM=
|
||||
github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw=
|
||||
github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
|
||||
+17
-12
@@ -27,6 +27,7 @@ import (
|
||||
"github.com/google/cel-go/common/containers"
|
||||
"github.com/google/cel-go/common/decls"
|
||||
"github.com/google/cel-go/common/env"
|
||||
"github.com/google/cel-go/common/functions"
|
||||
"github.com/google/cel-go/common/stdlib"
|
||||
"github.com/google/cel-go/common/types"
|
||||
"github.com/google/cel-go/common/types/ref"
|
||||
@@ -142,6 +143,9 @@ type Env struct {
|
||||
validators []ASTValidator
|
||||
costOptions []checker.CostOption
|
||||
|
||||
funcBindOnce sync.Once
|
||||
functionBindings []*functions.Overload
|
||||
|
||||
// Internal parser representation
|
||||
prsr *parser.Parser
|
||||
prsrOpts []parser.Option
|
||||
@@ -320,18 +324,19 @@ func NewCustomEnv(opts ...EnvOption) (*Env, error) {
|
||||
return nil, err
|
||||
}
|
||||
return (&Env{
|
||||
variables: []*decls.VariableDecl{},
|
||||
functions: map[string]*decls.FunctionDecl{},
|
||||
macros: []parser.Macro{},
|
||||
Container: containers.DefaultContainer,
|
||||
adapter: registry,
|
||||
provider: registry,
|
||||
features: map[int]bool{},
|
||||
appliedFeatures: map[int]bool{},
|
||||
libraries: map[string]SingletonLibrary{},
|
||||
validators: []ASTValidator{},
|
||||
progOpts: []ProgramOption{},
|
||||
costOptions: []checker.CostOption{},
|
||||
variables: []*decls.VariableDecl{},
|
||||
functions: map[string]*decls.FunctionDecl{},
|
||||
functionBindings: []*functions.Overload{},
|
||||
macros: []parser.Macro{},
|
||||
Container: containers.DefaultContainer,
|
||||
adapter: registry,
|
||||
provider: registry,
|
||||
features: map[int]bool{},
|
||||
appliedFeatures: map[int]bool{},
|
||||
libraries: map[string]SingletonLibrary{},
|
||||
validators: []ASTValidator{},
|
||||
progOpts: []ProgramOption{},
|
||||
costOptions: []checker.CostOption{},
|
||||
}).configure(opts)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ func MaxConstantFoldIterations(limit int) ConstantFoldingOption {
|
||||
}
|
||||
}
|
||||
|
||||
// Adds an Activation which provides known values for the folding evaluator
|
||||
// FoldKnownValues adds an Activation which provides known values for the folding evaluator
|
||||
//
|
||||
// Any values the activation provides will be used by the constant folder and turned into
|
||||
// literals in the AST.
|
||||
|
||||
+19
-9
@@ -20,6 +20,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/google/cel-go/common/ast"
|
||||
"github.com/google/cel-go/common/functions"
|
||||
"github.com/google/cel-go/common/types"
|
||||
"github.com/google/cel-go/common/types/ref"
|
||||
"github.com/google/cel-go/interpreter"
|
||||
@@ -191,16 +192,25 @@ func newProgram(e *Env, a *ast.AST, opts []ProgramOption) (Program, error) {
|
||||
}
|
||||
}
|
||||
|
||||
e.funcBindOnce.Do(func() {
|
||||
var bindings []*functions.Overload
|
||||
e.functionBindings = []*functions.Overload{}
|
||||
for _, fn := range e.functions {
|
||||
bindings, err = fn.Bindings()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
e.functionBindings = append(e.functionBindings, bindings...)
|
||||
}
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Add the function bindings created via Function() options.
|
||||
for _, fn := range e.functions {
|
||||
bindings, err := fn.Bindings()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = disp.Add(bindings...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = disp.Add(e.functionBindings...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Set the attribute factory after the options have been set.
|
||||
|
||||
+5
-1
@@ -1,4 +1,8 @@
|
||||
{{define "variable"}}{{.Name}} is a {{.Type}}
|
||||
{{define "variable"}}{{.Name}} is a {{.Type}}{{if .Description}}
|
||||
|
||||
{{range split .Description}} {{.}}
|
||||
{{end}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{define "macro" -}}
|
||||
|
||||
+8
@@ -45,6 +45,14 @@ var (
|
||||
astValidatorFactories = map[string]ASTValidatorFactory{
|
||||
nestingLimitValidatorName: func(val *env.Validator) (ASTValidator, error) {
|
||||
if limit, found := val.ConfigValue("limit"); found {
|
||||
// In case of protos, config value is of type by google.protobuf.Value, which numeric values are always a double.
|
||||
if val, isDouble := limit.(float64); isDouble {
|
||||
if val != float64(int64(val)) {
|
||||
return nil, fmt.Errorf("invalid validator: %s, limit value is not a whole number: %v", nestingLimitValidatorName, limit)
|
||||
}
|
||||
return ValidateComprehensionNestingLimit(int(val)), nil
|
||||
}
|
||||
|
||||
if val, isInt := limit.(int); isInt {
|
||||
return ValidateComprehensionNestingLimit(val), nil
|
||||
}
|
||||
|
||||
+1
-1
@@ -472,7 +472,7 @@ func unwrap(desc description, msg proto.Message) (any, bool, error) {
|
||||
}
|
||||
return v.GetValue(), true, nil
|
||||
}
|
||||
return msg, false, nil
|
||||
return unwrapDynamic(desc, msg.ProtoReflect())
|
||||
}
|
||||
|
||||
// unwrapDynamic unwraps a reflected protobuf Message value.
|
||||
|
||||
+2
-1
@@ -609,7 +609,8 @@ func newNativeTypes(fieldNameHandler NativeTypesFieldNameHandler, rawType reflec
|
||||
var iterateStructMembers func(reflect.Type)
|
||||
iterateStructMembers = func(t reflect.Type) {
|
||||
if k := t.Kind(); k == reflect.Pointer || k == reflect.Slice || k == reflect.Array || k == reflect.Map {
|
||||
t = t.Elem()
|
||||
iterateStructMembers(t.Elem())
|
||||
return
|
||||
}
|
||||
if t.Kind() != reflect.Struct {
|
||||
return
|
||||
|
||||
Vendored
+1
-1
@@ -284,7 +284,7 @@ github.com/golang/protobuf/ptypes/timestamp
|
||||
# github.com/google/btree v1.1.3
|
||||
## explicit; go 1.18
|
||||
github.com/google/btree
|
||||
# github.com/google/cel-go v0.26.0
|
||||
# github.com/google/cel-go v0.26.1
|
||||
## explicit; go 1.22.0
|
||||
github.com/google/cel-go/cel
|
||||
github.com/google/cel-go/checker
|
||||
|
||||
Reference in New Issue
Block a user