-
Notifications
You must be signed in to change notification settings - Fork 837
[Beta]: Budgets and rate limits alongwith UI and everything #1375
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: main
Are you sure you want to change the base?
Conversation
narengogi
commented
Oct 10, 2025
DescriptionMotivationType of Change
How Has This Been Tested?
Screenshots (if applicable)N/A Checklist
Related IssuesN/A Summary By MatterAI
🔄 What ChangedThis pull request introduces a new admin API endpoint and corresponding UI functionality to reset integration rate limits. In 🔍 Impact of the ChangeThese changes empower administrators to directly manage and reset rate limits for specific integrations via the local admin UI, enhancing control over resource consumption. The JSON editor streamlines local configuration management for integrations, including budgets and rate limits. The 📁 Total Files Changed
🧪 Test AddedManual testing is implied for the new admin UI to verify the functionality of the JSON editor, saving integrations, and resetting rate limits. No explicit unit or integration tests were provided for the new backend endpoint or UI logic. 🔒Security VulnerabilitiesThe admin UI in Caution Package Vulnerabilities
Tip Quality Recommendations
Tanka Poem ♫
Sequence DiagramsequenceDiagram
participant AdminUI as Admin UI (index.html)
participant AdminAPI as Admin API (adminRoutesHandler.ts)
participant Cache as Cache Service
AdminUI->>AdminAPI: PUT /admin/integrations/ratelimit/:integrationId/reset (adminApiKey)
Note over AdminAPI: resetIntegrationRateLimitHandler(c)
AdminAPI->>AdminAPI: Get integrationId from c.req.param('integrationId')
AdminAPI->>AdminAPI: Get settings, organisationId, workspaceId
AdminAPI->>AdminAPI: Find rate_limits for integrationId
opt If rate_limits exist
loop For each rateLimit in rate_limits
AdminAPI->>AdminAPI: Generate rateLimitKey(organisationId, rateLimit.type, RateLimiterKeyTypes.INTEGRATION_WORKSPACE, workspaceKey, rateLimit.unit)
AdminAPI->>AdminAPI: Construct finalKey (e.g., {rate:key}:type)
AdminAPI->>Cache: delete(finalKey)
Cache-->>AdminAPI: Deletion confirmation
end
end
AdminAPI-->>AdminUI: 200 OK / Error Response
AdminUI-->>AdminUI: Display success/error alert
|
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.
Potential security and performance issues identified in the new code additions.
Skipped files
conf.example.json: Skipped file patternconf_sample.json: File hunk diff too largepackage-lock.json: Skipped file pattern
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.
Reviewing the new budget and rate limit implementation for potential issues.