Skip to content
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

feat(agents-api): Add in-memory rate limiter to transition activity #936

Merged
merged 2 commits into from
Dec 7, 2024

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented Dec 7, 2024

Signed-off-by: Diwank Singh Tomer [email protected]


Important

Add in-memory rate limiter to transition_step with configurable rate limit and update encoding error handling in codec.py.

  • Behavior:
    • Add in-memory rate limiter to transition_step in transition_step.py using RateLimiter from utils.py.
    • Raise TooManyRequestsError if rate limit exceeded.
  • Configuration:
    • Add transition_requests_per_minute to env.py for rate limit configuration.
  • Utils:
    • Implement RateLimiter class in utils.py with acquire() method for rate limiting.
  • Codec:
    • Modify to_payload() in codec.py to return FailedEncodingSentinel on encoding failure.
  • Tests:
    • Update imports in test_execution_workflow.py for consistency.

This description was created by Ellipsis for f728532. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to f728532 in 1 minute and 44 seconds

More details
  • Looked at 146 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. agents-api/agents_api/worker/codec.py:135
  • Draft comment:
    Ensure that the caller properly handles the FailedEncodingSentinel returned by the to_payload method to avoid issues in production.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_64qyROVfHSjW6uBQ


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@creatorrr creatorrr merged commit 8d130fe into dev Dec 7, 2024
15 of 18 checks passed
@creatorrr creatorrr deleted the f/rate-limit-transition branch December 7, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant