From 776c4db845ed9c37a8f0aa9aa186e34e29fa1e5c Mon Sep 17 00:00:00 2001 From: Kuat Date: Wed, 11 Oct 2023 12:04:38 -0700 Subject: [PATCH 1/8] cel: add a description to the AST (#61) Signed-off-by: Kuat Yessenov --- go/xds/type/matcher/v3/cel.pb.go | 30 +++++++++++++++-------- go/xds/type/matcher/v3/cel.pb.validate.go | 2 ++ xds/type/matcher/v3/cel.proto | 4 +++ 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/go/xds/type/matcher/v3/cel.pb.go b/go/xds/type/matcher/v3/cel.pb.go index 24b19ac..ef8b175 100644 --- a/go/xds/type/matcher/v3/cel.pb.go +++ b/go/xds/type/matcher/v3/cel.pb.go @@ -33,7 +33,8 @@ type CelMatcher struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ExprMatch *v3.CelExpression `protobuf:"bytes,1,opt,name=expr_match,json=exprMatch,proto3" json:"expr_match,omitempty"` + ExprMatch *v3.CelExpression `protobuf:"bytes,1,opt,name=expr_match,json=exprMatch,proto3" json:"expr_match,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` } func (x *CelMatcher) Reset() { @@ -75,6 +76,13 @@ func (x *CelMatcher) GetExprMatch() *v3.CelExpression { return nil } +func (x *CelMatcher) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + var File_xds_type_matcher_v3_cel_proto protoreflect.FileDescriptor var file_xds_type_matcher_v3_cel_proto_rawDesc = []byte{ @@ -86,19 +94,21 @@ var file_xds_type_matcher_v3_cel_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, 0x0a, 0x0a, 0x43, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x73, 0x0a, 0x0a, 0x43, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x65, - 0x78, 0x70, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x60, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x43, 0x65, 0x6c, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, - 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, - 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x78, 0x70, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 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, 0x6f, 0x6e, 0x42, 0x60, 0x0a, 0x1e, 0x63, 0x6f, + 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x43, 0x65, + 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, + 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/go/xds/type/matcher/v3/cel.pb.validate.go b/go/xds/type/matcher/v3/cel.pb.validate.go index c079a2a..6f165a1 100644 --- a/go/xds/type/matcher/v3/cel.pb.validate.go +++ b/go/xds/type/matcher/v3/cel.pb.validate.go @@ -57,6 +57,8 @@ func (m *CelMatcher) Validate() error { } } + // no validation rules for Description + return nil } diff --git a/xds/type/matcher/v3/cel.proto b/xds/type/matcher/v3/cel.proto index d9ed065..b1ad1fa 100644 --- a/xds/type/matcher/v3/cel.proto +++ b/xds/type/matcher/v3/cel.proto @@ -35,4 +35,8 @@ option (xds.annotations.v3.file_status).work_in_progress = true; message CelMatcher { // Either parsed or checked representation of the CEL program. type.v3.CelExpression expr_match = 1 [(validate.rules).message = {required: true}]; + + // Free-form description of the CEL AST, e.g. the original expression text, to be + // used for debugging assistance. + string description = 2; } From 8bd2eac9fb4aca195328598a003fa19cc47a0cc0 Mon Sep 17 00:00:00 2001 From: Sergii Tkachenko Date: Sun, 15 Oct 2023 20:05:27 -0700 Subject: [PATCH 2/8] Bump bazel to 4.2.2 (#68) Signed-off-by: Sergii Tkachenko --- .bazelversion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelversion b/.bazelversion index 6aba2b2..af8c8ec 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -4.2.0 +4.2.2 From 523115ebc1014a83e9cf1e85194ef8f8739d87c7 Mon Sep 17 00:00:00 2001 From: Sergii Tkachenko Date: Thu, 9 Nov 2023 05:27:14 -0800 Subject: [PATCH 3/8] bazel: fix "missing strict dependencies" build issue (#72) Signed-off-by: Sergii Tkachenko --- .bazelversion | 2 +- bazel/dependency_imports.bzl | 59 ++++++++++++++++++--- bazel/repository_locations.bzl | 11 ++-- go/udpa/annotations/migrate.pb.go | 7 +-- go/udpa/annotations/security.pb.go | 7 +-- go/udpa/annotations/sensitive.pb.go | 7 +-- go/udpa/annotations/status.pb.go | 7 +-- go/udpa/annotations/versioning.pb.go | 7 +-- go/udpa/data/orca/v1/orca_load_report.pb.go | 7 +-- go/udpa/service/orca/v1/orca.pb.go | 7 +-- go/udpa/type/v1/typed_struct.pb.go | 7 +-- go/xds/annotations/v3/migrate.pb.go | 7 +-- go/xds/annotations/v3/security.pb.go | 7 +-- go/xds/annotations/v3/sensitive.pb.go | 7 +-- go/xds/annotations/v3/status.pb.go | 7 +-- go/xds/annotations/v3/versioning.pb.go | 7 +-- go/xds/core/v3/authority.pb.go | 7 +-- go/xds/core/v3/cidr.pb.go | 7 +-- go/xds/core/v3/collection_entry.pb.go | 20 +++---- go/xds/core/v3/context_params.pb.go | 7 +-- go/xds/core/v3/extension.pb.go | 17 +++--- go/xds/core/v3/resource.pb.go | 15 ++---- go/xds/core/v3/resource_locator.pb.go | 9 ++-- go/xds/core/v3/resource_name.pb.go | 7 +-- go/xds/data/orca/v3/orca_load_report.pb.go | 7 +-- go/xds/service/orca/v3/orca.pb.go | 7 +-- go/xds/type/matcher/v3/cel.pb.go | 7 +-- go/xds/type/matcher/v3/domain.pb.go | 7 +-- go/xds/type/matcher/v3/http_inputs.pb.go | 7 +-- go/xds/type/matcher/v3/ip.pb.go | 7 +-- go/xds/type/matcher/v3/matcher.pb.go | 12 ++--- go/xds/type/matcher/v3/range.pb.go | 7 +-- go/xds/type/matcher/v3/regex.pb.go | 8 +-- go/xds/type/matcher/v3/string.pb.go | 8 +-- go/xds/type/v3/cel.pb.go | 8 +-- go/xds/type/v3/range.pb.go | 7 +-- go/xds/type/v3/typed_struct.pb.go | 7 +-- 37 files changed, 120 insertions(+), 231 deletions(-) diff --git a/.bazelversion b/.bazelversion index af8c8ec..91e4a9f 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -4.2.2 +6.3.2 diff --git a/bazel/dependency_imports.bzl b/bazel/dependency_imports.bzl index f217984..c617cf3 100644 --- a/bazel/dependency_imports.bzl +++ b/bazel/dependency_imports.bzl @@ -5,7 +5,7 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe load("@com_envoyproxy_protoc_gen_validate//bazel:repositories.bzl", "pgv_dependencies") # go version for rules_go -GO_VERSION = "1.16.6" +GO_VERSION = "1.20.2" def xds_dependency_imports(go_version = GO_VERSION): protobuf_deps() @@ -24,27 +24,71 @@ def xds_dependency_imports(go_version = GO_VERSION): }, ) + # These dependencies, like most of the Go in this repository, exist only for the API. + # These repos also have transient dependencies - `build_external` allows them to use them. + # TODO(phlax): remove `build_external` and pin all transients go_repository( name = "com_github_iancoleman_strcase", importpath = "github.com/iancoleman/strcase", sum = "h1:ux/56T2xqZO/3cP1I2F86qpeoYPCOzk+KF/UH/Ar+lk=", version = "v0.0.0-20180726023541-3605ed457bf7", + build_external = "external", + # project_url = "https://pkg.go.dev/github.com/iancoleman/strcase", + # last_update = "2020-11-22" + # use_category = ["api"], + # source = "https://github.com/bufbuild/protoc-gen-validate/blob/v0.6.1/dependencies.bzl#L23-L28" + ) + go_repository( + name = "org_golang_x_net", + importpath = "golang.org/x/net", + sum = "h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=", + version = "v0.0.0-20200226121028-0de0cce0169b", + build_external = "external", + # project_url = "https://pkg.go.dev/golang.org/x/net", + # last_update = "2020-02-26" + # use_category = ["api"], + # source = "https://github.com/bufbuild/protoc-gen-validate/blob/v0.6.1/dependencies.bzl#L129-L134" + ) + go_repository( + name = "org_golang_x_text", + importpath = "golang.org/x/text", + sum = "h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=", + version = "v0.3.3", + build_external = "external", + # project_url = "https://pkg.go.dev/golang.org/x/text", + # last_update = "2021-06-16" + # use_category = ["api"], + # source = "https://github.com/bufbuild/protoc-gen-validate/blob/v0.6.1/dependencies.bzl#L148-L153" ) - go_repository( name = "com_github_spf13_afero", importpath = "github.com/spf13/afero", sum = "h1:8q6vk3hthlpb2SouZcnBVKboxWQWMDNF38bwholZrJc=", version = "v1.3.4", + build_external = "external", + # project_url = "https://pkg.go.dev/github.com/spf13/afero", + # last_update = "2021-03-20" + # use_category = ["api"], + # source = "https://github.com/bufbuild/protoc-gen-validate/blob/v0.6.1/dependencies.bzl#L60-L65" ) - go_repository( name = "com_github_lyft_protoc_gen_star", - importpath = "github.com/lyft/protoc-gen-star", - sum = "h1:sImehRT+p7lW9n6R7MQc5hVgzWGEkDVZU4AsBQ4Isu8=", - version = "v0.5.1", + importpath = "github.com/lyft/protoc-gen-star/v2", + sum = "h1:keaAo8hRuAT0O3DfJ/wM3rufbAjGeJ1lAtWZHDjKGB0=", + version = "v2.0.1", + build_external = "external", + # project_url = "https://pkg.go.dev/github.com/lyft/protoc-gen-star", + # last_update = "2023-01-06" + # use_category = ["api"], + # source = "https://github.com/bufbuild/protoc-gen-validate/blob/v0.10.1/dependencies.bzl#L35-L40" + ) + go_repository( + name = "org_golang_google_protobuf", + importpath = "google.golang.org/protobuf", + sum = "h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=", + version = "v1.28.1", + build_external = "external", ) - go_repository( name = "org_golang_google_grpc", build_file_proto_mode = "disable", @@ -53,6 +97,7 @@ def xds_dependency_imports(go_version = GO_VERSION): version = "v1.40.0", ) + # Old name for backward compatibility. # TODO(roth): Remove this once callers are migrated to the new name. def udpa_dependency_imports(go_version = GO_VERSION): diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index d455f8d..080f504 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -1,7 +1,7 @@ REPOSITORY_LOCATIONS = dict( bazel_gazelle = dict( - sha256 = "62ca106be173579c0a167deb23358fdfe71ffa1e4cfdddf5582af26520f1c66f", - urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.23.0/bazel-gazelle-v0.23.0.tar.gz"], + sha256 = "b8b6d75de6e4bf7c41b7737b183523085f56283f6db929b86c5e7e1f09cf59c9", + urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.31.1/bazel-gazelle-v0.31.1.tar.gz"], ), bazel_skylib = dict( sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c", @@ -29,7 +29,10 @@ REPOSITORY_LOCATIONS = dict( urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v3.18.0/protobuf-all-3.18.0.tar.gz"], ), io_bazel_rules_go = dict( - sha256 = "69de5c704a05ff37862f7e0f5534d4f479418afc21806c887db544a316f3cb6b", - urls = ["https://github.com/bazelbuild/rules_go/releases/download/v0.27.0/rules_go-v0.27.0.tar.gz"], + sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip", + "https://github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip", + ], ), ) diff --git a/go/udpa/annotations/migrate.pb.go b/go/udpa/annotations/migrate.pb.go index 46fb820..be9f467 100644 --- a/go/udpa/annotations/migrate.pb.go +++ b/go/udpa/annotations/migrate.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: udpa/annotations/migrate.proto package annotations import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type MigrateAnnotation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/udpa/annotations/security.pb.go b/go/udpa/annotations/security.pb.go index e061f58..aaac45e 100644 --- a/go/udpa/annotations/security.pb.go +++ b/go/udpa/annotations/security.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: udpa/annotations/security.proto package annotations import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type FieldSecurityAnnotation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/udpa/annotations/sensitive.pb.go b/go/udpa/annotations/sensitive.pb.go index 0334e8f..0a46801 100644 --- a/go/udpa/annotations/sensitive.pb.go +++ b/go/udpa/annotations/sensitive.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: udpa/annotations/sensitive.proto package annotations import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" @@ -21,10 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - var file_udpa_annotations_sensitive_proto_extTypes = []protoimpl.ExtensionInfo{ { ExtendedType: (*descriptorpb.FieldOptions)(nil), diff --git a/go/udpa/annotations/status.pb.go b/go/udpa/annotations/status.pb.go index 3f239dd..25b93a7 100644 --- a/go/udpa/annotations/status.pb.go +++ b/go/udpa/annotations/status.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: udpa/annotations/status.proto package annotations import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type PackageVersionStatus int32 const ( diff --git a/go/udpa/annotations/versioning.pb.go b/go/udpa/annotations/versioning.pb.go index 49ced5f..7af3ed3 100644 --- a/go/udpa/annotations/versioning.pb.go +++ b/go/udpa/annotations/versioning.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: udpa/annotations/versioning.proto package annotations import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type VersioningAnnotation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/udpa/data/orca/v1/orca_load_report.pb.go b/go/udpa/data/orca/v1/orca_load_report.pb.go index be5edd2..6ee0925 100644 --- a/go/udpa/data/orca/v1/orca_load_report.pb.go +++ b/go/udpa/data/orca/v1/orca_load_report.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: udpa/data/orca/v1/orca_load_report.proto @@ -8,7 +8,6 @@ package v1 import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type OrcaLoadReport struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/udpa/service/orca/v1/orca.pb.go b/go/udpa/service/orca/v1/orca.pb.go index 9a83223..c93308f 100644 --- a/go/udpa/service/orca/v1/orca.pb.go +++ b/go/udpa/service/orca/v1/orca.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: udpa/service/orca/v1/orca.proto @@ -9,7 +9,6 @@ package v1 import ( context "context" v1 "github.com/cncf/xds/go/udpa/data/orca/v1" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -27,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type OrcaLoadReportRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/udpa/type/v1/typed_struct.pb.go b/go/udpa/type/v1/typed_struct.pb.go index 4658058..f2a65d4 100644 --- a/go/udpa/type/v1/typed_struct.pb.go +++ b/go/udpa/type/v1/typed_struct.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: udpa/type/v1/typed_struct.proto package v1 import ( - proto "github.com/golang/protobuf/proto" _struct "github.com/golang/protobuf/ptypes/struct" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type TypedStruct struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/xds/annotations/v3/migrate.pb.go b/go/xds/annotations/v3/migrate.pb.go index e29c098..cf1ee18 100644 --- a/go/xds/annotations/v3/migrate.pb.go +++ b/go/xds/annotations/v3/migrate.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/annotations/v3/migrate.proto package v3 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type MigrateAnnotation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/xds/annotations/v3/security.pb.go b/go/xds/annotations/v3/security.pb.go index c716366..084664f 100644 --- a/go/xds/annotations/v3/security.pb.go +++ b/go/xds/annotations/v3/security.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/annotations/v3/security.proto package v3 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type FieldSecurityAnnotation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/xds/annotations/v3/sensitive.pb.go b/go/xds/annotations/v3/sensitive.pb.go index 2aa60b9..b603aa4 100644 --- a/go/xds/annotations/v3/sensitive.pb.go +++ b/go/xds/annotations/v3/sensitive.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/annotations/v3/sensitive.proto package v3 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" @@ -21,10 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - var file_xds_annotations_v3_sensitive_proto_extTypes = []protoimpl.ExtensionInfo{ { ExtendedType: (*descriptorpb.FieldOptions)(nil), diff --git a/go/xds/annotations/v3/status.pb.go b/go/xds/annotations/v3/status.pb.go index 3a2015e..cc624ac 100644 --- a/go/xds/annotations/v3/status.pb.go +++ b/go/xds/annotations/v3/status.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/annotations/v3/status.proto package v3 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type PackageVersionStatus int32 const ( diff --git a/go/xds/annotations/v3/versioning.pb.go b/go/xds/annotations/v3/versioning.pb.go index c789b4c..2252689 100644 --- a/go/xds/annotations/v3/versioning.pb.go +++ b/go/xds/annotations/v3/versioning.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/annotations/v3/versioning.proto package v3 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type VersioningAnnotation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/xds/core/v3/authority.pb.go b/go/xds/core/v3/authority.pb.go index b4c8ce1..d6655c7 100644 --- a/go/xds/core/v3/authority.pb.go +++ b/go/xds/core/v3/authority.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/core/v3/authority.proto @@ -9,7 +9,6 @@ package v3 import ( _ "github.com/cncf/xds/go/xds/annotations/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Authority struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/xds/core/v3/cidr.pb.go b/go/xds/core/v3/cidr.pb.go index 482db87..0e9a4de 100644 --- a/go/xds/core/v3/cidr.pb.go +++ b/go/xds/core/v3/cidr.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/core/v3/cidr.proto @@ -9,7 +9,6 @@ package v3 import ( _ "github.com/cncf/xds/go/xds/annotations/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type CidrRange struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/xds/core/v3/collection_entry.pb.go b/go/xds/core/v3/collection_entry.pb.go index f325e11..8f598cb 100644 --- a/go/xds/core/v3/collection_entry.pb.go +++ b/go/xds/core/v3/collection_entry.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/core/v3/collection_entry.proto @@ -9,8 +9,7 @@ package v3 import ( _ "github.com/cncf/xds/go/xds/annotations/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - any "github.com/golang/protobuf/ptypes/any" + any1 "github.com/golang/protobuf/ptypes/any" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,16 +23,13 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type CollectionEntry struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to ResourceSpecifier: + // // *CollectionEntry_Locator // *CollectionEntry_InlineEntry_ ResourceSpecifier isCollectionEntry_ResourceSpecifier `protobuf_oneof:"resource_specifier"` @@ -113,9 +109,9 @@ type CollectionEntry_InlineEntry struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Resource *any.Any `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Resource *any1.Any `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` } func (x *CollectionEntry_InlineEntry) Reset() { @@ -164,7 +160,7 @@ func (x *CollectionEntry_InlineEntry) GetVersion() string { return "" } -func (x *CollectionEntry_InlineEntry) GetResource() *any.Any { +func (x *CollectionEntry_InlineEntry) GetResource() *any1.Any { if x != nil { return x.Resource } @@ -231,7 +227,7 @@ var file_xds_core_v3_collection_entry_proto_goTypes = []interface{}{ (*CollectionEntry)(nil), // 0: xds.core.v3.CollectionEntry (*CollectionEntry_InlineEntry)(nil), // 1: xds.core.v3.CollectionEntry.InlineEntry (*ResourceLocator)(nil), // 2: xds.core.v3.ResourceLocator - (*any.Any)(nil), // 3: google.protobuf.Any + (*any1.Any)(nil), // 3: google.protobuf.Any } var file_xds_core_v3_collection_entry_proto_depIdxs = []int32{ 2, // 0: xds.core.v3.CollectionEntry.locator:type_name -> xds.core.v3.ResourceLocator diff --git a/go/xds/core/v3/context_params.pb.go b/go/xds/core/v3/context_params.pb.go index 7473f90..2d0e2b6 100644 --- a/go/xds/core/v3/context_params.pb.go +++ b/go/xds/core/v3/context_params.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/core/v3/context_params.proto @@ -8,7 +8,6 @@ package v3 import ( _ "github.com/cncf/xds/go/xds/annotations/v3" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ContextParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/xds/core/v3/extension.pb.go b/go/xds/core/v3/extension.pb.go index 4b801ee..ba0c246 100644 --- a/go/xds/core/v3/extension.pb.go +++ b/go/xds/core/v3/extension.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/core/v3/extension.proto @@ -8,8 +8,7 @@ package v3 import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - any "github.com/golang/protobuf/ptypes/any" + any1 "github.com/golang/protobuf/ptypes/any" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,17 +22,13 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type TypedExtensionConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - TypedConfig *any.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + TypedConfig *any1.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` } func (x *TypedExtensionConfig) Reset() { @@ -75,7 +70,7 @@ func (x *TypedExtensionConfig) GetName() string { return "" } -func (x *TypedExtensionConfig) GetTypedConfig() *any.Any { +func (x *TypedExtensionConfig) GetTypedConfig() *any1.Any { if x != nil { return x.TypedConfig } @@ -121,7 +116,7 @@ func file_xds_core_v3_extension_proto_rawDescGZIP() []byte { var file_xds_core_v3_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_xds_core_v3_extension_proto_goTypes = []interface{}{ (*TypedExtensionConfig)(nil), // 0: xds.core.v3.TypedExtensionConfig - (*any.Any)(nil), // 1: google.protobuf.Any + (*any1.Any)(nil), // 1: google.protobuf.Any } var file_xds_core_v3_extension_proto_depIdxs = []int32{ 1, // 0: xds.core.v3.TypedExtensionConfig.typed_config:type_name -> google.protobuf.Any diff --git a/go/xds/core/v3/resource.pb.go b/go/xds/core/v3/resource.pb.go index 42882ef..915e3c7 100644 --- a/go/xds/core/v3/resource.pb.go +++ b/go/xds/core/v3/resource.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/core/v3/resource.proto @@ -8,8 +8,7 @@ package v3 import ( _ "github.com/cncf/xds/go/xds/annotations/v3" - proto "github.com/golang/protobuf/proto" - any "github.com/golang/protobuf/ptypes/any" + any1 "github.com/golang/protobuf/ptypes/any" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Resource struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -34,7 +29,7 @@ type Resource struct { Name *ResourceName `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Resource *any.Any `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` + Resource *any1.Any `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` } func (x *Resource) Reset() { @@ -83,7 +78,7 @@ func (x *Resource) GetVersion() string { return "" } -func (x *Resource) GetResource() *any.Any { +func (x *Resource) GetResource() *any1.Any { if x != nil { return x.Resource } @@ -134,7 +129,7 @@ var file_xds_core_v3_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_xds_core_v3_resource_proto_goTypes = []interface{}{ (*Resource)(nil), // 0: xds.core.v3.Resource (*ResourceName)(nil), // 1: xds.core.v3.ResourceName - (*any.Any)(nil), // 2: google.protobuf.Any + (*any1.Any)(nil), // 2: google.protobuf.Any } var file_xds_core_v3_resource_proto_depIdxs = []int32{ 1, // 0: xds.core.v3.Resource.name:type_name -> xds.core.v3.ResourceName diff --git a/go/xds/core/v3/resource_locator.pb.go b/go/xds/core/v3/resource_locator.pb.go index d0cdd8a..bc28d50 100644 --- a/go/xds/core/v3/resource_locator.pb.go +++ b/go/xds/core/v3/resource_locator.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/core/v3/resource_locator.proto @@ -9,7 +9,6 @@ package v3 import ( _ "github.com/cncf/xds/go/xds/annotations/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ResourceLocator_Scheme int32 const ( @@ -86,6 +81,7 @@ type ResourceLocator struct { Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` ResourceType string `protobuf:"bytes,4,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` // Types that are assignable to ContextParamSpecifier: + // // *ResourceLocator_ExactContext ContextParamSpecifier isResourceLocator_ContextParamSpecifier `protobuf_oneof:"context_param_specifier"` Directives []*ResourceLocator_Directive `protobuf:"bytes,6,rep,name=directives,proto3" json:"directives,omitempty"` @@ -188,6 +184,7 @@ type ResourceLocator_Directive struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Directive: + // // *ResourceLocator_Directive_Alt // *ResourceLocator_Directive_Entry Directive isResourceLocator_Directive_Directive `protobuf_oneof:"directive"` diff --git a/go/xds/core/v3/resource_name.pb.go b/go/xds/core/v3/resource_name.pb.go index 0ef98bb..92a54df 100644 --- a/go/xds/core/v3/resource_name.pb.go +++ b/go/xds/core/v3/resource_name.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/core/v3/resource_name.proto @@ -9,7 +9,6 @@ package v3 import ( _ "github.com/cncf/xds/go/xds/annotations/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ResourceName struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/xds/data/orca/v3/orca_load_report.pb.go b/go/xds/data/orca/v3/orca_load_report.pb.go index 0185b7c..13d26cf 100644 --- a/go/xds/data/orca/v3/orca_load_report.pb.go +++ b/go/xds/data/orca/v3/orca_load_report.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/data/orca/v3/orca_load_report.proto @@ -8,7 +8,6 @@ package v3 import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type OrcaLoadReport struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/xds/service/orca/v3/orca.pb.go b/go/xds/service/orca/v3/orca.pb.go index 0aafd1a..bf71080 100644 --- a/go/xds/service/orca/v3/orca.pb.go +++ b/go/xds/service/orca/v3/orca.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/service/orca/v3/orca.proto @@ -9,7 +9,6 @@ package v3 import ( context "context" v3 "github.com/cncf/xds/go/xds/data/orca/v3" - proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -27,10 +26,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type OrcaLoadReportRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/xds/type/matcher/v3/cel.pb.go b/go/xds/type/matcher/v3/cel.pb.go index ef8b175..3b44e39 100644 --- a/go/xds/type/matcher/v3/cel.pb.go +++ b/go/xds/type/matcher/v3/cel.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/type/matcher/v3/cel.proto @@ -10,7 +10,6 @@ import ( _ "github.com/cncf/xds/go/xds/annotations/v3" v3 "github.com/cncf/xds/go/xds/type/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type CelMatcher struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/xds/type/matcher/v3/domain.pb.go b/go/xds/type/matcher/v3/domain.pb.go index 38d9f57..4548fd0 100644 --- a/go/xds/type/matcher/v3/domain.pb.go +++ b/go/xds/type/matcher/v3/domain.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/type/matcher/v3/domain.proto @@ -9,7 +9,6 @@ package v3 import ( _ "github.com/cncf/xds/go/xds/annotations/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ServerNameMatcher struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/xds/type/matcher/v3/http_inputs.pb.go b/go/xds/type/matcher/v3/http_inputs.pb.go index c2b5093..c9e49a6 100644 --- a/go/xds/type/matcher/v3/http_inputs.pb.go +++ b/go/xds/type/matcher/v3/http_inputs.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/type/matcher/v3/http_inputs.proto @@ -8,7 +8,6 @@ package v3 import ( _ "github.com/cncf/xds/go/xds/annotations/v3" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type HttpAttributesCelMatchInput struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/xds/type/matcher/v3/ip.pb.go b/go/xds/type/matcher/v3/ip.pb.go index 1a38ba2..de457f4 100644 --- a/go/xds/type/matcher/v3/ip.pb.go +++ b/go/xds/type/matcher/v3/ip.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/type/matcher/v3/ip.proto @@ -10,7 +10,6 @@ import ( _ "github.com/cncf/xds/go/xds/annotations/v3" v3 "github.com/cncf/xds/go/xds/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type IPMatcher struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/xds/type/matcher/v3/matcher.pb.go b/go/xds/type/matcher/v3/matcher.pb.go index 6b912e5..cdfa2bc 100644 --- a/go/xds/type/matcher/v3/matcher.pb.go +++ b/go/xds/type/matcher/v3/matcher.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/type/matcher/v3/matcher.proto @@ -10,7 +10,6 @@ import ( _ "github.com/cncf/xds/go/xds/annotations/v3" v3 "github.com/cncf/xds/go/xds/core/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -24,16 +23,13 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Matcher struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to MatcherType: + // // *Matcher_MatcherList_ // *Matcher_MatcherTree_ MatcherType isMatcher_MatcherType `protobuf_oneof:"matcher_type"` @@ -122,6 +118,7 @@ type Matcher_OnMatch struct { unknownFields protoimpl.UnknownFields // Types that are assignable to OnMatch: + // // *Matcher_OnMatch_Matcher // *Matcher_OnMatch_Action OnMatch isMatcher_OnMatch_OnMatch `protobuf_oneof:"on_match"` @@ -250,6 +247,7 @@ type Matcher_MatcherTree struct { Input *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` // Types that are assignable to TreeType: + // // *Matcher_MatcherTree_ExactMatchMap // *Matcher_MatcherTree_PrefixMatchMap // *Matcher_MatcherTree_CustomMatch @@ -351,6 +349,7 @@ type Matcher_MatcherList_Predicate struct { unknownFields protoimpl.UnknownFields // Types that are assignable to MatchType: + // // *Matcher_MatcherList_Predicate_SinglePredicate_ // *Matcher_MatcherList_Predicate_OrMatcher // *Matcher_MatcherList_Predicate_AndMatcher @@ -515,6 +514,7 @@ type Matcher_MatcherList_Predicate_SinglePredicate struct { Input *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` // Types that are assignable to Matcher: + // // *Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch // *Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch Matcher isMatcher_MatcherList_Predicate_SinglePredicate_Matcher `protobuf_oneof:"matcher"` diff --git a/go/xds/type/matcher/v3/range.pb.go b/go/xds/type/matcher/v3/range.pb.go index f7e0533..6051501 100644 --- a/go/xds/type/matcher/v3/range.pb.go +++ b/go/xds/type/matcher/v3/range.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/type/matcher/v3/range.proto @@ -9,7 +9,6 @@ package v3 import ( v3 "github.com/cncf/xds/go/xds/type/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Int64RangeMatcher struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/xds/type/matcher/v3/regex.pb.go b/go/xds/type/matcher/v3/regex.pb.go index e64d9f5..105a076 100644 --- a/go/xds/type/matcher/v3/regex.pb.go +++ b/go/xds/type/matcher/v3/regex.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/type/matcher/v3/regex.proto @@ -8,7 +8,6 @@ package v3 import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,16 +21,13 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type RegexMatcher struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to EngineType: + // // *RegexMatcher_GoogleRe2 EngineType isRegexMatcher_EngineType `protobuf_oneof:"engine_type"` Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"` diff --git a/go/xds/type/matcher/v3/string.pb.go b/go/xds/type/matcher/v3/string.pb.go index 0df9e53..04812f3 100644 --- a/go/xds/type/matcher/v3/string.pb.go +++ b/go/xds/type/matcher/v3/string.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/type/matcher/v3/string.proto @@ -8,7 +8,6 @@ package v3 import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,16 +21,13 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type StringMatcher struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to MatchPattern: + // // *StringMatcher_Exact // *StringMatcher_Prefix // *StringMatcher_Suffix diff --git a/go/xds/type/v3/cel.pb.go b/go/xds/type/v3/cel.pb.go index 0fd975a..f033ccd 100644 --- a/go/xds/type/v3/cel.pb.go +++ b/go/xds/type/v3/cel.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/type/v3/cel.proto @@ -9,7 +9,6 @@ package v3 import ( _ "github.com/cncf/xds/go/xds/annotations/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" wrappers "github.com/golang/protobuf/ptypes/wrappers" v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -25,16 +24,13 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type CelExpression struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to ExprSpecifier: + // // *CelExpression_ParsedExpr // *CelExpression_CheckedExpr ExprSpecifier isCelExpression_ExprSpecifier `protobuf_oneof:"expr_specifier"` diff --git a/go/xds/type/v3/range.pb.go b/go/xds/type/v3/range.pb.go index 883cd43..a4b017c 100644 --- a/go/xds/type/v3/range.pb.go +++ b/go/xds/type/v3/range.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/type/v3/range.proto package v3 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,10 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Int64Range struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go/xds/type/v3/typed_struct.pb.go b/go/xds/type/v3/typed_struct.pb.go index 47c6714..ee102a5 100644 --- a/go/xds/type/v3/typed_struct.pb.go +++ b/go/xds/type/v3/typed_struct.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 +// protoc-gen-go v1.28.1 // protoc v3.18.0 // source: xds/type/v3/typed_struct.proto package v3 import ( - proto "github.com/golang/protobuf/proto" _struct "github.com/golang/protobuf/ptypes/struct" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type TypedStruct struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache From 3a472e524827f72d1ad621c4983dd5af54c46776 Mon Sep 17 00:00:00 2001 From: Sergii Tkachenko Date: Thu, 16 Nov 2023 06:28:03 -0800 Subject: [PATCH 4/8] bazel: Migrate py_proto_library to `@com_github_grpc_grpc` (#74) py_proto_library provided by @com_google_protobuf//:protobuf.bzl has been deprecated for a while now: This is provided for backwards compatibility only. Bazel 5.3 will introduce support for py_proto_library, which should be used instead. https://github.com/protocolbuffers/protobuf/blob/32af7d211b85f71920acdfa9b796db008f8c2a45/protobuf.bzl#L642-L644 However, native py_proto_library has never been provided, see bazelbuild/bazel#3935. Instead @rules_python//python:proto.bzl is recommended. I attempted switching to this library, but it's not compatible with @com_google_googleapis's py_proto_library targets, see #69. I found a hacky workaround by using cc_proto_library to generate python targets, but downstream integration into Envoy failed (envoyproxy/envoy#30159). This PR migrates py_proto_library implementation to to @com_github_grpc_grpc. This implementation is used by @com_google_googleapis's, and, more importantly, uses bazel aspects. Which decouples cncf/xds and Envoy's dependencies from concrete upstream py_proto_library implementations. This resulted in a significant code improvement of bazel/api_build_system.bzl: No more custom @com_google_googleapis dependency mapping needed via py_proto_library rules override. No more hardcoded dependencies _xds_py_proto_library - proto dependency tree is determined from proto_library definitions via Basel aspects. No more EXTERNAL_PROTO_PY_BAZEL_DEP_MAP dependency map needed - for the same reason. Similar work in Envoy: envoyproxy/envoy#30834. Signed-off-by: Sergii Tkachenko --- bazel/api_build_system.bzl | 72 +++------------------ bazel/dependency_imports.bzl | 15 ++++- bazel/external_proto_deps.bzl | 6 -- bazel/repositories.bzl | 4 ++ bazel/repository_locations.bzl | 17 +++-- go/udpa/annotations/migrate.pb.go | 2 +- go/udpa/annotations/security.pb.go | 2 +- go/udpa/annotations/sensitive.pb.go | 2 +- go/udpa/annotations/status.pb.go | 2 +- go/udpa/annotations/versioning.pb.go | 2 +- go/udpa/data/orca/v1/orca_load_report.pb.go | 2 +- go/udpa/service/orca/v1/orca.pb.go | 2 +- go/udpa/type/v1/typed_struct.pb.go | 2 +- go/xds/annotations/v3/migrate.pb.go | 2 +- go/xds/annotations/v3/security.pb.go | 2 +- go/xds/annotations/v3/sensitive.pb.go | 2 +- go/xds/annotations/v3/status.pb.go | 2 +- go/xds/annotations/v3/versioning.pb.go | 2 +- go/xds/core/v3/authority.pb.go | 2 +- go/xds/core/v3/cidr.pb.go | 2 +- go/xds/core/v3/collection_entry.pb.go | 2 +- go/xds/core/v3/context_params.pb.go | 2 +- go/xds/core/v3/extension.pb.go | 2 +- go/xds/core/v3/resource.pb.go | 2 +- go/xds/core/v3/resource_locator.pb.go | 2 +- go/xds/core/v3/resource_name.pb.go | 2 +- go/xds/data/orca/v3/orca_load_report.pb.go | 2 +- go/xds/service/orca/v3/orca.pb.go | 2 +- go/xds/type/matcher/v3/cel.pb.go | 2 +- go/xds/type/matcher/v3/domain.pb.go | 2 +- go/xds/type/matcher/v3/http_inputs.pb.go | 2 +- go/xds/type/matcher/v3/ip.pb.go | 2 +- go/xds/type/matcher/v3/matcher.pb.go | 2 +- go/xds/type/matcher/v3/range.pb.go | 2 +- go/xds/type/matcher/v3/regex.pb.go | 2 +- go/xds/type/matcher/v3/string.pb.go | 2 +- go/xds/type/v3/cel.pb.go | 2 +- go/xds/type/v3/range.pb.go | 2 +- go/xds/type/v3/typed_struct.pb.go | 2 +- 39 files changed, 71 insertions(+), 111 deletions(-) diff --git a/bazel/api_build_system.bzl b/bazel/api_build_system.bzl index b7c0b2f..d0f588c 100644 --- a/bazel/api_build_system.bzl +++ b/bazel/api_build_system.bzl @@ -1,5 +1,5 @@ load("@com_envoyproxy_protoc_gen_validate//bazel:pgv_proto_library.bzl", "pgv_cc_proto_library") -load("@com_google_protobuf//:protobuf.bzl", _py_proto_library = "py_proto_library") +load("@com_github_grpc_grpc//bazel:python_rules.bzl", _py_proto_library = "py_proto_library") load("@io_bazel_rules_go//go:def.bzl", "go_test") load("@io_bazel_rules_go//proto:def.bzl", "go_grpc_library", "go_proto_library") load("@rules_proto//proto:defs.bzl", "proto_library") @@ -7,7 +7,6 @@ load( "//bazel:external_proto_deps.bzl", "EXTERNAL_PROTO_CC_BAZEL_DEP_MAP", "EXTERNAL_PROTO_GO_BAZEL_DEP_MAP", - "EXTERNAL_PROTO_PY_BAZEL_DEP_MAP", ) _PY_PROTO_SUFFIX = "_py_proto" @@ -43,65 +42,6 @@ def _go_proto_mapping(dep): def _cc_proto_mapping(dep): return _proto_mapping(dep, EXTERNAL_PROTO_CC_BAZEL_DEP_MAP, _CC_PROTO_SUFFIX) -def _py_proto_mapping(dep): - return _proto_mapping(dep, EXTERNAL_PROTO_PY_BAZEL_DEP_MAP, _PY_PROTO_SUFFIX) - -# TODO(htuch): Convert this to native py_proto_library once -# https://github.com/bazelbuild/bazel/issues/3935 and/or -# https://github.com/bazelbuild/bazel/issues/2626 are resolved. -def _xds_py_proto_library(name, srcs = [], deps = []): - mapped_deps = [_py_proto_mapping(dep) for dep in deps] - mapped_unique_deps = [] - [mapped_unique_deps.append(d) for d in mapped_deps if d not in mapped_unique_deps] - _py_proto_library( - name = name + _PY_PROTO_SUFFIX, - srcs = srcs, - default_runtime = "@com_google_protobuf//:protobuf_python", - protoc = "@com_google_protobuf//:protoc", - deps = mapped_unique_deps + [ - "@com_envoyproxy_protoc_gen_validate//validate:validate_py", - "@com_google_googleapis//google/rpc:status_py_proto", - "@com_google_googleapis//google/api:annotations_py_proto", - "@com_google_googleapis//google/api:http_py_proto", - "@com_google_googleapis//google/api:httpbody_py_proto", - ], - visibility = ["//visibility:public"], - ) - -# This defines googleapis py_proto_library. The repository does not provide its definition and requires -# overriding it in the consuming project (see https://github.com/grpc/grpc/issues/19255 for more details). -def py_proto_library(name, deps = [], plugin = None): - srcs = [dep[:-6] + ".proto" if dep.endswith("_proto") else dep for dep in deps] - proto_deps = [] - - # py_proto_library in googleapis specifies *_proto rules in dependencies. - # By rewriting *_proto to *.proto above, the dependencies in *_proto rules are not preserved. - # As a workaround, manually specify the proto dependencies for the imported python rules. - if name == "annotations_py_proto": - proto_deps = proto_deps + [":http_py_proto"] - - # checked.proto depends on syntax.proto, we have to add this dependency manually as well. - if name == "checked_py_proto": - proto_deps = proto_deps + [":syntax_py_proto"] - - # Special handling for expr_proto target - if srcs[0] == ":expr_moved.proto": - srcs = ["checked.proto", "eval.proto", "explain.proto", "syntax.proto", "value.proto",] - proto_deps = proto_deps + ["@com_google_googleapis//google/rpc:status_py_proto"] - - - # py_proto_library does not support plugin as an argument yet at gRPC v1.25.0: - # https://github.com/grpc/grpc/blob/v1.25.0/bazel/python_rules.bzl#L72. - # plugin should also be passed in here when gRPC version is greater than v1.25.x. - _py_proto_library( - name = name, - srcs = srcs, - default_runtime = "@com_google_protobuf//:protobuf_python", - protoc = "@com_google_protobuf//:protoc", - deps = proto_deps + ["@com_google_protobuf//:protobuf_python"], - visibility = ["//visibility:public"], - ) - def _xds_cc_py_proto_library( name, visibility = ["//visibility:private"], @@ -129,7 +69,15 @@ def _xds_cc_py_proto_library( deps = [relative_name], visibility = ["//visibility:public"], ) - _xds_py_proto_library(name, srcs, deps) + + # Uses gRPC implementation of py_proto_library. + # https://github.com/grpc/grpc/blob/v1.59.1/bazel/python_rules.bzl#L160 + _py_proto_library( + name = name + _PY_PROTO_SUFFIX, + # Actual dependencies are resolved automatically from the proto_library dep tree. + deps = [relative_name], + visibility = ["//visibility:public"], + ) # Optionally define gRPC services if has_services: diff --git a/bazel/dependency_imports.bzl b/bazel/dependency_imports.bzl index c617cf3..e9701ff 100644 --- a/bazel/dependency_imports.bzl +++ b/bazel/dependency_imports.bzl @@ -3,25 +3,34 @@ load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository") load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language") load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") load("@com_envoyproxy_protoc_gen_validate//bazel:repositories.bzl", "pgv_dependencies") +load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") # go version for rules_go GO_VERSION = "1.20.2" def xds_dependency_imports(go_version = GO_VERSION): + rules_proto_dependencies() + rules_proto_toolchains() protobuf_deps() go_rules_dependencies() go_register_toolchains(go_version) gazelle_dependencies() pgv_dependencies() + # Needed for grpc's @com_github_grpc_grpc//bazel:python_rules.bzl + # Used in place of calling grpc_deps() because it needs to be called before + # loading `grpc_extra_deps.bzl` - which is not allowed in a method def context. + native.bind( + name = "protocol_compiler", + actual = "@com_google_protobuf//:protoc", + ) + switched_rules_by_language( name = "com_google_googleapis_imports", cc = True, go = True, + python = True, grpc = True, - rules_override = { - "py_proto_library": ["@com_github_cncf_xds//bazel:api_build_system.bzl", "",], - }, ) # These dependencies, like most of the Go in this repository, exist only for the API. diff --git a/bazel/external_proto_deps.bzl b/bazel/external_proto_deps.bzl index 4d95ab2..445361b 100644 --- a/bazel/external_proto_deps.bzl +++ b/bazel/external_proto_deps.bzl @@ -36,9 +36,3 @@ EXTERNAL_PROTO_CC_BAZEL_DEP_MAP = { "@com_google_googleapis//google/api/expr/v1alpha1:checked_proto": "@com_google_googleapis//google/api/expr/v1alpha1:checked_cc_proto", "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto": "@com_google_googleapis//google/api/expr/v1alpha1:syntax_cc_proto", } - -# This maps from the Bazel proto_library target to the Python language binding target for external dependencies. -EXTERNAL_PROTO_PY_BAZEL_DEP_MAP = { - "@com_google_googleapis//google/api/expr/v1alpha1:checked_proto": "@com_google_googleapis//google/api/expr/v1alpha1:expr_py_proto", - "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto": "@com_google_googleapis//google/api/expr/v1alpha1:expr_py_proto", -} diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 3ab16c5..0852669 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -26,6 +26,10 @@ def xds_api_dependencies(): "io_bazel_rules_go", locations = REPOSITORY_LOCATIONS, ) + xds_http_archive( + "rules_proto", + locations = REPOSITORY_LOCATIONS, + ) # Old name for backward compatibility. # TODO(roth): Remove once all callers are updated to use the new name. diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 080f504..8ba3f08 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -13,9 +13,9 @@ REPOSITORY_LOCATIONS = dict( urls = ["https://github.com/envoyproxy/protoc-gen-validate/archive/refs/tags/v0.6.1.tar.gz"], ), com_github_grpc_grpc = dict( - sha256 = "13e7c6460cd979726e5b3b129bb01c34532f115883ac696a75eb7f1d6a9765ed", - strip_prefix = "grpc-1.40.0", - urls = ["https://github.com/grpc/grpc/archive/refs/tags/v1.40.0.tar.gz"], + sha256 = "916f88a34f06b56432611aaa8c55befee96d0a7b7d7457733b9deeacbc016f99", + strip_prefix = "grpc-1.59.1", + urls = ["https://github.com/grpc/grpc/archive/refs/tags/v1.59.1.tar.gz"], ), com_google_googleapis = dict( # TODO(dio): Consider writing a Skylark macro for importing Google API proto. @@ -24,9 +24,9 @@ REPOSITORY_LOCATIONS = dict( urls = ["https://github.com/googleapis/googleapis/archive/114a745b2841a044e98cdbb19358ed29fcf4a5f1.tar.gz"], ), com_google_protobuf = dict( - sha256 = "52b6160ae9266630adb5e96a9fc645215336371a740e87d411bfb63ea2f268a0", - strip_prefix = "protobuf-3.18.0", - urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v3.18.0/protobuf-all-3.18.0.tar.gz"], + sha256 = "8242327e5df8c80ba49e4165250b8f79a76bd11765facefaaecfca7747dc8da2", + strip_prefix = "protobuf-3.21.5", + urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.21.5.zip"], ), io_bazel_rules_go = dict( sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996", @@ -35,4 +35,9 @@ REPOSITORY_LOCATIONS = dict( "https://github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip", ], ), + rules_proto = dict( + sha256 = "80d3a4ec17354cccc898bfe32118edd934f851b03029d63ef3fc7c8663a7415c", + strip_prefix = "rules_proto-5.3.0-21.5", + urls = ["https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.5.tar.gz",], + ), ) diff --git a/go/udpa/annotations/migrate.pb.go b/go/udpa/annotations/migrate.pb.go index be9f467..732f6b6 100644 --- a/go/udpa/annotations/migrate.pb.go +++ b/go/udpa/annotations/migrate.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: udpa/annotations/migrate.proto package annotations diff --git a/go/udpa/annotations/security.pb.go b/go/udpa/annotations/security.pb.go index aaac45e..78ffd38 100644 --- a/go/udpa/annotations/security.pb.go +++ b/go/udpa/annotations/security.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: udpa/annotations/security.proto package annotations diff --git a/go/udpa/annotations/sensitive.pb.go b/go/udpa/annotations/sensitive.pb.go index 0a46801..b5aa7eb 100644 --- a/go/udpa/annotations/sensitive.pb.go +++ b/go/udpa/annotations/sensitive.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: udpa/annotations/sensitive.proto package annotations diff --git a/go/udpa/annotations/status.pb.go b/go/udpa/annotations/status.pb.go index 25b93a7..ba399a6 100644 --- a/go/udpa/annotations/status.pb.go +++ b/go/udpa/annotations/status.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: udpa/annotations/status.proto package annotations diff --git a/go/udpa/annotations/versioning.pb.go b/go/udpa/annotations/versioning.pb.go index 7af3ed3..5bb3910 100644 --- a/go/udpa/annotations/versioning.pb.go +++ b/go/udpa/annotations/versioning.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: udpa/annotations/versioning.proto package annotations diff --git a/go/udpa/data/orca/v1/orca_load_report.pb.go b/go/udpa/data/orca/v1/orca_load_report.pb.go index 6ee0925..d25cc80 100644 --- a/go/udpa/data/orca/v1/orca_load_report.pb.go +++ b/go/udpa/data/orca/v1/orca_load_report.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: udpa/data/orca/v1/orca_load_report.proto package v1 diff --git a/go/udpa/service/orca/v1/orca.pb.go b/go/udpa/service/orca/v1/orca.pb.go index c93308f..4f96b1e 100644 --- a/go/udpa/service/orca/v1/orca.pb.go +++ b/go/udpa/service/orca/v1/orca.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: udpa/service/orca/v1/orca.proto package v1 diff --git a/go/udpa/type/v1/typed_struct.pb.go b/go/udpa/type/v1/typed_struct.pb.go index f2a65d4..2251ab9 100644 --- a/go/udpa/type/v1/typed_struct.pb.go +++ b/go/udpa/type/v1/typed_struct.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: udpa/type/v1/typed_struct.proto package v1 diff --git a/go/xds/annotations/v3/migrate.pb.go b/go/xds/annotations/v3/migrate.pb.go index cf1ee18..0cdd47f 100644 --- a/go/xds/annotations/v3/migrate.pb.go +++ b/go/xds/annotations/v3/migrate.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/annotations/v3/migrate.proto package v3 diff --git a/go/xds/annotations/v3/security.pb.go b/go/xds/annotations/v3/security.pb.go index 084664f..a50efc4 100644 --- a/go/xds/annotations/v3/security.pb.go +++ b/go/xds/annotations/v3/security.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/annotations/v3/security.proto package v3 diff --git a/go/xds/annotations/v3/sensitive.pb.go b/go/xds/annotations/v3/sensitive.pb.go index b603aa4..1fbfafa 100644 --- a/go/xds/annotations/v3/sensitive.pb.go +++ b/go/xds/annotations/v3/sensitive.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/annotations/v3/sensitive.proto package v3 diff --git a/go/xds/annotations/v3/status.pb.go b/go/xds/annotations/v3/status.pb.go index cc624ac..842025b 100644 --- a/go/xds/annotations/v3/status.pb.go +++ b/go/xds/annotations/v3/status.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/annotations/v3/status.proto package v3 diff --git a/go/xds/annotations/v3/versioning.pb.go b/go/xds/annotations/v3/versioning.pb.go index 2252689..5412c81 100644 --- a/go/xds/annotations/v3/versioning.pb.go +++ b/go/xds/annotations/v3/versioning.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/annotations/v3/versioning.proto package v3 diff --git a/go/xds/core/v3/authority.pb.go b/go/xds/core/v3/authority.pb.go index d6655c7..5a22c32 100644 --- a/go/xds/core/v3/authority.pb.go +++ b/go/xds/core/v3/authority.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/core/v3/authority.proto package v3 diff --git a/go/xds/core/v3/cidr.pb.go b/go/xds/core/v3/cidr.pb.go index 0e9a4de..e915cdb 100644 --- a/go/xds/core/v3/cidr.pb.go +++ b/go/xds/core/v3/cidr.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/core/v3/cidr.proto package v3 diff --git a/go/xds/core/v3/collection_entry.pb.go b/go/xds/core/v3/collection_entry.pb.go index 8f598cb..e91c6ab 100644 --- a/go/xds/core/v3/collection_entry.pb.go +++ b/go/xds/core/v3/collection_entry.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/core/v3/collection_entry.proto package v3 diff --git a/go/xds/core/v3/context_params.pb.go b/go/xds/core/v3/context_params.pb.go index 2d0e2b6..f3f3716 100644 --- a/go/xds/core/v3/context_params.pb.go +++ b/go/xds/core/v3/context_params.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/core/v3/context_params.proto package v3 diff --git a/go/xds/core/v3/extension.pb.go b/go/xds/core/v3/extension.pb.go index ba0c246..41db466 100644 --- a/go/xds/core/v3/extension.pb.go +++ b/go/xds/core/v3/extension.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/core/v3/extension.proto package v3 diff --git a/go/xds/core/v3/resource.pb.go b/go/xds/core/v3/resource.pb.go index 915e3c7..3b4c853 100644 --- a/go/xds/core/v3/resource.pb.go +++ b/go/xds/core/v3/resource.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/core/v3/resource.proto package v3 diff --git a/go/xds/core/v3/resource_locator.pb.go b/go/xds/core/v3/resource_locator.pb.go index bc28d50..8123f11 100644 --- a/go/xds/core/v3/resource_locator.pb.go +++ b/go/xds/core/v3/resource_locator.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/core/v3/resource_locator.proto package v3 diff --git a/go/xds/core/v3/resource_name.pb.go b/go/xds/core/v3/resource_name.pb.go index 92a54df..19e67f6 100644 --- a/go/xds/core/v3/resource_name.pb.go +++ b/go/xds/core/v3/resource_name.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/core/v3/resource_name.proto package v3 diff --git a/go/xds/data/orca/v3/orca_load_report.pb.go b/go/xds/data/orca/v3/orca_load_report.pb.go index 13d26cf..b7bc07c 100644 --- a/go/xds/data/orca/v3/orca_load_report.pb.go +++ b/go/xds/data/orca/v3/orca_load_report.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/data/orca/v3/orca_load_report.proto package v3 diff --git a/go/xds/service/orca/v3/orca.pb.go b/go/xds/service/orca/v3/orca.pb.go index bf71080..c88f201 100644 --- a/go/xds/service/orca/v3/orca.pb.go +++ b/go/xds/service/orca/v3/orca.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/service/orca/v3/orca.proto package v3 diff --git a/go/xds/type/matcher/v3/cel.pb.go b/go/xds/type/matcher/v3/cel.pb.go index 3b44e39..4168ac3 100644 --- a/go/xds/type/matcher/v3/cel.pb.go +++ b/go/xds/type/matcher/v3/cel.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/type/matcher/v3/cel.proto package v3 diff --git a/go/xds/type/matcher/v3/domain.pb.go b/go/xds/type/matcher/v3/domain.pb.go index 4548fd0..6e13992 100644 --- a/go/xds/type/matcher/v3/domain.pb.go +++ b/go/xds/type/matcher/v3/domain.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/type/matcher/v3/domain.proto package v3 diff --git a/go/xds/type/matcher/v3/http_inputs.pb.go b/go/xds/type/matcher/v3/http_inputs.pb.go index c9e49a6..ed3392c 100644 --- a/go/xds/type/matcher/v3/http_inputs.pb.go +++ b/go/xds/type/matcher/v3/http_inputs.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/type/matcher/v3/http_inputs.proto package v3 diff --git a/go/xds/type/matcher/v3/ip.pb.go b/go/xds/type/matcher/v3/ip.pb.go index de457f4..20fa124 100644 --- a/go/xds/type/matcher/v3/ip.pb.go +++ b/go/xds/type/matcher/v3/ip.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/type/matcher/v3/ip.proto package v3 diff --git a/go/xds/type/matcher/v3/matcher.pb.go b/go/xds/type/matcher/v3/matcher.pb.go index cdfa2bc..97c629b 100644 --- a/go/xds/type/matcher/v3/matcher.pb.go +++ b/go/xds/type/matcher/v3/matcher.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/type/matcher/v3/matcher.proto package v3 diff --git a/go/xds/type/matcher/v3/range.pb.go b/go/xds/type/matcher/v3/range.pb.go index 6051501..2fd6aa7 100644 --- a/go/xds/type/matcher/v3/range.pb.go +++ b/go/xds/type/matcher/v3/range.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/type/matcher/v3/range.proto package v3 diff --git a/go/xds/type/matcher/v3/regex.pb.go b/go/xds/type/matcher/v3/regex.pb.go index 105a076..1faf80e 100644 --- a/go/xds/type/matcher/v3/regex.pb.go +++ b/go/xds/type/matcher/v3/regex.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/type/matcher/v3/regex.proto package v3 diff --git a/go/xds/type/matcher/v3/string.pb.go b/go/xds/type/matcher/v3/string.pb.go index 04812f3..0aac938 100644 --- a/go/xds/type/matcher/v3/string.pb.go +++ b/go/xds/type/matcher/v3/string.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/type/matcher/v3/string.proto package v3 diff --git a/go/xds/type/v3/cel.pb.go b/go/xds/type/v3/cel.pb.go index f033ccd..8c4fd9d 100644 --- a/go/xds/type/v3/cel.pb.go +++ b/go/xds/type/v3/cel.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/type/v3/cel.proto package v3 diff --git a/go/xds/type/v3/range.pb.go b/go/xds/type/v3/range.pb.go index a4b017c..6259e55 100644 --- a/go/xds/type/v3/range.pb.go +++ b/go/xds/type/v3/range.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/type/v3/range.proto package v3 diff --git a/go/xds/type/v3/typed_struct.pb.go b/go/xds/type/v3/typed_struct.pb.go index ee102a5..c348e64 100644 --- a/go/xds/type/v3/typed_struct.pb.go +++ b/go/xds/type/v3/typed_struct.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.18.0 +// protoc v3.21.5 // source: xds/type/v3/typed_struct.proto package v3 From 0f5e0d9dbc1270b5eddd1be47fa8b2aea72f9a1f Mon Sep 17 00:00:00 2001 From: Sergii Tkachenko Date: Fri, 17 Nov 2023 15:20:44 -0800 Subject: [PATCH 5/8] Add canonical CEL support: dev.cel.expr (#75) Signed-off-by: Sergii Tkachenko --- bazel/external_proto_deps.bzl | 4 + bazel/repositories.bzl | 4 + bazel/repository_locations.bzl | 5 ++ go/xds/type/v3/cel.pb.go | 122 +++++++++++++++++++----------- go/xds/type/v3/cel.pb.validate.go | 26 +++++-- xds/type/v3/BUILD | 2 + xds/type/v3/cel.proto | 24 +++++- 7 files changed, 134 insertions(+), 53 deletions(-) diff --git a/bazel/external_proto_deps.bzl b/bazel/external_proto_deps.bzl index 445361b..af09ee6 100644 --- a/bazel/external_proto_deps.bzl +++ b/bazel/external_proto_deps.bzl @@ -29,10 +29,14 @@ EXTERNAL_PROTO_GO_BAZEL_DEP_MAP = { # go_googleapis in https://github.com/bazelbuild/rules_go/blob/master/go/dependencies.rst#overriding-dependencies "@com_google_googleapis//google/api/expr/v1alpha1:checked_proto": "@go_googleapis//google/api/expr/v1alpha1:expr_go_proto", "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto": "@go_googleapis//google/api/expr/v1alpha1:expr_go_proto", + "@dev_cel//proto/cel/expr:checked_proto": "@dev_cel//proto/cel/expr:checked_go_proto", + "@dev_cel//proto/cel/expr:syntax_proto": "@dev_cel//proto/cel/expr:syntax_go_proto", } # This maps from the Bazel proto_library target to the C++ language binding target for external dependencies. EXTERNAL_PROTO_CC_BAZEL_DEP_MAP = { "@com_google_googleapis//google/api/expr/v1alpha1:checked_proto": "@com_google_googleapis//google/api/expr/v1alpha1:checked_cc_proto", "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto": "@com_google_googleapis//google/api/expr/v1alpha1:syntax_cc_proto", + "@dev_cel//proto/cel/expr:checked_proto": "@dev_cel//proto/cel/expr:checked_cc_proto", + "@dev_cel//proto/cel/expr:syntax_proto": "@dev_cel//proto/cel/expr:syntax_cc_proto", } diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 0852669..e537208 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -22,6 +22,10 @@ def xds_api_dependencies(): "com_google_protobuf", locations = REPOSITORY_LOCATIONS, ) + xds_http_archive( + name = "dev_cel", + locations = REPOSITORY_LOCATIONS, + ) xds_http_archive( "io_bazel_rules_go", locations = REPOSITORY_LOCATIONS, diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 8ba3f08..a598136 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -28,6 +28,11 @@ REPOSITORY_LOCATIONS = dict( strip_prefix = "protobuf-3.21.5", urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.21.5.zip"], ), + dev_cel = dict( + sha256 = "6d4bf5a0ac04b35c421cb8317cd35bbe78aacffee787bc7aa89daa1e211ff6be", + strip_prefix = "cel-spec-0.13.0", + urls = ["https://github.com/google/cel-spec/archive/refs/tags/v0.13.0.tar.gz"], + ), io_bazel_rules_go = dict( sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996", urls = [ diff --git a/go/xds/type/v3/cel.pb.go b/go/xds/type/v3/cel.pb.go index 8c4fd9d..133c096 100644 --- a/go/xds/type/v3/cel.pb.go +++ b/go/xds/type/v3/cel.pb.go @@ -7,6 +7,7 @@ package v3 import ( + expr "cel.dev/expr" _ "github.com/cncf/xds/go/xds/annotations/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" wrappers "github.com/golang/protobuf/ptypes/wrappers" @@ -33,7 +34,9 @@ type CelExpression struct { // // *CelExpression_ParsedExpr // *CelExpression_CheckedExpr - ExprSpecifier isCelExpression_ExprSpecifier `protobuf_oneof:"expr_specifier"` + ExprSpecifier isCelExpression_ExprSpecifier `protobuf_oneof:"expr_specifier"` + CelExprParsed *expr.ParsedExpr `protobuf:"bytes,3,opt,name=cel_expr_parsed,json=celExprParsed,proto3" json:"cel_expr_parsed,omitempty"` + CelExprChecked *expr.CheckedExpr `protobuf:"bytes,4,opt,name=cel_expr_checked,json=celExprChecked,proto3" json:"cel_expr_checked,omitempty"` } func (x *CelExpression) Reset() { @@ -75,6 +78,7 @@ func (m *CelExpression) GetExprSpecifier() isCelExpression_ExprSpecifier { return nil } +// Deprecated: Do not use. func (x *CelExpression) GetParsedExpr() *v1alpha1.ParsedExpr { if x, ok := x.GetExprSpecifier().(*CelExpression_ParsedExpr); ok { return x.ParsedExpr @@ -82,6 +86,7 @@ func (x *CelExpression) GetParsedExpr() *v1alpha1.ParsedExpr { return nil } +// Deprecated: Do not use. func (x *CelExpression) GetCheckedExpr() *v1alpha1.CheckedExpr { if x, ok := x.GetExprSpecifier().(*CelExpression_CheckedExpr); ok { return x.CheckedExpr @@ -89,15 +94,31 @@ func (x *CelExpression) GetCheckedExpr() *v1alpha1.CheckedExpr { return nil } +func (x *CelExpression) GetCelExprParsed() *expr.ParsedExpr { + if x != nil { + return x.CelExprParsed + } + return nil +} + +func (x *CelExpression) GetCelExprChecked() *expr.CheckedExpr { + if x != nil { + return x.CelExprChecked + } + return nil +} + type isCelExpression_ExprSpecifier interface { isCelExpression_ExprSpecifier() } type CelExpression_ParsedExpr struct { + // Deprecated: Do not use. ParsedExpr *v1alpha1.ParsedExpr `protobuf:"bytes,1,opt,name=parsed_expr,json=parsedExpr,proto3,oneof"` } type CelExpression_CheckedExpr struct { + // Deprecated: Do not use. CheckedExpr *v1alpha1.CheckedExpr `protobuf:"bytes,2,opt,name=checked_expr,json=checkedExpr,proto3,oneof"` } @@ -170,40 +191,51 @@ var file_xds_type_v3_cel_proto_rawDesc = []byte{ 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x01, - 0x0a, 0x0d, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x47, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, - 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x12, 0x4a, 0x0a, 0x0c, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, - 0x64, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, - 0x45, 0x78, 0x70, 0x72, 0x42, 0x15, 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x10, - 0x43, 0x65, 0x6c, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x12, 0x47, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x65, 0x78, - 0x70, 0x72, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x41, 0x0a, 0x0d, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x50, 0x0a, 0x16, - 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x43, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x63, 0x65, 0x6c, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x63, 0x65, 0x6c, + 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x02, 0x0a, + 0x0d, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4b, + 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, + 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, + 0x0a, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x12, 0x4e, 0x0a, 0x0c, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, + 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x12, 0x3c, 0x0a, 0x0f, 0x63, + 0x65, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, + 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x52, 0x0d, 0x63, 0x65, 0x6c, 0x45, + 0x78, 0x70, 0x72, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x12, 0x3f, 0x0a, 0x10, 0x63, 0x65, 0x6c, + 0x5f, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x52, 0x0e, 0x63, 0x65, 0x6c, 0x45, + 0x78, 0x70, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x65, 0x78, + 0x70, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x9e, 0x01, 0x0a, + 0x10, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x12, 0x47, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x65, + 0x78, 0x70, 0x72, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x41, 0x0a, 0x0d, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x50, 0x0a, + 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x43, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -224,18 +256,22 @@ var file_xds_type_v3_cel_proto_goTypes = []interface{}{ (*CelExtractString)(nil), // 1: xds.type.v3.CelExtractString (*v1alpha1.ParsedExpr)(nil), // 2: google.api.expr.v1alpha1.ParsedExpr (*v1alpha1.CheckedExpr)(nil), // 3: google.api.expr.v1alpha1.CheckedExpr - (*wrappers.StringValue)(nil), // 4: google.protobuf.StringValue + (*expr.ParsedExpr)(nil), // 4: cel.expr.ParsedExpr + (*expr.CheckedExpr)(nil), // 5: cel.expr.CheckedExpr + (*wrappers.StringValue)(nil), // 6: google.protobuf.StringValue } var file_xds_type_v3_cel_proto_depIdxs = []int32{ 2, // 0: xds.type.v3.CelExpression.parsed_expr:type_name -> google.api.expr.v1alpha1.ParsedExpr 3, // 1: xds.type.v3.CelExpression.checked_expr:type_name -> google.api.expr.v1alpha1.CheckedExpr - 0, // 2: xds.type.v3.CelExtractString.expr_extract:type_name -> xds.type.v3.CelExpression - 4, // 3: xds.type.v3.CelExtractString.default_value:type_name -> google.protobuf.StringValue - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 4, // 2: xds.type.v3.CelExpression.cel_expr_parsed:type_name -> cel.expr.ParsedExpr + 5, // 3: xds.type.v3.CelExpression.cel_expr_checked:type_name -> cel.expr.CheckedExpr + 0, // 4: xds.type.v3.CelExtractString.expr_extract:type_name -> xds.type.v3.CelExpression + 6, // 5: xds.type.v3.CelExtractString.default_value:type_name -> google.protobuf.StringValue + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_xds_type_v3_cel_proto_init() } diff --git a/go/xds/type/v3/cel.pb.validate.go b/go/xds/type/v3/cel.pb.validate.go index c28fb4e..f943a62 100644 --- a/go/xds/type/v3/cel.pb.validate.go +++ b/go/xds/type/v3/cel.pb.validate.go @@ -41,6 +41,26 @@ func (m *CelExpression) Validate() error { return nil } + if v, ok := interface{}(m.GetCelExprParsed()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CelExpressionValidationError{ + field: "CelExprParsed", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetCelExprChecked()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CelExpressionValidationError{ + field: "CelExprChecked", + reason: "embedded message failed validation", + cause: err, + } + } + } + switch m.ExprSpecifier.(type) { case *CelExpression_ParsedExpr: @@ -67,12 +87,6 @@ func (m *CelExpression) Validate() error { } } - default: - return CelExpressionValidationError{ - field: "ExprSpecifier", - reason: "value is required", - } - } return nil diff --git a/xds/type/v3/BUILD b/xds/type/v3/BUILD index e3393d9..51b75ce 100644 --- a/xds/type/v3/BUILD +++ b/xds/type/v3/BUILD @@ -7,5 +7,7 @@ xds_proto_package( "//xds/annotations/v3:pkg", "@com_google_googleapis//google/api/expr/v1alpha1:checked_proto", "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto", + "@dev_cel//proto/cel/expr:checked_proto", + "@dev_cel//proto/cel/expr:syntax_proto", ], ) diff --git a/xds/type/v3/cel.proto b/xds/type/v3/cel.proto index 71f6cba..df4f81d 100644 --- a/xds/type/v3/cel.proto +++ b/xds/type/v3/cel.proto @@ -4,6 +4,8 @@ package xds.type.v3; import "google/api/expr/v1alpha1/checked.proto"; import "google/api/expr/v1alpha1/syntax.proto"; +import "cel/expr/checked.proto"; +import "cel/expr/syntax.proto"; import "google/protobuf/wrappers.proto"; import "xds/annotations/v3/status.proto"; @@ -23,14 +25,28 @@ option (xds.annotations.v3.file_status).work_in_progress = true; // `_ (CEL) program. message CelExpression { oneof expr_specifier { - option (validate.required) = true; - // Parsed expression in abstract syntax tree (AST) form. - google.api.expr.v1alpha1.ParsedExpr parsed_expr = 1; + // + // Deprecated -- use ``cel_expr_parsed`` field instead. + // If ``cel_expr_parsed`` or ``cel_expr_checked`` is set, this field is not used. + google.api.expr.v1alpha1.ParsedExpr parsed_expr = 1 [deprecated = true]; // Parsed expression in abstract syntax tree (AST) form that has been successfully type checked. - google.api.expr.v1alpha1.CheckedExpr checked_expr = 2; + // + // Deprecated -- use ``cel_expr_checked`` field instead. + // If ``cel_expr_parsed`` or ``cel_expr_checked`` is set, this field is not used. + google.api.expr.v1alpha1.CheckedExpr checked_expr = 2 [deprecated = true]; } + + // Parsed expression in abstract syntax tree (AST) form. + // + // If ``cel_expr_checked`` is set, this field is not used. + cel.expr.ParsedExpr cel_expr_parsed = 3; + + // Parsed expression in abstract syntax tree (AST) form that has been successfully type checked. + // + // If set, takes precedence over ``cel_expr_parsed``. + cel.expr.CheckedExpr cel_expr_checked = 4; } // Extracts a string by evaluating a `Common Expression Language From 5b9bca5544b3295e323a95e2b88b5badc1bbf0da Mon Sep 17 00:00:00 2001 From: Sergii Tkachenko Date: Tue, 21 Nov 2023 10:44:54 -0800 Subject: [PATCH 6/8] Revert "Add canonical CEL support: dev.cel.expr (#75)" (#79) Signed-off-by: Sergii Tkachenko --- bazel/external_proto_deps.bzl | 4 - bazel/repositories.bzl | 4 - bazel/repository_locations.bzl | 5 -- go/xds/type/v3/cel.pb.go | 122 +++++++++++------------------- go/xds/type/v3/cel.pb.validate.go | 26 ++----- xds/type/v3/BUILD | 2 - xds/type/v3/cel.proto | 24 +----- 7 files changed, 53 insertions(+), 134 deletions(-) diff --git a/bazel/external_proto_deps.bzl b/bazel/external_proto_deps.bzl index af09ee6..445361b 100644 --- a/bazel/external_proto_deps.bzl +++ b/bazel/external_proto_deps.bzl @@ -29,14 +29,10 @@ EXTERNAL_PROTO_GO_BAZEL_DEP_MAP = { # go_googleapis in https://github.com/bazelbuild/rules_go/blob/master/go/dependencies.rst#overriding-dependencies "@com_google_googleapis//google/api/expr/v1alpha1:checked_proto": "@go_googleapis//google/api/expr/v1alpha1:expr_go_proto", "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto": "@go_googleapis//google/api/expr/v1alpha1:expr_go_proto", - "@dev_cel//proto/cel/expr:checked_proto": "@dev_cel//proto/cel/expr:checked_go_proto", - "@dev_cel//proto/cel/expr:syntax_proto": "@dev_cel//proto/cel/expr:syntax_go_proto", } # This maps from the Bazel proto_library target to the C++ language binding target for external dependencies. EXTERNAL_PROTO_CC_BAZEL_DEP_MAP = { "@com_google_googleapis//google/api/expr/v1alpha1:checked_proto": "@com_google_googleapis//google/api/expr/v1alpha1:checked_cc_proto", "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto": "@com_google_googleapis//google/api/expr/v1alpha1:syntax_cc_proto", - "@dev_cel//proto/cel/expr:checked_proto": "@dev_cel//proto/cel/expr:checked_cc_proto", - "@dev_cel//proto/cel/expr:syntax_proto": "@dev_cel//proto/cel/expr:syntax_cc_proto", } diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index e537208..0852669 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -22,10 +22,6 @@ def xds_api_dependencies(): "com_google_protobuf", locations = REPOSITORY_LOCATIONS, ) - xds_http_archive( - name = "dev_cel", - locations = REPOSITORY_LOCATIONS, - ) xds_http_archive( "io_bazel_rules_go", locations = REPOSITORY_LOCATIONS, diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index a598136..8ba3f08 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -28,11 +28,6 @@ REPOSITORY_LOCATIONS = dict( strip_prefix = "protobuf-3.21.5", urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.21.5.zip"], ), - dev_cel = dict( - sha256 = "6d4bf5a0ac04b35c421cb8317cd35bbe78aacffee787bc7aa89daa1e211ff6be", - strip_prefix = "cel-spec-0.13.0", - urls = ["https://github.com/google/cel-spec/archive/refs/tags/v0.13.0.tar.gz"], - ), io_bazel_rules_go = dict( sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996", urls = [ diff --git a/go/xds/type/v3/cel.pb.go b/go/xds/type/v3/cel.pb.go index 133c096..8c4fd9d 100644 --- a/go/xds/type/v3/cel.pb.go +++ b/go/xds/type/v3/cel.pb.go @@ -7,7 +7,6 @@ package v3 import ( - expr "cel.dev/expr" _ "github.com/cncf/xds/go/xds/annotations/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" wrappers "github.com/golang/protobuf/ptypes/wrappers" @@ -34,9 +33,7 @@ type CelExpression struct { // // *CelExpression_ParsedExpr // *CelExpression_CheckedExpr - ExprSpecifier isCelExpression_ExprSpecifier `protobuf_oneof:"expr_specifier"` - CelExprParsed *expr.ParsedExpr `protobuf:"bytes,3,opt,name=cel_expr_parsed,json=celExprParsed,proto3" json:"cel_expr_parsed,omitempty"` - CelExprChecked *expr.CheckedExpr `protobuf:"bytes,4,opt,name=cel_expr_checked,json=celExprChecked,proto3" json:"cel_expr_checked,omitempty"` + ExprSpecifier isCelExpression_ExprSpecifier `protobuf_oneof:"expr_specifier"` } func (x *CelExpression) Reset() { @@ -78,7 +75,6 @@ func (m *CelExpression) GetExprSpecifier() isCelExpression_ExprSpecifier { return nil } -// Deprecated: Do not use. func (x *CelExpression) GetParsedExpr() *v1alpha1.ParsedExpr { if x, ok := x.GetExprSpecifier().(*CelExpression_ParsedExpr); ok { return x.ParsedExpr @@ -86,7 +82,6 @@ func (x *CelExpression) GetParsedExpr() *v1alpha1.ParsedExpr { return nil } -// Deprecated: Do not use. func (x *CelExpression) GetCheckedExpr() *v1alpha1.CheckedExpr { if x, ok := x.GetExprSpecifier().(*CelExpression_CheckedExpr); ok { return x.CheckedExpr @@ -94,31 +89,15 @@ func (x *CelExpression) GetCheckedExpr() *v1alpha1.CheckedExpr { return nil } -func (x *CelExpression) GetCelExprParsed() *expr.ParsedExpr { - if x != nil { - return x.CelExprParsed - } - return nil -} - -func (x *CelExpression) GetCelExprChecked() *expr.CheckedExpr { - if x != nil { - return x.CelExprChecked - } - return nil -} - type isCelExpression_ExprSpecifier interface { isCelExpression_ExprSpecifier() } type CelExpression_ParsedExpr struct { - // Deprecated: Do not use. ParsedExpr *v1alpha1.ParsedExpr `protobuf:"bytes,1,opt,name=parsed_expr,json=parsedExpr,proto3,oneof"` } type CelExpression_CheckedExpr struct { - // Deprecated: Do not use. CheckedExpr *v1alpha1.CheckedExpr `protobuf:"bytes,2,opt,name=checked_expr,json=checkedExpr,proto3,oneof"` } @@ -191,51 +170,40 @@ var file_xds_type_v3_cel_proto_rawDesc = []byte{ 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x63, 0x65, 0x6c, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x63, 0x65, 0x6c, - 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x02, 0x0a, - 0x0d, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4b, - 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, - 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, - 0x0a, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x12, 0x4e, 0x0a, 0x0c, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, - 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x12, 0x3c, 0x0a, 0x0f, 0x63, - 0x65, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, - 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x52, 0x0d, 0x63, 0x65, 0x6c, 0x45, - 0x78, 0x70, 0x72, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x12, 0x3f, 0x0a, 0x10, 0x63, 0x65, 0x6c, - 0x5f, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x52, 0x0e, 0x63, 0x65, 0x6c, 0x45, - 0x78, 0x70, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x65, 0x78, - 0x70, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x9e, 0x01, 0x0a, - 0x10, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x12, 0x47, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x65, - 0x78, 0x70, 0x72, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x41, 0x0a, 0x0d, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x50, 0x0a, - 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x43, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x01, + 0x0a, 0x0d, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x47, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, + 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x12, 0x4a, 0x0a, 0x0c, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, + 0x64, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, + 0x45, 0x78, 0x70, 0x72, 0x42, 0x15, 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x10, + 0x43, 0x65, 0x6c, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x12, 0x47, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x65, 0x78, + 0x70, 0x72, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x41, 0x0a, 0x0d, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x50, 0x0a, 0x16, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x43, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -256,22 +224,18 @@ var file_xds_type_v3_cel_proto_goTypes = []interface{}{ (*CelExtractString)(nil), // 1: xds.type.v3.CelExtractString (*v1alpha1.ParsedExpr)(nil), // 2: google.api.expr.v1alpha1.ParsedExpr (*v1alpha1.CheckedExpr)(nil), // 3: google.api.expr.v1alpha1.CheckedExpr - (*expr.ParsedExpr)(nil), // 4: cel.expr.ParsedExpr - (*expr.CheckedExpr)(nil), // 5: cel.expr.CheckedExpr - (*wrappers.StringValue)(nil), // 6: google.protobuf.StringValue + (*wrappers.StringValue)(nil), // 4: google.protobuf.StringValue } var file_xds_type_v3_cel_proto_depIdxs = []int32{ 2, // 0: xds.type.v3.CelExpression.parsed_expr:type_name -> google.api.expr.v1alpha1.ParsedExpr 3, // 1: xds.type.v3.CelExpression.checked_expr:type_name -> google.api.expr.v1alpha1.CheckedExpr - 4, // 2: xds.type.v3.CelExpression.cel_expr_parsed:type_name -> cel.expr.ParsedExpr - 5, // 3: xds.type.v3.CelExpression.cel_expr_checked:type_name -> cel.expr.CheckedExpr - 0, // 4: xds.type.v3.CelExtractString.expr_extract:type_name -> xds.type.v3.CelExpression - 6, // 5: xds.type.v3.CelExtractString.default_value:type_name -> google.protobuf.StringValue - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 0, // 2: xds.type.v3.CelExtractString.expr_extract:type_name -> xds.type.v3.CelExpression + 4, // 3: xds.type.v3.CelExtractString.default_value:type_name -> google.protobuf.StringValue + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_xds_type_v3_cel_proto_init() } diff --git a/go/xds/type/v3/cel.pb.validate.go b/go/xds/type/v3/cel.pb.validate.go index f943a62..c28fb4e 100644 --- a/go/xds/type/v3/cel.pb.validate.go +++ b/go/xds/type/v3/cel.pb.validate.go @@ -41,26 +41,6 @@ func (m *CelExpression) Validate() error { return nil } - if v, ok := interface{}(m.GetCelExprParsed()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CelExpressionValidationError{ - field: "CelExprParsed", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if v, ok := interface{}(m.GetCelExprChecked()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CelExpressionValidationError{ - field: "CelExprChecked", - reason: "embedded message failed validation", - cause: err, - } - } - } - switch m.ExprSpecifier.(type) { case *CelExpression_ParsedExpr: @@ -87,6 +67,12 @@ func (m *CelExpression) Validate() error { } } + default: + return CelExpressionValidationError{ + field: "ExprSpecifier", + reason: "value is required", + } + } return nil diff --git a/xds/type/v3/BUILD b/xds/type/v3/BUILD index 51b75ce..e3393d9 100644 --- a/xds/type/v3/BUILD +++ b/xds/type/v3/BUILD @@ -7,7 +7,5 @@ xds_proto_package( "//xds/annotations/v3:pkg", "@com_google_googleapis//google/api/expr/v1alpha1:checked_proto", "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto", - "@dev_cel//proto/cel/expr:checked_proto", - "@dev_cel//proto/cel/expr:syntax_proto", ], ) diff --git a/xds/type/v3/cel.proto b/xds/type/v3/cel.proto index df4f81d..71f6cba 100644 --- a/xds/type/v3/cel.proto +++ b/xds/type/v3/cel.proto @@ -4,8 +4,6 @@ package xds.type.v3; import "google/api/expr/v1alpha1/checked.proto"; import "google/api/expr/v1alpha1/syntax.proto"; -import "cel/expr/checked.proto"; -import "cel/expr/syntax.proto"; import "google/protobuf/wrappers.proto"; import "xds/annotations/v3/status.proto"; @@ -25,28 +23,14 @@ option (xds.annotations.v3.file_status).work_in_progress = true; // `_ (CEL) program. message CelExpression { oneof expr_specifier { + option (validate.required) = true; + // Parsed expression in abstract syntax tree (AST) form. - // - // Deprecated -- use ``cel_expr_parsed`` field instead. - // If ``cel_expr_parsed`` or ``cel_expr_checked`` is set, this field is not used. - google.api.expr.v1alpha1.ParsedExpr parsed_expr = 1 [deprecated = true]; + google.api.expr.v1alpha1.ParsedExpr parsed_expr = 1; // Parsed expression in abstract syntax tree (AST) form that has been successfully type checked. - // - // Deprecated -- use ``cel_expr_checked`` field instead. - // If ``cel_expr_parsed`` or ``cel_expr_checked`` is set, this field is not used. - google.api.expr.v1alpha1.CheckedExpr checked_expr = 2 [deprecated = true]; + google.api.expr.v1alpha1.CheckedExpr checked_expr = 2; } - - // Parsed expression in abstract syntax tree (AST) form. - // - // If ``cel_expr_checked`` is set, this field is not used. - cel.expr.ParsedExpr cel_expr_parsed = 3; - - // Parsed expression in abstract syntax tree (AST) form that has been successfully type checked. - // - // If set, takes precedence over ``cel_expr_parsed``. - cel.expr.CheckedExpr cel_expr_checked = 4; } // Extracts a string by evaluating a `Common Expression Language From 8e57aacd026e1fb8b3371369970172b5ea8f39b1 Mon Sep 17 00:00:00 2001 From: Sergii Tkachenko Date: Mon, 27 Nov 2023 10:21:46 -0800 Subject: [PATCH 7/8] ci: Add `go build` CI job (#78) Signed-off-by: Sergii Tkachenko --- .gitignore | 1 - ci/azure-pipelines.yml | 32 ++++++++++++++++++++++++++++++++ go/go.mod | 17 +++++++++++++---- go/go.sum | 24 ++++++++++++++++++++++++ 4 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 go/go.sum diff --git a/.gitignore b/.gitignore index 966e24c..ac51a05 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ bazel-* -go.sum diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index c648934..a98e81a 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -24,3 +24,35 @@ jobs: - bash: tools/generate_go_protobuf.py && test -z "$(git status --porcelain)" env: TEST_TMPDIR: $(Agent.TempDirectory)/tmp + +- job: go_build + pool: + vmImage: 'ubuntu-latest' + steps: + - task: GoTool@0 + displayName: "Install Go" + inputs: + version: '1.20.2' + + - task: Go@0 + displayName: "go mod download" + inputs: + command: 'custom' + customCommand: 'mod' + arguments: 'download' + workingDirectory: 'go/' + + - task: Go@0 + displayName: "go mod verify" + inputs: + command: 'custom' + customCommand: 'mod' + arguments: 'verify' + workingDirectory: 'go/' + + - task: Go@0 + displayName: "go build ./..." + inputs: + command: 'build' + arguments: '-v ./...' + workingDirectory: 'go/' diff --git a/go/go.mod b/go/go.mod index f87ef4d..fdfaeca 100644 --- a/go/go.mod +++ b/go/go.mod @@ -1,9 +1,18 @@ module github.com/cncf/xds/go -go 1.11 +go 1.19 require ( - github.com/envoyproxy/protoc-gen-validate v0.1.0 - github.com/golang/protobuf v1.3.2 - google.golang.org/grpc v1.25.1 + github.com/envoyproxy/protoc-gen-validate v1.0.2 + github.com/golang/protobuf v1.5.3 + google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d + google.golang.org/grpc v1.59.0 + google.golang.org/protobuf v1.31.0 +) + +require ( + golang.org/x/net v0.14.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect ) diff --git a/go/go.sum b/go/go.sum new file mode 100644 index 0000000..e4f1e7c --- /dev/null +++ b/go/go.sum @@ -0,0 +1,24 @@ +github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= +github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= From 0fa0005c9caaaae56e586ec2c6c26ef93704d29f Mon Sep 17 00:00:00 2001 From: John Howard Date: Mon, 27 Nov 2023 16:30:11 -0800 Subject: [PATCH 8/8] annotations: correct go_package (#80) Signed-off-by: John Howard --- go/udpa/annotations/migrate.pb.go | 7 ++++--- go/udpa/annotations/security.pb.go | 8 ++++---- go/udpa/annotations/sensitive.pb.go | 6 +++--- go/udpa/annotations/status.pb.go | 6 +++--- go/udpa/annotations/versioning.pb.go | 7 ++++--- udpa/annotations/migrate.proto | 2 +- udpa/annotations/security.proto | 2 +- udpa/annotations/sensitive.proto | 2 +- udpa/annotations/status.proto | 2 +- udpa/annotations/versioning.proto | 2 +- 10 files changed, 23 insertions(+), 21 deletions(-) diff --git a/go/udpa/annotations/migrate.pb.go b/go/udpa/annotations/migrate.pb.go index 732f6b6..4da2bd3 100644 --- a/go/udpa/annotations/migrate.pb.go +++ b/go/udpa/annotations/migrate.pb.go @@ -299,9 +299,10 @@ var file_udpa_annotations_migrate_proto_rawDesc = []byte{ 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x42, - 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, - 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, + 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/go/udpa/annotations/security.pb.go b/go/udpa/annotations/security.pb.go index 78ffd38..c06e280 100644 --- a/go/udpa/annotations/security.pb.go +++ b/go/udpa/annotations/security.pb.go @@ -121,10 +121,10 @@ var file_udpa_annotations_security_proto_rawDesc = []byte{ 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x42, - 0x2c, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, - 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, + 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/go/udpa/annotations/sensitive.pb.go b/go/udpa/annotations/sensitive.pb.go index b5aa7eb..f8fc822 100644 --- a/go/udpa/annotations/sensitive.pb.go +++ b/go/udpa/annotations/sensitive.pb.go @@ -49,10 +49,10 @@ var file_udpa_annotations_sensitive_proto_rawDesc = []byte{ 0x69, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xf7, 0xb6, 0xc1, 0x24, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x65, 0x6e, - 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_udpa_annotations_sensitive_proto_goTypes = []interface{}{ diff --git a/go/udpa/annotations/status.pb.go b/go/udpa/annotations/status.pb.go index ba399a6..ac7238e 100644 --- a/go/udpa/annotations/status.pb.go +++ b/go/udpa/annotations/status.pb.go @@ -175,10 +175,10 @@ var file_udpa_annotations_status_proto_rawDesc = []byte{ 0x6a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/go/udpa/annotations/versioning.pb.go b/go/udpa/annotations/versioning.pb.go index 5bb3910..68a101a 100644 --- a/go/udpa/annotations/versioning.pb.go +++ b/go/udpa/annotations/versioning.pb.go @@ -105,9 +105,10 @@ var file_udpa_annotations_versioning_proto_rawDesc = []byte{ 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x42, - 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, - 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, + 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/udpa/annotations/migrate.proto b/udpa/annotations/migrate.proto index 5289cb8..5f5f389 100644 --- a/udpa/annotations/migrate.proto +++ b/udpa/annotations/migrate.proto @@ -8,7 +8,7 @@ package udpa.annotations; import "google/protobuf/descriptor.proto"; -option go_package = "github.com/cncf/xds/go/annotations"; +option go_package = "github.com/cncf/xds/go/udpa/annotations"; // Magic number in this file derived from top 28bit of SHA256 digest of // "udpa.annotation.migrate". diff --git a/udpa/annotations/security.proto b/udpa/annotations/security.proto index 52801d3..0ef9197 100644 --- a/udpa/annotations/security.proto +++ b/udpa/annotations/security.proto @@ -10,7 +10,7 @@ import "udpa/annotations/status.proto"; import "google/protobuf/descriptor.proto"; -option go_package = "github.com/cncf/xds/go/annotations"; +option go_package = "github.com/cncf/xds/go/udpa/annotations"; // All annotations in this file are experimental and subject to change. Their // only consumer today is the Envoy APIs and SecuritAnnotationValidator protoc diff --git a/udpa/annotations/sensitive.proto b/udpa/annotations/sensitive.proto index ab822fb..c7d8af6 100644 --- a/udpa/annotations/sensitive.proto +++ b/udpa/annotations/sensitive.proto @@ -8,7 +8,7 @@ package udpa.annotations; import "google/protobuf/descriptor.proto"; -option go_package = "github.com/cncf/xds/go/annotations"; +option go_package = "github.com/cncf/xds/go/udpa/annotations"; extend google.protobuf.FieldOptions { // Magic number is the 28 most significant bits in the sha256sum of "udpa.annotations.sensitive". diff --git a/udpa/annotations/status.proto b/udpa/annotations/status.proto index 76cfd4d..5a90bde 100644 --- a/udpa/annotations/status.proto +++ b/udpa/annotations/status.proto @@ -8,7 +8,7 @@ package udpa.annotations; import "google/protobuf/descriptor.proto"; -option go_package = "github.com/cncf/xds/go/annotations"; +option go_package = "github.com/cncf/xds/go/udpa/annotations"; // Magic number in this file derived from top 28bit of SHA256 digest of // "udpa.annotation.status". diff --git a/udpa/annotations/versioning.proto b/udpa/annotations/versioning.proto index dcb7c85..06df78d 100644 --- a/udpa/annotations/versioning.proto +++ b/udpa/annotations/versioning.proto @@ -8,7 +8,7 @@ package udpa.annotations; import "google/protobuf/descriptor.proto"; -option go_package = "github.com/cncf/xds/go/annotations"; +option go_package = "github.com/cncf/xds/go/udpa/annotations"; extend google.protobuf.MessageOptions { // Magic number derived from 0x78 ('x') 0x44 ('D') 0x53 ('S')