-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add Support for EnvoyRateLimiter Implementation #37573
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
base: master
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @tarun-google, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances Apache Beam's I/O components by integrating support for the Envoy Rate Limit Service. This allows Beam pipelines to enforce external rate limits on operations that interact with external services, preventing overload and ensuring stable system behavior. The changes introduce a new Envoy-specific rate limiter implementation, along with supporting infrastructure for configuration, client management, and an illustrative example, making it easier for users to apply sophisticated rate limiting strategies within their data processing workflows. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
|
Run Java_GCP_IO_Direct PreCommit |
|
Assigning reviewers: R: @ahmedabu98 for label java. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces an implementation of a RateLimiter using Envoy's Rate Limit Service (RLS). The changes include the core EnvoyRateLimiterFactory, supporting classes for context and options, a client cache for gRPC channels, and an example pipeline demonstrating its usage. The implementation is well-structured and includes good practices like metrics and RPC retries. I have a few suggestions for improvement regarding error handling, retry strategies, and thread interruption handling to make it even more robust.
examples/java/src/main/java/org/apache/beam/examples/RateLimiterSimple.java
Show resolved
Hide resolved
...nts/src/main/java/org/apache/beam/sdk/io/components/ratelimiter/EnvoyRateLimiterFactory.java
Outdated
Show resolved
Hide resolved
...ents/src/main/java/org/apache/beam/sdk/io/components/ratelimiter/RateLimiterClientCache.java
Show resolved
Hide resolved
damccorm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, mostly lgtm - just had a question, along with a few minor Gemini suggestions
...nts/src/main/java/org/apache/beam/sdk/io/components/ratelimiter/EnvoyRateLimiterFactory.java
Show resolved
Hide resolved
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
damccorm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
I'll merge once checks complete |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #37573 +/- ##
=========================================
Coverage 56.98% 56.98%
- Complexity 3404 3414 +10
=========================================
Files 1177 1177
Lines 187180 187203 +23
Branches 3581 3588 +7
=========================================
+ Hits 106657 106682 +25
+ Misses 77133 77132 -1
+ Partials 3390 3389 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Adding Envoy RateLimiter as a implementation of RateLimiter abstraction defined in #37547
https://pantheon.corp.google.com/dataflow/jobs/us-central1/2026-02-11_14_28_06-3806354753980489202
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.