Skip to content

Commit d7f793b

Browse files
[protobuf] Update protobuf definitions to v1.33.0 (#449)
Signed-off-by: envoy-bot <[email protected]> Co-authored-by: envoy-bot <[email protected]>
1 parent f1cad10 commit d7f793b

File tree

80 files changed

+1713
-2409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1713
-2409
lines changed

api/src/main/proto/cel/expr/conformance/envcheck.proto

-37
This file was deleted.

api/src/main/proto/cel/expr/conformance/proto2/test_all_types.proto

+31
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
syntax = "proto2";
216

317
package cel.expr.conformance.proto2;
418

519
import "google/protobuf/any.proto";
620
import "google/protobuf/duration.proto";
21+
import "google/protobuf/empty.proto";
22+
import "google/protobuf/field_mask.proto";
723
import "google/protobuf/struct.proto";
824
import "google/protobuf/timestamp.proto";
925
import "google/protobuf/wrappers.proto";
@@ -65,6 +81,8 @@ message TestAllTypes {
6581
optional google.protobuf.ListValue list_value = 114;
6682
optional google.protobuf.NullValue null_value = 115;
6783
optional google.protobuf.NullValue optional_null_value = 116;
84+
optional google.protobuf.FieldMask field_mask = 117;
85+
optional google.protobuf.Empty empty = 118;
6886

6987
// Nested messages
7088
oneof nested_type {
@@ -286,6 +304,19 @@ message TestAllTypes {
286304
map<string, google.protobuf.StringValue> map_string_string_wrapper = 321;
287305
map<string, google.protobuf.BoolValue> map_string_bool_wrapper = 322;
288306
map<string, google.protobuf.BytesValue> map_string_bytes_wrapper = 323;
307+
308+
oneof kind {
309+
NestedTestAllTypes oneof_type = 400;
310+
NestedMessage oneof_msg = 401;
311+
bool oneof_bool = 402;
312+
}
313+
314+
optional group NestedGroup = 403 {
315+
optional int32 single_id = 404;
316+
optional string single_name = 405;
317+
}
318+
319+
extensions 1000 to max;
289320
}
290321

291322
// This proto includes a recursively nested message.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto2";
16+
17+
package cel.expr.conformance.proto2;
18+
19+
import "cel/expr/conformance/proto2/test_all_types.proto";
20+
21+
option cc_enable_arenas = true;
22+
option go_package = "cel.dev/expr/conformance/proto2";
23+
option java_outer_classname = "TestAllTypesExtensions";
24+
option java_package = "dev.cel.expr.conformance.proto2";
25+
option java_multiple_files = true;
26+
27+
// Package scoped extensions
28+
extend TestAllTypes {
29+
optional int32 int32_ext = 1000;
30+
optional TestAllTypes nested_ext = 1001;
31+
optional TestAllTypes test_all_types_ext = 1002;
32+
optional TestAllTypes.NestedEnum nested_enum_ext = 1003;
33+
repeated TestAllTypes repeated_test_all_types = 1004;
34+
}
35+
36+
// Message scoped extensions
37+
message Proto2ExtensionScopedMessage {
38+
extend TestAllTypes {
39+
optional int64 int64_ext = 1005;
40+
optional TestAllTypes message_scoped_nested_ext = 1006;
41+
optional TestAllTypes.NestedEnum nested_enum_ext = 1007;
42+
repeated TestAllTypes message_scoped_repeated_test_all_types = 1008;
43+
}
44+
}

api/src/main/proto/cel/expr/conformance/proto3/test_all_types.proto

+26
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
syntax = "proto3";
216

317
package cel.expr.conformance.proto3;
418

519
import "google/protobuf/any.proto";
620
import "google/protobuf/duration.proto";
21+
import "google/protobuf/empty.proto";
22+
import "google/protobuf/field_mask.proto";
723
import "google/protobuf/struct.proto";
824
import "google/protobuf/timestamp.proto";
925
import "google/protobuf/wrappers.proto";
@@ -46,6 +62,8 @@ message TestAllTypes {
4662
bool single_bool = 13;
4763
string single_string = 14;
4864
bytes single_bytes = 15;
65+
optional bool optional_bool = 16;
66+
optional bool optional_string = 17;
4967

5068
// Wellknown.
5169
google.protobuf.Any single_any = 100;
@@ -65,6 +83,8 @@ message TestAllTypes {
6583
google.protobuf.ListValue list_value = 114;
6684
google.protobuf.NullValue null_value = 115;
6785
optional google.protobuf.NullValue optional_null_value = 116;
86+
google.protobuf.FieldMask field_mask = 117;
87+
google.protobuf.Empty empty = 118;
6888

6989
// Nested messages
7090
oneof nested_type {
@@ -286,6 +306,12 @@ message TestAllTypes {
286306
map<string, google.protobuf.StringValue> map_string_string_wrapper = 321;
287307
map<string, google.protobuf.BoolValue> map_string_bool_wrapper = 322;
288308
map<string, google.protobuf.BytesValue> map_string_bytes_wrapper = 323;
309+
310+
oneof kind {
311+
NestedTestAllTypes oneof_type = 400;
312+
NestedMessage oneof_msg = 401;
313+
bool oneof_bool = 402;
314+
}
289315
}
290316

291317
// This proto includes a recursively nested message.

api/src/main/proto/cel/expr/conformance/simple.proto api/src/main/proto/cel/expr/conformance/test/simple.proto

+21-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 Google LLC
1+
// Copyright 2024 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -16,17 +16,17 @@
1616

1717
syntax = "proto3";
1818

19-
package cel.expr.conformance;
19+
package cel.expr.conformance.test;
2020

2121
import "cel/expr/checked.proto";
2222
import "cel/expr/eval.proto";
2323
import "cel/expr/value.proto";
2424

2525
option cc_enable_arenas = true;
26-
option go_package = "cel.dev/expr/conformance";
26+
option go_package = "cel.dev/expr/conformance/test";
2727
option java_multiple_files = true;
2828
option java_outer_classname = "SimpleProto";
29-
option java_package = "dev.cel.expr.conformance";
29+
option java_package = "dev.cel.expr.conformance.test";
3030

3131
// The format of a simple test file, expected to be stored in text format.
3232
// A file is the unit of granularity for selecting conformance tests,
@@ -76,6 +76,9 @@ message SimpleTest {
7676
// Disables the check phase.
7777
bool disable_check = 5;
7878

79+
// Disables the evaluate phase.
80+
bool check_only = 15;
81+
7982
// The type environment to use for the check phase.
8083
repeated cel.expr.Decl type_env = 6;
8184

@@ -97,6 +100,9 @@ message SimpleTest {
97100
// * a floating point NaN should match any NaN.
98101
cel.expr.Value value = 8;
99102

103+
// A result and deduced expression type.
104+
TypedResult typed_result = 16;
105+
100106
// Matches error evaluation results.
101107
cel.expr.ErrorSet eval_error = 9;
102108

@@ -111,7 +117,17 @@ message SimpleTest {
111117
// (Using explicit message since oneof can't handle repeated.)
112118
UnknownSetMatcher any_unknowns = 12;
113119
}
114-
// Next is 15.
120+
// Next is 17.
121+
}
122+
123+
// Matches a result along with deduced expression type.
124+
message TypedResult {
125+
// A normal value, which must match the evaluation result exactly
126+
// via value equality semantics. This is ignored if the test is `check_only`.
127+
cel.expr.Value result = 1;
128+
129+
// The deduced type of the expression as reported by the checker.
130+
cel.expr.Type deduced_type = 2;
115131
}
116132

117133
// Matches error results from Eval.

api/src/main/proto/cel/expr/syntax.proto

+3-4
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,12 @@ message Expr {
216216
// ```
217217
message Comprehension {
218218
// The name of the first iteration variable.
219-
// When the iter_range is a list, this variable is the list element.
220-
// When the iter_range is a map, this variable is the map entry key.
219+
// For the single iteration variable macros, when iter_range is a list, this
220+
// variable is the list element and when the iter_range is a map, this
221+
// variable is the map key.
221222
string iter_var = 1;
222223

223224
// The name of the second iteration variable, empty if not set.
224-
// When the iter_range is a list, this variable is the integer index.
225-
// When the iter_range is a map, this variable is the map entry value.
226225
// This field is only set for comprehension v2 macros.
227226
string iter_var2 = 8;
228227

api/src/main/proto/envoy/admin/v3/config_dump_shared.proto

+8
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ enum ClientResourceStatus {
3939

4040
// Client received this resource and replied with NACK.
4141
NACKED = 4;
42+
43+
// Client received an error from the control plane. The attached config
44+
// dump is the most recent accepted one. If no config is accepted yet,
45+
// the attached config dump will be empty.
46+
RECEIVED_ERROR = 5;
47+
48+
// Client timed out waiting for the resource from the control plane.
49+
TIMEOUT = 6;
4250
}
4351

4452
message UpdateFailureState {

api/src/main/proto/envoy/admin/v3/server_info.proto

+4-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ message ServerInfo {
5959
config.core.v3.Node node = 7;
6060
}
6161

62-
// [#next-free-field: 41]
62+
// [#next-free-field: 42]
6363
message CommandLineOptions {
6464
option (udpa.annotations.versioning).previous_message_type =
6565
"envoy.admin.v2alpha.CommandLineOptions";
@@ -125,6 +125,9 @@ message CommandLineOptions {
125125
// See :option:`--ignore-unknown-dynamic-fields` for details.
126126
bool ignore_unknown_dynamic_fields = 30;
127127

128+
// See :option:`--skip-deprecated-logs` for details.
129+
bool skip_deprecated_logs = 41;
130+
128131
// See :option:`--admin-address-path` for details.
129132
string admin_address_path = 6;
130133

api/src/main/proto/envoy/config/accesslog/v3/accesslog.proto

+24-21
Original file line numberDiff line numberDiff line change
@@ -152,35 +152,38 @@ message TraceableFilter {
152152
"envoy.config.filter.accesslog.v2.TraceableFilter";
153153
}
154154

155-
// Filters for random sampling of requests.
155+
// Filters requests based on runtime-configurable sampling rates.
156156
message RuntimeFilter {
157157
option (udpa.annotations.versioning).previous_message_type =
158158
"envoy.config.filter.accesslog.v2.RuntimeFilter";
159159

160-
// Runtime key to get an optional overridden numerator for use in the
161-
// ``percent_sampled`` field. If found in runtime, this value will replace the
162-
// default numerator.
160+
// Specifies a key used to look up a custom sampling rate from the runtime configuration. If a value is found for this
161+
// key, it will override the default sampling rate specified in ``percent_sampled``.
163162
string runtime_key = 1 [(validate.rules).string = {min_len: 1}];
164163

165-
// The default sampling percentage. If not specified, defaults to 0% with
166-
// denominator of 100.
164+
// Defines the default sampling percentage when no runtime override is present. If not specified, the default is
165+
// **0%** (with a denominator of 100).
167166
type.v3.FractionalPercent percent_sampled = 2;
168167

169-
// By default, sampling pivots on the header
170-
// :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` being
171-
// present. If :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`
172-
// is present, the filter will consistently sample across multiple hosts based
173-
// on the runtime key value and the value extracted from
174-
// :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`. If it is
175-
// missing, or ``use_independent_randomness`` is set to true, the filter will
176-
// randomly sample based on the runtime key value alone.
177-
// ``use_independent_randomness`` can be used for logging kill switches within
178-
// complex nested :ref:`AndFilter
179-
// <envoy_v3_api_msg_config.accesslog.v3.AndFilter>` and :ref:`OrFilter
180-
// <envoy_v3_api_msg_config.accesslog.v3.OrFilter>` blocks that are easier to
181-
// reason about from a probability perspective (i.e., setting to true will
182-
// cause the filter to behave like an independent random variable when
183-
// composed within logical operator filters).
168+
// Controls how sampling decisions are made.
169+
//
170+
// - Default behavior (``false``):
171+
//
172+
// * Uses the :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` as a consistent sampling pivot.
173+
// * When :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is present, sampling will be consistent
174+
// across multiple hosts based on both the ``runtime_key`` and
175+
// :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`.
176+
// * Useful for tracking related requests across a distributed system.
177+
//
178+
// - When set to ``true`` or :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is missing:
179+
//
180+
// * Sampling decisions are made randomly based only on the ``runtime_key``.
181+
// * Useful in complex filter configurations (like nested
182+
// :ref:`AndFilter<envoy_v3_api_msg_config.accesslog.v3.AndFilter>`/
183+
// :ref:`OrFilter<envoy_v3_api_msg_config.accesslog.v3.OrFilter>` blocks) where independent probability
184+
// calculations are desired.
185+
// * Can be used to implement logging kill switches with predictable probability distributions.
186+
//
184187
bool use_independent_randomness = 3;
185188
}
186189

api/src/main/proto/envoy/config/cluster/redis/redis_cluster.proto

+8-8
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ option (udpa.annotations.file_status).package_version_status = FROZEN;
4343
// address: foo.bar.com
4444
// port_value: 22120
4545
// cluster_type:
46-
// name: envoy.clusters.redis
47-
// typed_config:
48-
// "@type": type.googleapis.com/google.protobuf.Struct
49-
// value:
50-
// cluster_refresh_rate: 30s
51-
// cluster_refresh_timeout: 0.5s
52-
// redirect_refresh_interval: 10s
53-
// redirect_refresh_threshold: 10
46+
// name: envoy.clusters.redis
47+
// typed_config:
48+
// "@type": type.googleapis.com/google.protobuf.Struct
49+
// value:
50+
// cluster_refresh_rate: 30s
51+
// cluster_refresh_timeout: 0.5s
52+
// redirect_refresh_interval: 10s
53+
// redirect_refresh_threshold: 10
5454
// [#extension: envoy.clusters.redis]
5555

5656
// [#next-free-field: 7]

0 commit comments

Comments
 (0)