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

Throttle Logs Endpoint from CLI #1734

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Throttle Logs Endpoint from CLI #1734

wants to merge 1 commit into from

Conversation

amandeepsingh333
Copy link
Contributor

problem :
if large number(500) of snapshots are failing or have some issues for the customer then we are causing Rate limiting to get triggered on api/v1/suggestions/from_logs as we fetch suggestions for all snapshots. This triggers alert on our side.

approach:
To tackle this we have CLI in a way that we dont ask for more than 10 suggestions per build. We are basically limiting the maximum suggestions we can suggest per build. The idea is that if all snapshots are getting some suggestions in build they would be probably same.

implementation:
we have stored a counter of suggestionsCalls and will stop the call to end the count is > 10.

]));
});

it('should not call getErrorAnalysis after exceeding the rate limit', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you update this case for checking multiple logs are not getting printed if we cross threshold

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