github-education-resources / classroom

GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.
https://classroom.github.com
1.34k stars 564 forks source link

Add support for bulk API-calling jobs #2184

Open EricPickup opened 5 years ago

EricPickup commented 5 years ago

The after-life project will introduce a lot of bulk changing features (publicize all repos in a classroom, transfer ownership, archive, etc.). We also already have the RepositoryVisibilityJob (https://github.com/education/classroom/blob/master/app/jobs/assignment/repository_visibility_job.rb) that changes the visibility of all repos in an assignment when we switch the assignment between public/private.

We need to be able to support the largest orgs in Classroom. Imagine a course that has 1k students per assignment. If we want to change the repo visibility for all repos in the classroom, that's 1k ~2 calls to change visibility x assignments = potentially thousands of API calls. The current rate limit for authenticated API calls is 5000 per hour.

jeffrafter commented 5 years ago

This was originally implemented in #2187 and we are investigating a leaky-bucket approach to handling rate limiting moving forward. We're also interested in collecting stories from educators who have been or are being impacted by rate limits.