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

add max size #489

Merged
merged 2 commits into from
Dec 6, 2024
Merged

add max size #489

merged 2 commits into from
Dec 6, 2024

Conversation

michaelfeil
Copy link
Owner

Related Issue

Checklist

  • I have read the CONTRIBUTING guidelines.
  • I have added tests to cover my changes.
  • I have updated the documentation (docs folder) accordingly.

Additional Notes

Add any other context about the PR here.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR introduces dynamic batch size limits for API requests by replacing hard-coded values with configurable settings from the environment manager.

  • Added validation in env.py to ensure max_client_batch_size is positive with default 2048
  • Modified pydantic_v2.py to use MANAGER.max_client_batch_size for ITEMS_LIMIT max length
  • Set ITEMS_LIMIT_SMALL max length to min(32, max_client_batch_size) for smaller batches
  • Increased INPUT_STRING max length to 8192*15 characters to handle larger text inputs
  • Added assertion in env.py to validate queue_size is positive

2 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.58%. Comparing base (1b98bf9) to head (bbf9a85).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #489      +/-   ##
==========================================
+ Coverage   73.52%   73.58%   +0.06%     
==========================================
  Files          41       41              
  Lines        3422     3430       +8     
==========================================
+ Hits         2516     2524       +8     
  Misses        906      906              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michaelfeil michaelfeil enabled auto-merge (squash) December 6, 2024 01:44
@michaelfeil michaelfeil disabled auto-merge December 6, 2024 01:45
@michaelfeil michaelfeil merged commit be48378 into main Dec 6, 2024
19 of 36 checks passed
@michaelfeil michaelfeil deleted the mf-max-size-request branch December 6, 2024 01:45
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.

2 participants