FIRST-Tech-Challenge / FIRST-Tech-Challenge/scorekeeper

API rate limiting applied before qualification matches begin

Open
#623 0 comments 1 reaction 0 assignees View on GitHub
bug Local
Dominant language
No language data
Stars
110
Forks
26
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
API rate limiting takes effect after a test match is played, but before the actual matches are played.

**To Reproduce**
- Load and run a test match, save and commit score so no longer loaded or active
- Send more than 30 API requests in 5 minutes
- Observe a 429 error returned from API

**Expected behavior**
Per the API documentation:
>Before the system has loaded any match for play, the rate limit is more generous and allows for 1200 requests per 5 minute period, per event....Once a match has been loaded for play, the rate drops to 30 requests per 5 minute period per event.

This is completely reasonable, but the problem I am having is that loading and playing a test match seems to change the server over to enforcing rate limiting even if there are no matches being played. The problem is it is typical to run though a test match right after setting up the system to make sure everything is working, but now the rate limiting is enforced and loading data out of the score system into a third party app (e.g. getting team details for all the teams in the event) will quickly hit the API rate limits.

I would like to see the rate limiting either not reduced until the first **qualification** match is loaded for play, or returned to 1200 any time there are no matches active or loaded.

**Screenshots**
N/A

**Device (please complete the following information):**
- 4.2.6 and older

**Additional context**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.