Skip to content

🔨 Fix FastAPI People workflow#14951

Merged
tiangolo merged 4 commits intomasterfrom
fix-people-workflow
Feb 23, 2026
Merged

🔨 Fix FastAPI People workflow#14951
tiangolo merged 4 commits intomasterfrom
fix-people-workflow

Conversation

@YuriiMotov
Copy link
Member

Currently FastAPI People workflow fails due to hitting GitHub API rate limits.

After some experiments and googling I found out that the reason of hitting rate limits is in requests per query.
Since September rate limit rules became more complex and it's not recommended to make heavy queries (that return thousands of records).

To avoid hitting rate limits I:

  • reduced the number of records fetched by query (30 discussions instead of 100)
  • added a rate limiter that respects different types of limits:
    • pauses if the number of remaining points is less than needed for request
    • respects safe time intervals between requests (interval time is calculated from the limitation of 5000 points per hour and the number of points used by each request)

This way script will take more time to fetch data, but we will likely avoid hitting rate limits


If we need it, we can experiment with the speed by setting speed_multiplier ENV variable (defaults to 1, that is the spread with which we will spend 84 points per minute (5000 points per hour divided by 60 minutes)).


github_graphql_url = "https://api.github.com/graphql"
questions_category_id = "MDE4OkRpc2N1c3Npb25DYXRlZ29yeTMyMDAxNDM0"
questions_category_id = "DIC_kwDOCZduT84B6E2a"
Copy link
Member Author

Choose a reason for hiding this comment

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

Old value is "global id" and it's deprecated (produced deprecation warning with the recommendation to use this new ID)

@YuriiMotov YuriiMotov changed the title 🔨 Fix people workflow 🔨 Fix FastAPI People workflow Feb 20, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 20, 2026

Merging this PR will not alter performance

✅ 20 untouched benchmarks


Comparing fix-people-workflow (28d13e9) with master (2826124)

Open in CodSpeed

Copy link
Member

@tiangolo tiangolo left a comment

Choose a reason for hiding this comment

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

Awesome, thank you! 🙌 🚀

@tiangolo tiangolo merged commit a3c8c37 into master Feb 23, 2026
29 checks passed
@tiangolo tiangolo deleted the fix-people-workflow branch February 23, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants