Repository navigation
Asynchronous student import for Google Classroom integration - #1133
Open
zetter-rpf wants to merge 5 commits into
Open
zetter-rpf wants to merge 5 commits into
zetter-rpf wants to merge 5 commits into
Conversation
Extract existing code to the rspec config. The ensure isn't needed as exceptions from specs are rescued (it would only help if we expect errors in the `around` itself)
Test coverage94.19% line coverage reported by SimpleCov. |
raspberrypiherokubot
temporarily deployed
to
editor-api-p-async-impo-iftdzd
November 24, 2026 13:57
Inactive
This is lower level behaviour needed for importing students
zetter-rpf
force-pushed
the
async-import-3
branch
from
November 24, 2026 14:01
7ce95f4 to
e71a318
Compare
zetter-rpf
marked this pull request as ready for review
November 24, 2026 14:14
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — The opt-in import batches student creation and exposes progress while preserving synchronous imports. Confirm that concurrent provisioning on the shared default queue is acceptable for Profile API capacity and other queued work; existing student-creation queue configuration explicitly preserves serial execution. Needs human approval because:
You can add or adjust custom eligibility rules. Learn more. |
Currently profile can take more than 15s to create students. I don't like using the users token in an async job- as well as creating a copy of it, it might expire before the job runs, but there's not really an alternative at the moment.
I want to avoid overloading profile. It might be possible to up this concurrency in the future as the code in editor shouldn't prevent it running in parallel.
Since this might take a minute or longer, I wanted to see if we could report progress to the frontend so people can see that it's in progress and not got stuck.
zetter-rpf
force-pushed
the
async-import-3
branch
from
November 24, 2026 14:47
e71a318 to
20495c7
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status
Points for consideration:
SchoolImportJob.What's changed?
We currently create student accounts (in profile) and student roles and class memberships (in editor-api) for the Google Classroom integration.
The profile API accepts up to 200 students, however we've found that it can timeout and cause errors in profile for ~100 students.
This keeps the class creation synchronous, but moves the student creation to a batched async method.
I've added progress reporting to the batch job so that we might be able to show progress on the frontend.
Steps to perform after deploying to production
Switch the frontend to use the new async option.