-
Notifications
You must be signed in to change notification settings - Fork 4.6k
[Python] Drop envoy-data-plane/betterproto dependency from the Python SDK #39213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
damccorm
merged 1 commit into
apache:master
from
shahar1:drop-envoy-data-plane-dependency
Jul 7, 2026
+198
−62
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| // Licensed to the Apache Software Foundation (ASF) under one or more | ||
| // contributor license agreements. See the NOTICE file distributed with | ||
| // this work for additional information regarding copyright ownership. | ||
| // The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| // (the "License"); you may not use this file except in compliance with | ||
| // the License. You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| // Minimal, self-contained subset of the Envoy Rate Limit Service protocol, | ||
| // used by EnvoyRateLimiter in rate_limiter.py. Only the fields the client | ||
| // touches are declared. Field numbers MUST match Envoy's rls.proto and | ||
| // ratelimit.proto so this is wire-compatible with a real Envoy RLS server | ||
| // (protobuf carries only field numbers and types on the wire, not message or | ||
| // package names). This lets Beam use its standard protobuf/grpcio stack | ||
| // instead of pulling in envoy-data-plane and its betterproto dependency. | ||
| // | ||
| // Regenerate rate_limit_pb2.py after editing this file: | ||
| // cd sdks/python | ||
| // python -m grpc_tools.protoc -I. --python_out=. \ | ||
| // apache_beam/io/components/rate_limit.proto | ||
| // then prepend the Apache license header and remove the generated | ||
| // `runtime_version` guard so the module stays compatible with the full | ||
| // protobuf runtime range Beam supports (see setup.py). | ||
|
|
||
| syntax = "proto3"; | ||
|
|
||
| package apache_beam.io.components.ratelimit; | ||
|
|
||
| import "google/protobuf/duration.proto"; | ||
|
|
||
| message RateLimitDescriptor { | ||
| message Entry { | ||
| string key = 1; | ||
| string value = 2; | ||
| } | ||
| repeated Entry entries = 1; | ||
| } | ||
|
|
||
| message RateLimitRequest { | ||
| string domain = 1; | ||
| repeated RateLimitDescriptor descriptors = 2; | ||
| uint32 hits_addend = 3; | ||
| } | ||
|
|
||
| message RateLimitResponse { | ||
| enum Code { | ||
| UNKNOWN = 0; | ||
| OK = 1; | ||
| OVER_LIMIT = 2; | ||
| } | ||
| message DescriptorStatus { | ||
| Code code = 1; | ||
| google.protobuf.Duration duration_until_reset = 4; | ||
| } | ||
| Code overall_code = 1; | ||
| repeated DescriptorStatus statuses = 2; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
| # -*- coding: utf-8 -*- | ||
| # Generated by the protocol buffer compiler. DO NOT EDIT! | ||
| # NO CHECKED-IN PROTOBUF GENCODE | ||
| # source: apache_beam/io/components/rate_limit.proto | ||
| # | ||
| # Regenerate with (from sdks/python): | ||
| # python -m grpc_tools.protoc -I. --python_out=. \ | ||
| # apache_beam/io/components/rate_limit.proto | ||
| # then re-apply this license header and delete the generated | ||
| # `runtime_version` guard so the module works across the full protobuf | ||
| # runtime range Beam supports (see setup.py). | ||
|
|
||
| """Generated protocol buffer code.""" | ||
| from google.protobuf import descriptor as _descriptor | ||
| from google.protobuf import descriptor_pool as _descriptor_pool | ||
| from google.protobuf import symbol_database as _symbol_database | ||
| from google.protobuf.internal import builder as _builder | ||
| # @@protoc_insertion_point(imports) | ||
|
|
||
| _sym_db = _symbol_database.Default() | ||
|
|
||
| from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 | ||
|
|
||
| DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( | ||
| b'\n*apache_beam/io/components/rate_limit.proto\x12#apache_beam.io.components.ratelimit\x1a\x1egoogle/protobuf/duration.proto\"\x8b\x01\n\x13RateLimitDescriptor\x12O\n\x07\x65ntries\x18\x01 \x03(\x0b\x32>.apache_beam.io.components.ratelimit.RateLimitDescriptor.Entry\x1a#\n\x05\x45ntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\x86\x01\n\x10RateLimitRequest\x12\x0e\n\x06\x64omain\x18\x01 \x01(\t\x12M\n\x0b\x64\x65scriptors\x18\x02 \x03(\x0b\x32\x38.apache_beam.io.components.ratelimit.RateLimitDescriptor\x12\x13\n\x0bhits_addend\x18\x03 \x01(\r\"\x87\x03\n\x11RateLimitResponse\x12Q\n\x0coverall_code\x18\x01 \x01(\x0e\x32;.apache_beam.io.components.ratelimit.RateLimitResponse.Code\x12Y\n\x08statuses\x18\x02 \x03(\x0b\x32G.apache_beam.io.components.ratelimit.RateLimitResponse.DescriptorStatus\x1a\x96\x01\n\x10\x44\x65scriptorStatus\x12I\n\x04\x63ode\x18\x01 \x01(\x0e\x32;.apache_beam.io.components.ratelimit.RateLimitResponse.Code\x12\x37\n\x14\x64uration_until_reset\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\"+\n\x04\x43ode\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x0e\n\nOVER_LIMIT\x10\x02\x62\x06proto3' | ||
| ) | ||
|
|
||
| _globals = globals() | ||
| _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) | ||
| _builder.BuildTopDescriptorsAndMessages( | ||
| DESCRIPTOR, 'apache_beam.io.components.rate_limit_pb2', _globals) | ||
| if not _descriptor._USE_C_DESCRIPTORS: | ||
| DESCRIPTOR._loaded_options = None | ||
| _globals['_RATELIMITDESCRIPTOR']._serialized_start = 116 | ||
| _globals['_RATELIMITDESCRIPTOR']._serialized_end = 255 | ||
| _globals['_RATELIMITDESCRIPTOR_ENTRY']._serialized_start = 220 | ||
| _globals['_RATELIMITDESCRIPTOR_ENTRY']._serialized_end = 255 | ||
| _globals['_RATELIMITREQUEST']._serialized_start = 258 | ||
| _globals['_RATELIMITREQUEST']._serialized_end = 392 | ||
| _globals['_RATELIMITRESPONSE']._serialized_start = 395 | ||
| _globals['_RATELIMITRESPONSE']._serialized_end = 786 | ||
| _globals['_RATELIMITRESPONSE_DESCRIPTORSTATUS']._serialized_start = 591 | ||
| _globals['_RATELIMITRESPONSE_DESCRIPTORSTATUS']._serialized_end = 741 | ||
| _globals['_RATELIMITRESPONSE_CODE']._serialized_start = 743 | ||
| _globals['_RATELIMITRESPONSE_CODE']._serialized_end = 786 | ||
| # @@protoc_insertion_point(module_scope) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.