Skip to content

Add a test for number of queries in courses api#3361

Open
annagav wants to merge 5 commits intomainfrom
ag/optimise_prefetch
Open

Add a test for number of queries in courses api#3361
annagav wants to merge 5 commits intomainfrom
ag/optimise_prefetch

Conversation

@annagav
Copy link
Contributor

@annagav annagav commented Mar 7, 2026

What are the relevant tickets?

Related to https://github.com/mitodl/hq/issues/10189

Description (What does it do?)

Testing prefetch for course runs and products

How can this be tested?

@github-actions
Copy link

github-actions bot commented Mar 7, 2026

OpenAPI Changes

Show/hide ## Changes for v0.yaml:
## Changes for v0.yaml:
22 changes: 0 error, 21 warning, 1 info
warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/course_certificates/{cert_uuid}/
		removed the optional property 'course_run/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/courses/
		removed the optional property 'results/items/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/courses/{id}/
		removed the optional property 'programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/enrollments/
		removed the optional property '/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API POST /api/v2/enrollments/
		removed the optional property 'run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '201' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/pages/?fields=*&type=cms.coursepage
		removed the optional property 'items/items/course_details/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/pages/?fields=*&type=cms.programpage
		removed the optional property 'items/items/program_details/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/pages/{id}/
		removed the optional property '/oneOf[#/components/schemas/CoursePageItem]/course_details/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/pages/{id}/
		removed the optional property '/oneOf[#/components/schemas/ProgramPageItem]/program_details/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/program_certificates/{cert_uuid}/
		removed the optional property 'program/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/program_enrollments/
		removed the optional property '/items/enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/program_enrollments/
		removed the optional property '/items/program/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API DELETE /api/v2/program_enrollments/{id}/
		removed the optional property '/items/enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API DELETE /api/v2/program_enrollments/{id}/
		removed the optional property '/items/program/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/program_enrollments/{id}/
		removed the optional property 'enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/program_enrollments/{id}/
		removed the optional property 'program/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/programs/
		removed the optional property 'results/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/programs/{id}/
		removed the optional property 'display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API POST /api/v2/verified_program_enrollments/{program_id}/{courserun_id}/
		removed the optional property 'run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '201' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v3/program_enrollments/
		removed the optional property '/items/program/allOf[#/components/schemas/V3SimpleProgram]/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v3/program_enrollments/{program_id}/
		removed the optional property 'program/allOf[#/components/schemas/V3SimpleProgram]/display_mode' from the response with the '200' status

info	[api-schema-removed] 	
	in components/schemas
		removed the schema 'DisplayModeEnum'



## Changes for v1.yaml:
22 changes: 0 error, 21 warning, 1 info
warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/course_certificates/{cert_uuid}/
		removed the optional property 'course_run/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/courses/
		removed the optional property 'results/items/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/courses/{id}/
		removed the optional property 'programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/enrollments/
		removed the optional property '/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API POST /api/v2/enrollments/
		removed the optional property 'run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '201' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/pages/?fields=*&type=cms.coursepage
		removed the optional property 'items/items/course_details/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/pages/?fields=*&type=cms.programpage
		removed the optional property 'items/items/program_details/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/pages/{id}/
		removed the optional property '/oneOf[#/components/schemas/CoursePageItem]/course_details/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/pages/{id}/
		removed the optional property '/oneOf[#/components/schemas/ProgramPageItem]/program_details/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/program_certificates/{cert_uuid}/
		removed the optional property 'program/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/program_enrollments/
		removed the optional property '/items/enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/program_enrollments/
		removed the optional property '/items/program/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API DELETE /api/v2/program_enrollments/{id}/
		removed the optional property '/items/enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API DELETE /api/v2/program_enrollments/{id}/
		removed the optional property '/items/program/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/program_enrollments/{id}/
		removed the optional property 'enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/program_enrollments/{id}/
		removed the optional property 'program/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/programs/
		removed the optional property 'results/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/programs/{id}/
		removed the optional property 'display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API POST /api/v2/verified_program_enrollments/{program_id}/{courserun_id}/
		removed the optional property 'run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '201' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v3/program_enrollments/
		removed the optional property '/items/program/allOf[#/components/schemas/V3SimpleProgram]/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v3/program_enrollments/{program_id}/
		removed the optional property 'program/allOf[#/components/schemas/V3SimpleProgram]/display_mode' from the response with the '200' status

info	[api-schema-removed] 	
	in components/schemas
		removed the schema 'DisplayModeEnum'



## Changes for v2.yaml:
22 changes: 0 error, 21 warning, 1 info
warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/course_certificates/{cert_uuid}/
		removed the optional property 'course_run/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/courses/
		removed the optional property 'results/items/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/courses/{id}/
		removed the optional property 'programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/enrollments/
		removed the optional property '/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API POST /api/v2/enrollments/
		removed the optional property 'run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '201' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/pages/?fields=*&type=cms.coursepage
		removed the optional property 'items/items/course_details/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/pages/?fields=*&type=cms.programpage
		removed the optional property 'items/items/program_details/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/pages/{id}/
		removed the optional property '/oneOf[#/components/schemas/CoursePageItem]/course_details/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/pages/{id}/
		removed the optional property '/oneOf[#/components/schemas/ProgramPageItem]/program_details/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/program_certificates/{cert_uuid}/
		removed the optional property 'program/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/program_enrollments/
		removed the optional property '/items/enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/program_enrollments/
		removed the optional property '/items/program/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API DELETE /api/v2/program_enrollments/{id}/
		removed the optional property '/items/enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API DELETE /api/v2/program_enrollments/{id}/
		removed the optional property '/items/program/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/program_enrollments/{id}/
		removed the optional property 'enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/program_enrollments/{id}/
		removed the optional property 'program/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/programs/
		removed the optional property 'results/items/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/programs/{id}/
		removed the optional property 'display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API POST /api/v2/verified_program_enrollments/{program_id}/{courserun_id}/
		removed the optional property 'run/allOf[#/components/schemas/V2CourseRunWithCourse]/course/allOf[#/components/schemas/V2Course]/programs/items/display_mode' from the response with the '201' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v3/program_enrollments/
		removed the optional property '/items/program/allOf[#/components/schemas/V3SimpleProgram]/display_mode' from the response with the '200' status

warning	[response-optional-property-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v3/program_enrollments/{program_id}/
		removed the optional property 'program/allOf[#/components/schemas/V3SimpleProgram]/display_mode' from the response with the '200' status

info	[api-schema-removed] 	
	in components/schemas
		removed the schema 'DisplayModeEnum'



Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

@annagav annagav force-pushed the ag/optimise_prefetch branch from 4bc4512 to b0c01b8 Compare March 11, 2026 01:49
@annagav annagav marked this pull request as ready for review March 11, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant