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

Dont stress opso service #119

Merged
merged 4 commits into from
Feb 14, 2023
Merged

Conversation

BillWagner
Copy link
Member

In order to recognize community contributors, our tools often use the OSPO REST service to attempt to match a GitHub login to an MS email or alias. This service isn't designed for broad use, and we would get rate limited by repeated API calls.

The What's New tool caused the most problems. Happily, we have many community members that contribute to our docs. The tool would call the REST service for each PR.

In this PR, those tools that will make multiple REST calls now make a single call to retrieve the entire list of MS employees with registered GitHub aliases. That list is only stored in memory while the app runs. Then, each call to determine if a GitHub alias matches an employee uses that in memory cache.

Other tools (seQuester) still make the call for a single ID. Those tools operate on a single issue, and that packet is smaller.

Update constructor to add a flag to get all entries in one call, and use all those dictionary entries instead of making a query for each new login.
When we are rate limited, retrying more often just extends the time out period.

Instead, wait longer, and retry fewer times.
Copy link

@CamSoper CamSoper left a comment

Choose a reason for hiding this comment

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

LGTM

@BillWagner BillWagner merged commit 7e0d654 into dotnet:main Feb 14, 2023
@BillWagner BillWagner deleted the dont-stress-opso-service branch February 14, 2023 17:07
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.

3 participants