From b0b10835ca4d31a1a32b86e2e25d66bb9dd8f042 Mon Sep 17 00:00:00 2001 From: Tristan Swadell Date: Wed, 5 Mar 2025 16:09:21 -0800 Subject: [PATCH 1/4] Add a doc field on Function and update content advice (#446) Add a doc field on function and update content advice --- proto/cel/expr/checked.proto | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/proto/cel/expr/checked.proto b/proto/cel/expr/checked.proto index e327db9b..0105b93a 100644 --- a/proto/cel/expr/checked.proto +++ b/proto/cel/expr/checked.proto @@ -236,6 +236,20 @@ message Decl { Constant value = 2; // Documentation string for the identifier. + // + // Provide a brief description of what the variable represents and whether + // there are any constraints on the formatting or supported value range. + // + // Examples: + // + // 'request.auth.principal' - string which uniquely identifies an + // authenticated principal. For JSON Web Tokens (JWTs), the principal + // is the combination of the issuer ('iss') and subject ('sub') token + // fields concatenated by a forward slash: iss + `/` + sub. + // + // 'min_cpus' - integer value indicates the minimum number of CPUs + // required for a compute cluster. The 'min_cpus' value must be + // greater than zero and less than 'max_cpus' or 64 whichever is less. string doc = 3; } @@ -293,11 +307,45 @@ message Decl { bool is_instance_function = 5; // Documentation string for the overload. + // + // Provide examples of the overload behavior, preferring to use literal + // values as input with a comment on the return value. + // + // Examples: + // + // // Determine whether a value of type exists within a list. + // 2 in [1, 2, 3] // returns true + // + // // Determine whether a key of type exists within a map. + // 'hello' in {'hi': 'you', 'hello': 'there'} // returns true + // 'help' in {'hi': 'you', 'hello': 'there'} // returns false + // + // // Take the substring of a string starting at a specific character + // // offset (inclusive). + // "tacocat".substring(1) // returns "acocat" + // "tacocat".substring(20) // error + // + // // Take the substring of a string starting at a specific character + // // offset (inclusive) and ending at the given offset (exclusive). + // "tacocat".substring(1, 6) // returns "acoca" string doc = 6; } // Required. List of function overloads, must contain at least one overload. repeated Overload overloads = 1; + + // Documentation string for the function that indicates the general purpose + // of the function and its behavior. + // + // Documentation strings for the function should be general purpose with + // specific examples provided in the overload doc string. + // + // Examples: + // + // The 'in' operator tests whether an item exists in a collection. + // + // The 'substring' function returns a substring of a target string. + string doc = 2; } // The fully qualified name of the declaration. From 0ae09134aa329ef765b05a7764a103c3ad4acb0b Mon Sep 17 00:00:00 2001 From: Tristan Swadell Date: Thu, 6 Mar 2025 16:45:33 -0800 Subject: [PATCH 2/4] Upgrade the googleapis repo deps, remove switched_rules (#447) Upgrade the googleapis repo deps --- .bazelversion | 2 +- MODULE.bazel | 26 +++++++++++++++----------- cloudbuild.yaml | 2 +- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.bazelversion b/.bazelversion index 26bc914a..13c50892 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1,2 +1,2 @@ -7.0.1 +7.3.2 # Keep this pinned version in parity with cel-go diff --git a/MODULE.bazel b/MODULE.bazel index 9794266f..c0a63131 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -13,12 +13,24 @@ bazel_dep( ) bazel_dep( name = "googleapis", - version = "0.0.0-20240819-fe8ba054a", + version = "0.0.0-20241220-5e258e33.bcr.1", repo_name = "com_google_googleapis", ) +bazel_dep( + name = "googleapis-cc", + version = "1.0.0", +) +bazel_dep( + name = "googleapis-java", + version = "1.0.0", +) +bazel_dep( + name = "googleapis-go", + version = "1.0.0", +) bazel_dep( name = "protobuf", - version = "26.0", + version = "27.0", repo_name = "com_google_protobuf", ) bazel_dep( @@ -27,7 +39,7 @@ bazel_dep( ) bazel_dep( name = "rules_go", - version = "0.49.0", + version = "0.50.1", repo_name = "io_bazel_rules_go", ) bazel_dep( @@ -50,14 +62,6 @@ python.toolchain( python_version = "3.11", ) -switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules") -switched_rules.use_languages( - cc = True, - go = True, - java = True, -) -use_repo(switched_rules, "com_google_googleapis_imports") - go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk") go_sdk.download(version = "1.21.1") diff --git a/cloudbuild.yaml b/cloudbuild.yaml index c40881f1..e3e533a0 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -1,5 +1,5 @@ steps: -- name: 'gcr.io/cloud-builders/bazel:7.0.1' +- name: 'gcr.io/cloud-builders/bazel:7.3.2' entrypoint: bazel args: ['build', '...'] id: bazel-build From ae6fb0dcf99d82d68c1b233f6f2aa095cac4a2d9 Mon Sep 17 00:00:00 2001 From: "zev.ac" Date: Wed, 19 Mar 2025 13:43:26 +0530 Subject: [PATCH 3/4] Add a separate field for expressions under input bindings map (#449) * Add test_suite and test_config under conformance * added test_config.pb.go and test_suite.pb.go to conforanmce library build target * added test suite messages to simple.proto and updated test_config to env_config * add uncommitted files * updated build files for generated conformance and test code * corrected field name in env_config * replaced Variable and Function messages with cel.expr.DEcl * resolved comments * removed redundant any from simple proto * added context_message as an input kind to test case * removed redundant anypb import in env_config * update type_name to context_variable_type to conform with linting rules * moved test suite, test section and test case to suite.proto under conformance/test * update context variable attribute name to type_name * removed redundant FileDescriptor field from config * Revert "removed redundant FileDescriptor field from config" This reverts commit 3757b44ed4018bfa9952ecb7f675f625bb3c405b. * added separate identifier field for expression type inputs to test case * corrected comment on input value expr * corrected comment on input value expr * removed nested messages and added those as independent messages --- conformance/test/suite.pb.go | 597 ++++++++++++++------ proto/cel/expr/conformance/test/suite.proto | 66 ++- 2 files changed, 464 insertions(+), 199 deletions(-) diff --git a/conformance/test/suite.pb.go b/conformance/test/suite.pb.go index e76d006c..fa333410 100755 --- a/conformance/test/suite.pb.go +++ b/conformance/test/suite.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.26.0 +// protoc v5.27.0 // source: cel/expr/conformance/test/suite.proto package test @@ -154,25 +154,14 @@ type TestCase struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Expr string `protobuf:"bytes,3,opt,name=expr,proto3" json:"expr,omitempty"` - Env *conformance.Environment `protobuf:"bytes,4,opt,name=env,proto3" json:"env,omitempty"` - // Types that are assignable to InputKind: - // - // *TestCase_Bindings - // *TestCase_ContextMessage - // *TestCase_ContextExpr - InputKind isTestCase_InputKind `protobuf_oneof:"input_kind"` - // Types that are assignable to ResultKind: - // - // *TestCase_ResultValue - // *TestCase_ResultExpr - // *TestCase_EvalError - // *TestCase_Unknown - ResultKind isTestCase_ResultKind `protobuf_oneof:"result_kind"` - DeducedType *expr.Type `protobuf:"bytes,12,opt,name=deduced_type,json=deducedType,proto3" json:"deduced_type,omitempty"` - DisableCheck bool `protobuf:"varint,13,opt,name=disable_check,json=disableCheck,proto3" json:"disable_check,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Expr string `protobuf:"bytes,3,opt,name=expr,proto3" json:"expr,omitempty"` + Env *conformance.Environment `protobuf:"bytes,4,opt,name=env,proto3" json:"env,omitempty"` + Input *TestInput `protobuf:"bytes,5,opt,name=input,proto3" json:"input,omitempty"` + Output *TestOutput `protobuf:"bytes,6,opt,name=output,proto3" json:"output,omitempty"` + DeducedType *expr.Type `protobuf:"bytes,7,opt,name=deduced_type,json=deducedType,proto3" json:"deduced_type,omitempty"` + DisableCheck bool `protobuf:"varint,8,opt,name=disable_check,json=disableCheck,proto3" json:"disable_check,omitempty"` } func (x *TestCase) Reset() { @@ -235,158 +224,288 @@ func (x *TestCase) GetEnv() *conformance.Environment { return nil } -func (m *TestCase) GetInputKind() isTestCase_InputKind { - if m != nil { - return m.InputKind +func (x *TestCase) GetInput() *TestInput { + if x != nil { + return x.Input } return nil } -func (x *TestCase) GetBindings() *Bindings { - if x, ok := x.GetInputKind().(*TestCase_Bindings); ok { - return x.Bindings +func (x *TestCase) GetOutput() *TestOutput { + if x != nil { + return x.Output } return nil } -func (x *TestCase) GetContextMessage() *anypb.Any { - if x, ok := x.GetInputKind().(*TestCase_ContextMessage); ok { - return x.ContextMessage +func (x *TestCase) GetDeducedType() *expr.Type { + if x != nil { + return x.DeducedType } return nil } -func (x *TestCase) GetContextExpr() string { - if x, ok := x.GetInputKind().(*TestCase_ContextExpr); ok { - return x.ContextExpr +func (x *TestCase) GetDisableCheck() bool { + if x != nil { + return x.DisableCheck } - return "" + return false } -func (m *TestCase) GetResultKind() isTestCase_ResultKind { - if m != nil { - return m.ResultKind - } - return nil +type TestInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to InputKind: + // + // *TestInput_Bindings + // *TestInput_ContextMessage + // *TestInput_ContextExpr + InputKind isTestInput_InputKind `protobuf_oneof:"input_kind"` } -func (x *TestCase) GetResultValue() *expr.Value { - if x, ok := x.GetResultKind().(*TestCase_ResultValue); ok { - return x.ResultValue +func (x *TestInput) Reset() { + *x = TestInput{} + if protoimpl.UnsafeEnabled { + mi := &file_cel_expr_conformance_test_suite_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *TestCase) GetResultExpr() string { - if x, ok := x.GetResultKind().(*TestCase_ResultExpr); ok { - return x.ResultExpr +func (x *TestInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestInput) ProtoMessage() {} + +func (x *TestInput) ProtoReflect() protoreflect.Message { + mi := &file_cel_expr_conformance_test_suite_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (x *TestCase) GetEvalError() *expr.ErrorSet { - if x, ok := x.GetResultKind().(*TestCase_EvalError); ok { - return x.EvalError +// Deprecated: Use TestInput.ProtoReflect.Descriptor instead. +func (*TestInput) Descriptor() ([]byte, []int) { + return file_cel_expr_conformance_test_suite_proto_rawDescGZIP(), []int{3} +} + +func (m *TestInput) GetInputKind() isTestInput_InputKind { + if m != nil { + return m.InputKind } return nil } -func (x *TestCase) GetUnknown() *expr.UnknownSet { - if x, ok := x.GetResultKind().(*TestCase_Unknown); ok { - return x.Unknown +func (x *TestInput) GetBindings() *Bindings { + if x, ok := x.GetInputKind().(*TestInput_Bindings); ok { + return x.Bindings } return nil } -func (x *TestCase) GetDeducedType() *expr.Type { - if x != nil { - return x.DeducedType +func (x *TestInput) GetContextMessage() *anypb.Any { + if x, ok := x.GetInputKind().(*TestInput_ContextMessage); ok { + return x.ContextMessage } return nil } -func (x *TestCase) GetDisableCheck() bool { - if x != nil { - return x.DisableCheck +func (x *TestInput) GetContextExpr() string { + if x, ok := x.GetInputKind().(*TestInput_ContextExpr); ok { + return x.ContextExpr } - return false + return "" } -type isTestCase_InputKind interface { - isTestCase_InputKind() +type isTestInput_InputKind interface { + isTestInput_InputKind() } -type TestCase_Bindings struct { - Bindings *Bindings `protobuf:"bytes,5,opt,name=bindings,proto3,oneof"` +type TestInput_Bindings struct { + Bindings *Bindings `protobuf:"bytes,1,opt,name=bindings,proto3,oneof"` } -type TestCase_ContextMessage struct { - ContextMessage *anypb.Any `protobuf:"bytes,6,opt,name=context_message,json=contextMessage,proto3,oneof"` +type TestInput_ContextMessage struct { + ContextMessage *anypb.Any `protobuf:"bytes,2,opt,name=context_message,json=contextMessage,proto3,oneof"` } -type TestCase_ContextExpr struct { - ContextExpr string `protobuf:"bytes,7,opt,name=context_expr,json=contextExpr,proto3,oneof"` +type TestInput_ContextExpr struct { + ContextExpr string `protobuf:"bytes,3,opt,name=context_expr,json=contextExpr,proto3,oneof"` } -func (*TestCase_Bindings) isTestCase_InputKind() {} +func (*TestInput_Bindings) isTestInput_InputKind() {} -func (*TestCase_ContextMessage) isTestCase_InputKind() {} +func (*TestInput_ContextMessage) isTestInput_InputKind() {} -func (*TestCase_ContextExpr) isTestCase_InputKind() {} +func (*TestInput_ContextExpr) isTestInput_InputKind() {} -type isTestCase_ResultKind interface { - isTestCase_ResultKind() +type Bindings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Values map[string]*InputValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -type TestCase_ResultValue struct { - ResultValue *expr.Value `protobuf:"bytes,8,opt,name=result_value,json=resultValue,proto3,oneof"` +func (x *Bindings) Reset() { + *x = Bindings{} + if protoimpl.UnsafeEnabled { + mi := &file_cel_expr_conformance_test_suite_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -type TestCase_ResultExpr struct { - ResultExpr string `protobuf:"bytes,9,opt,name=result_expr,json=resultExpr,proto3,oneof"` +func (x *Bindings) String() string { + return protoimpl.X.MessageStringOf(x) } -type TestCase_EvalError struct { - EvalError *expr.ErrorSet `protobuf:"bytes,10,opt,name=eval_error,json=evalError,proto3,oneof"` +func (*Bindings) ProtoMessage() {} + +func (x *Bindings) ProtoReflect() protoreflect.Message { + mi := &file_cel_expr_conformance_test_suite_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type TestCase_Unknown struct { - Unknown *expr.UnknownSet `protobuf:"bytes,11,opt,name=unknown,proto3,oneof"` +// Deprecated: Use Bindings.ProtoReflect.Descriptor instead. +func (*Bindings) Descriptor() ([]byte, []int) { + return file_cel_expr_conformance_test_suite_proto_rawDescGZIP(), []int{4} } -func (*TestCase_ResultValue) isTestCase_ResultKind() {} +func (x *Bindings) GetValues() map[string]*InputValue { + if x != nil { + return x.Values + } + return nil +} + +type InputValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Kind: + // + // *InputValue_Value + // *InputValue_Expr + Kind isInputValue_Kind `protobuf_oneof:"kind"` +} -func (*TestCase_ResultExpr) isTestCase_ResultKind() {} +func (x *InputValue) Reset() { + *x = InputValue{} + if protoimpl.UnsafeEnabled { + mi := &file_cel_expr_conformance_test_suite_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (*TestCase_EvalError) isTestCase_ResultKind() {} +func (x *InputValue) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (*TestCase_Unknown) isTestCase_ResultKind() {} +func (*InputValue) ProtoMessage() {} -type Bindings struct { +func (x *InputValue) ProtoReflect() protoreflect.Message { + mi := &file_cel_expr_conformance_test_suite_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InputValue.ProtoReflect.Descriptor instead. +func (*InputValue) Descriptor() ([]byte, []int) { + return file_cel_expr_conformance_test_suite_proto_rawDescGZIP(), []int{5} +} + +func (m *InputValue) GetKind() isInputValue_Kind { + if m != nil { + return m.Kind + } + return nil +} + +func (x *InputValue) GetValue() *expr.Value { + if x, ok := x.GetKind().(*InputValue_Value); ok { + return x.Value + } + return nil +} + +func (x *InputValue) GetExpr() string { + if x, ok := x.GetKind().(*InputValue_Expr); ok { + return x.Expr + } + return "" +} + +type isInputValue_Kind interface { + isInputValue_Kind() +} + +type InputValue_Value struct { + Value *expr.Value `protobuf:"bytes,1,opt,name=value,proto3,oneof"` +} + +type InputValue_Expr struct { + Expr string `protobuf:"bytes,2,opt,name=expr,proto3,oneof"` +} + +func (*InputValue_Value) isInputValue_Kind() {} + +func (*InputValue_Expr) isInputValue_Kind() {} + +type TestOutput struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Values map[string]*expr.Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Types that are assignable to ResultKind: + // + // *TestOutput_ResultValue + // *TestOutput_ResultExpr + // *TestOutput_EvalError + // *TestOutput_Unknown + ResultKind isTestOutput_ResultKind `protobuf_oneof:"result_kind"` } -func (x *Bindings) Reset() { - *x = Bindings{} +func (x *TestOutput) Reset() { + *x = TestOutput{} if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_conformance_test_suite_proto_msgTypes[3] + mi := &file_cel_expr_conformance_test_suite_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Bindings) String() string { +func (x *TestOutput) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Bindings) ProtoMessage() {} +func (*TestOutput) ProtoMessage() {} -func (x *Bindings) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_conformance_test_suite_proto_msgTypes[3] +func (x *TestOutput) ProtoReflect() protoreflect.Message { + mi := &file_cel_expr_conformance_test_suite_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -397,18 +516,74 @@ func (x *Bindings) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Bindings.ProtoReflect.Descriptor instead. -func (*Bindings) Descriptor() ([]byte, []int) { - return file_cel_expr_conformance_test_suite_proto_rawDescGZIP(), []int{3} +// Deprecated: Use TestOutput.ProtoReflect.Descriptor instead. +func (*TestOutput) Descriptor() ([]byte, []int) { + return file_cel_expr_conformance_test_suite_proto_rawDescGZIP(), []int{6} } -func (x *Bindings) GetValues() map[string]*expr.Value { - if x != nil { - return x.Values +func (m *TestOutput) GetResultKind() isTestOutput_ResultKind { + if m != nil { + return m.ResultKind + } + return nil +} + +func (x *TestOutput) GetResultValue() *expr.Value { + if x, ok := x.GetResultKind().(*TestOutput_ResultValue); ok { + return x.ResultValue } return nil } +func (x *TestOutput) GetResultExpr() string { + if x, ok := x.GetResultKind().(*TestOutput_ResultExpr); ok { + return x.ResultExpr + } + return "" +} + +func (x *TestOutput) GetEvalError() *expr.ErrorSet { + if x, ok := x.GetResultKind().(*TestOutput_EvalError); ok { + return x.EvalError + } + return nil +} + +func (x *TestOutput) GetUnknown() *expr.UnknownSet { + if x, ok := x.GetResultKind().(*TestOutput_Unknown); ok { + return x.Unknown + } + return nil +} + +type isTestOutput_ResultKind interface { + isTestOutput_ResultKind() +} + +type TestOutput_ResultValue struct { + ResultValue *expr.Value `protobuf:"bytes,8,opt,name=result_value,json=resultValue,proto3,oneof"` +} + +type TestOutput_ResultExpr struct { + ResultExpr string `protobuf:"bytes,9,opt,name=result_expr,json=resultExpr,proto3,oneof"` +} + +type TestOutput_EvalError struct { + EvalError *expr.ErrorSet `protobuf:"bytes,10,opt,name=eval_error,json=evalError,proto3,oneof"` +} + +type TestOutput_Unknown struct { + Unknown *expr.UnknownSet `protobuf:"bytes,11,opt,name=unknown,proto3,oneof"` +} + +func (*TestOutput_ResultValue) isTestOutput_ResultKind() {} + +func (*TestOutput_ResultExpr) isTestOutput_ResultKind() {} + +func (*TestOutput_EvalError) isTestOutput_ResultKind() {} + +func (*TestOutput_Unknown) isTestOutput_ResultKind() {} + var File_cel_expr_conformance_test_suite_proto protoreflect.FileDescriptor var file_cel_expr_conformance_test_suite_proto_rawDesc = []byte{ @@ -441,7 +616,7 @@ var file_cel_expr_conformance_test_suite_proto_rawDesc = []byte{ 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x52, 0x05, 0x74, 0x65, 0x73, 0x74, 0x73, 0x22, - 0xe7, 0x04, 0x0a, 0x08, 0x54, 0x65, 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0xdc, 0x02, 0x0a, 0x08, 0x54, 0x65, 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, @@ -449,53 +624,69 @@ var file_cel_expr_conformance_test_suite_proto_rawDesc = []byte{ 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x12, 0x33, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, - 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x41, 0x0a, 0x08, 0x62, - 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x73, 0x48, 0x00, 0x52, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3f, - 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, - 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, - 0x23, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x45, 0x78, 0x70, 0x72, 0x12, 0x34, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x65, 0x6c, - 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x01, 0x52, 0x0b, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x01, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x33, 0x0a, - 0x0a, 0x65, 0x76, 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x53, 0x65, 0x74, 0x48, 0x01, 0x52, 0x09, 0x65, 0x76, 0x61, 0x6c, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x55, - 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x74, 0x48, 0x01, 0x52, 0x07, 0x75, 0x6e, 0x6b, - 0x6e, 0x6f, 0x77, 0x6e, 0x12, 0x31, 0x0a, 0x0c, 0x64, 0x65, 0x64, 0x75, 0x63, 0x65, 0x64, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, - 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x64, 0x75, - 0x63, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x0c, 0x0a, 0x0a, - 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x9f, 0x01, 0x0a, 0x08, 0x42, 0x69, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x47, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, - 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x74, 0x65, - 0x73, 0x74, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, - 0x4a, 0x0a, 0x0b, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0f, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x4f, 0x0a, 0x1d, 0x64, - 0x65, 0x76, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x42, 0x0a, 0x53, 0x75, - 0x69, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x63, 0x65, 0x6c, 0x2e, - 0x64, 0x65, 0x76, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x74, 0x65, 0x73, 0x74, 0xf8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x3a, 0x0a, 0x05, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x65, 0x6c, + 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, + 0x65, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, + 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, + 0x70, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x74, + 0x65, 0x73, 0x74, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x06, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x31, 0x0a, 0x0c, 0x64, 0x65, 0x64, 0x75, 0x63, 0x65, + 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, + 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x64, 0x65, + 0x64, 0x75, 0x63, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0c, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x22, 0xc2, + 0x01, 0x0a, 0x09, 0x54, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x41, 0x0a, 0x08, + 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x73, 0x48, 0x00, 0x52, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0x3f, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, + 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x23, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x45, 0x78, 0x70, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6b, + 0x69, 0x6e, 0x64, 0x22, 0xb5, 0x01, 0x0a, 0x08, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x47, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2f, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x60, 0x0a, 0x0b, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x65, 0x6c, 0x2e, + 0x65, 0x78, 0x70, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x53, 0x0a, 0x0a, 0x49, + 0x6e, 0x70, 0x75, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, + 0x78, 0x70, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x14, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0x22, 0xdb, 0x01, 0x0a, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, + 0x34, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, + 0x65, 0x78, 0x70, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x33, 0x0a, 0x0a, 0x65, 0x76, 0x61, 0x6c, + 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, + 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x65, 0x74, + 0x48, 0x00, 0x52, 0x09, 0x65, 0x76, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x30, 0x0a, + 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, + 0x6e, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x42, + 0x0d, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x42, 0x4f, + 0x0a, 0x1d, 0x64, 0x65, 0x76, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x42, + 0x0a, 0x53, 0x75, 0x69, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x63, + 0x65, 0x6c, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x74, 0x65, 0x73, 0x74, 0xf8, 0x01, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -510,37 +701,43 @@ func file_cel_expr_conformance_test_suite_proto_rawDescGZIP() []byte { return file_cel_expr_conformance_test_suite_proto_rawDescData } -var file_cel_expr_conformance_test_suite_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_cel_expr_conformance_test_suite_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_cel_expr_conformance_test_suite_proto_goTypes = []any{ (*TestSuite)(nil), // 0: cel.expr.conformance.test.TestSuite (*TestSection)(nil), // 1: cel.expr.conformance.test.TestSection (*TestCase)(nil), // 2: cel.expr.conformance.test.TestCase - (*Bindings)(nil), // 3: cel.expr.conformance.test.Bindings - nil, // 4: cel.expr.conformance.test.Bindings.ValuesEntry - (*conformance.Environment)(nil), // 5: cel.expr.conformance.Environment - (*anypb.Any)(nil), // 6: google.protobuf.Any - (*expr.Value)(nil), // 7: cel.expr.Value - (*expr.ErrorSet)(nil), // 8: cel.expr.ErrorSet - (*expr.UnknownSet)(nil), // 9: cel.expr.UnknownSet - (*expr.Type)(nil), // 10: cel.expr.Type + (*TestInput)(nil), // 3: cel.expr.conformance.test.TestInput + (*Bindings)(nil), // 4: cel.expr.conformance.test.Bindings + (*InputValue)(nil), // 5: cel.expr.conformance.test.InputValue + (*TestOutput)(nil), // 6: cel.expr.conformance.test.TestOutput + nil, // 7: cel.expr.conformance.test.Bindings.ValuesEntry + (*conformance.Environment)(nil), // 8: cel.expr.conformance.Environment + (*expr.Type)(nil), // 9: cel.expr.Type + (*anypb.Any)(nil), // 10: google.protobuf.Any + (*expr.Value)(nil), // 11: cel.expr.Value + (*expr.ErrorSet)(nil), // 12: cel.expr.ErrorSet + (*expr.UnknownSet)(nil), // 13: cel.expr.UnknownSet } var file_cel_expr_conformance_test_suite_proto_depIdxs = []int32{ 1, // 0: cel.expr.conformance.test.TestSuite.sections:type_name -> cel.expr.conformance.test.TestSection 2, // 1: cel.expr.conformance.test.TestSection.tests:type_name -> cel.expr.conformance.test.TestCase - 5, // 2: cel.expr.conformance.test.TestCase.env:type_name -> cel.expr.conformance.Environment - 3, // 3: cel.expr.conformance.test.TestCase.bindings:type_name -> cel.expr.conformance.test.Bindings - 6, // 4: cel.expr.conformance.test.TestCase.context_message:type_name -> google.protobuf.Any - 7, // 5: cel.expr.conformance.test.TestCase.result_value:type_name -> cel.expr.Value - 8, // 6: cel.expr.conformance.test.TestCase.eval_error:type_name -> cel.expr.ErrorSet - 9, // 7: cel.expr.conformance.test.TestCase.unknown:type_name -> cel.expr.UnknownSet - 10, // 8: cel.expr.conformance.test.TestCase.deduced_type:type_name -> cel.expr.Type - 4, // 9: cel.expr.conformance.test.Bindings.values:type_name -> cel.expr.conformance.test.Bindings.ValuesEntry - 7, // 10: cel.expr.conformance.test.Bindings.ValuesEntry.value:type_name -> cel.expr.Value - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 8, // 2: cel.expr.conformance.test.TestCase.env:type_name -> cel.expr.conformance.Environment + 3, // 3: cel.expr.conformance.test.TestCase.input:type_name -> cel.expr.conformance.test.TestInput + 6, // 4: cel.expr.conformance.test.TestCase.output:type_name -> cel.expr.conformance.test.TestOutput + 9, // 5: cel.expr.conformance.test.TestCase.deduced_type:type_name -> cel.expr.Type + 4, // 6: cel.expr.conformance.test.TestInput.bindings:type_name -> cel.expr.conformance.test.Bindings + 10, // 7: cel.expr.conformance.test.TestInput.context_message:type_name -> google.protobuf.Any + 7, // 8: cel.expr.conformance.test.Bindings.values:type_name -> cel.expr.conformance.test.Bindings.ValuesEntry + 11, // 9: cel.expr.conformance.test.InputValue.value:type_name -> cel.expr.Value + 11, // 10: cel.expr.conformance.test.TestOutput.result_value:type_name -> cel.expr.Value + 12, // 11: cel.expr.conformance.test.TestOutput.eval_error:type_name -> cel.expr.ErrorSet + 13, // 12: cel.expr.conformance.test.TestOutput.unknown:type_name -> cel.expr.UnknownSet + 5, // 13: cel.expr.conformance.test.Bindings.ValuesEntry.value:type_name -> cel.expr.conformance.test.InputValue + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_cel_expr_conformance_test_suite_proto_init() } @@ -586,6 +783,18 @@ func file_cel_expr_conformance_test_suite_proto_init() { } } file_cel_expr_conformance_test_suite_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*TestInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cel_expr_conformance_test_suite_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Bindings); i { case 0: return &v.state @@ -597,15 +806,45 @@ func file_cel_expr_conformance_test_suite_proto_init() { return nil } } + file_cel_expr_conformance_test_suite_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*InputValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cel_expr_conformance_test_suite_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*TestOutput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_cel_expr_conformance_test_suite_proto_msgTypes[3].OneofWrappers = []any{ + (*TestInput_Bindings)(nil), + (*TestInput_ContextMessage)(nil), + (*TestInput_ContextExpr)(nil), + } + file_cel_expr_conformance_test_suite_proto_msgTypes[5].OneofWrappers = []any{ + (*InputValue_Value)(nil), + (*InputValue_Expr)(nil), } - file_cel_expr_conformance_test_suite_proto_msgTypes[2].OneofWrappers = []any{ - (*TestCase_Bindings)(nil), - (*TestCase_ContextMessage)(nil), - (*TestCase_ContextExpr)(nil), - (*TestCase_ResultValue)(nil), - (*TestCase_ResultExpr)(nil), - (*TestCase_EvalError)(nil), - (*TestCase_Unknown)(nil), + file_cel_expr_conformance_test_suite_proto_msgTypes[6].OneofWrappers = []any{ + (*TestOutput_ResultValue)(nil), + (*TestOutput_ResultExpr)(nil), + (*TestOutput_EvalError)(nil), + (*TestOutput_Unknown)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -613,7 +852,7 @@ func file_cel_expr_conformance_test_suite_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cel_expr_conformance_test_suite_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/cel/expr/conformance/test/suite.proto b/proto/cel/expr/conformance/test/suite.proto index 7295e6c7..d6789bd9 100644 --- a/proto/cel/expr/conformance/test/suite.proto +++ b/proto/cel/expr/conformance/test/suite.proto @@ -80,23 +80,65 @@ message TestCase { cel.expr.conformance.Environment env = 4; // Input for the test case + TestInput input = 5; + + // Expected result of the test case. + TestOutput output = 6; + + // If specified validates that the deduced type at check time matches + // If the result kind is not set and this field is set, the test is considered + // "check-only". + cel.expr.Type deduced_type = 7; + + // Bypass the type-checking and only attempt to evaluate the parsed + // expression. + bool disable_check = 8; +} + +// Input for the test case +message TestInput { + // The type of input for the test case oneof input_kind { // A set of variable bindings to be used for evaluating a checked // expression. - Bindings bindings = 5; + Bindings bindings = 1; // A context message represents an input kind in the form of a proto // message whose type is defined at runtime. - google.protobuf.Any context_message = 6; + google.protobuf.Any context_message = 2; // A context expression representing a context proto variable. The // fields of the input proto.Messages are used as top-level variables within // an Activation. The expression is evaluated using the cel environment // configured for the test suite. - string context_expr = 7; + string context_expr = 3; } +} - // Expected result of the test case. +// The bindings of input variables for the test case. +message Bindings { + // A map representing a variable binding where the key is the name of the + // input variable. + map values = 1; +} + +// The input value for a variable binding +message InputValue { + // The type of input value that can be used for a variable binding + oneof kind { + // A simple literal value for a variable binding + cel.expr.Value value = 1; + + // An expression which evaluates to the value of the variable binding. + // The expression is evaluated using the same runtime environment as the + // one used for evaluating the expression under test. + string expr = 2; + } +} + +// Expected result of the test case. +message TestOutput { + // Type of expected result of the test case. oneof result_kind { // A normal value, which must match the evaluation result exactly via value // equality semantics. This coincides with proto equality, except for: @@ -116,20 +158,4 @@ message TestCase { // An unknown evaluation result. cel.expr.UnknownSet unknown = 11; } - - // If specified validates that the deduced type at check time matches - // If the result kind is not set and this field is set, the test is considered - // "check-only". - cel.expr.Type deduced_type = 12; - - // Bypass the type-checking and only attempt to evaluate the parsed - // expression. - bool disable_check = 13; -} - -// The bindings of input variables for the test case. -message Bindings { - // A map representing a variable binding where the key is the name of the - // input variable. - map values = 1; } From 6f8806dad602af78c8bc2412c3ae16e263622626 Mon Sep 17 00:00:00 2001 From: l46kok Date: Sat, 22 Mar 2025 18:29:45 -0700 Subject: [PATCH 4/4] Add java_lite messages to test_all_types messages (#450) * Add java_lite messages to TestAllTypes proto * Fix BUILD target names --- proto/cel/expr/conformance/proto2/BUILD.bazel | 8 ++++++++ proto/cel/expr/conformance/proto3/BUILD.bazel | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/proto/cel/expr/conformance/proto2/BUILD.bazel b/proto/cel/expr/conformance/proto2/BUILD.bazel index 41263aaa..4b6485c9 100644 --- a/proto/cel/expr/conformance/proto2/BUILD.bazel +++ b/proto/cel/expr/conformance/proto2/BUILD.bazel @@ -30,6 +30,14 @@ java_proto_library( deps = [":test_all_types_proto"], ) +############################################################################## +# Javalite +############################################################################## +java_lite_proto_library( + name = "test_all_types_java_proto_lite", + deps = [":test_all_types_proto"], +) + ############################################################################### ## Go ############################################################################### diff --git a/proto/cel/expr/conformance/proto3/BUILD.bazel b/proto/cel/expr/conformance/proto3/BUILD.bazel index c70dc665..28ef94c4 100644 --- a/proto/cel/expr/conformance/proto3/BUILD.bazel +++ b/proto/cel/expr/conformance/proto3/BUILD.bazel @@ -27,6 +27,14 @@ java_proto_library( deps = [":test_all_types_proto"], ) +############################################################################## +# Javalite +############################################################################## +java_lite_proto_library( + name = "test_all_types_java_proto_lite", + deps = [":test_all_types_proto"], +) + ############################################################################### ## Go ###############################################################################