Add a /api/v3/enrollments/ API with reduced footprint#3303
Add a /api/v3/enrollments/ API with reduced footprint#3303rhysyngsun wants to merge 2 commits intomainfrom
Conversation
OpenAPI ChangesShow/hide ## Changes for v0.yaml:Unexpected changes? Ensure your branch is up-to-date with |
0f11676 to
0c360ba
Compare
0c360ba to
6c78b83
Compare
6c78b83 to
626ea91
Compare
626ea91 to
141a583
Compare
291e7fe to
b095a90
Compare
gumaerc
left a comment
There was a problem hiding this comment.
@annagav I generated the API client library against this branch and loaded it into my instance of Learn. After switching everything over to use the V3 enrollments endpoint, I noticed no differences versus V2. I'm sure there are performance improvements, but but it wasn't super noticeable as I recently wiped my workstation and don't have a ton of test data. I'd say the best way to test this is to get it out into the wild, then put up another PR to switch Learn over to it and we can test in RC / production against larger data sets. Either way, all the data we need to get in Learn is included here so we don't need to add anything else at the moment.
What are the relevant tickets?
Closes https://github.com/mitodl/hq/issues/9559
Description (What does it do?)
This adds a
/api/v3/enrollments/API that is read-only for now and returns a very limited amount of information for now to keep it performant.It also reworks the fixtures to make them easier to configure and to give guarantees of how many enrollments a user will get (previously it could be as few as 1 which made it harder to detect N+1 errors).
How can this be tested?
Tests should pass, you should be able to access the API
/api/v3/enrollmentsand it return similar data to `/api/v2/enrollments, but with some problematic fields removed and much more performant.