Skip to content

Release 0.140.0#3365

Closed
odlbot wants to merge 4 commits intoreleasefrom
release-candidate
Closed

Release 0.140.0#3365
odlbot wants to merge 4 commits intoreleasefrom
release-candidate

Conversation

@odlbot
Copy link
Contributor

@odlbot odlbot commented Mar 9, 2026

Nathan Levesque

James Kachel

annagav

@github-actions
Copy link

github-actions bot commented Mar 9, 2026

OpenAPI Changes

Show/hide ## Changes for v0.yaml:
## Changes for v0.yaml:
10 changes: 0 error, 0 warning, 10 info
info	[api-schema-removed] 	
	in components/schemas
		removed the schema 'BaseProductRequest'

info	[response-property-all-of-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/course_certificates/{cert_uuid}/
		removed '#/components/schemas/BaseProduct' from the 'course_run/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/courses/
		removed '#/components/schemas/BaseProduct' from the 'results/items/courseruns/items/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/courses/{id}/
		removed '#/components/schemas/BaseProduct' from the 'courseruns/items/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/enrollments/
		removed '#/components/schemas/BaseProduct' from the '/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v0.yaml	
	in API POST /api/v2/enrollments/
		removed '#/components/schemas/BaseProduct' from the 'run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '201'

info	[response-property-all-of-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/program_enrollments/
		removed '#/components/schemas/BaseProduct' from the '/items/enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v0.yaml	
	in API DELETE /api/v2/program_enrollments/{id}/
		removed '#/components/schemas/BaseProduct' from the '/items/enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/program_enrollments/{id}/
		removed '#/components/schemas/BaseProduct' from the 'enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v0.yaml	
	in API POST /api/v2/verified_program_enrollments/{program_id}/{courserun_id}/
		removed '#/components/schemas/BaseProduct' from the 'run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '201'



## Changes for v1.yaml:
10 changes: 0 error, 0 warning, 10 info
info	[api-schema-removed] 	
	in components/schemas
		removed the schema 'BaseProductRequest'

info	[response-property-all-of-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/course_certificates/{cert_uuid}/
		removed '#/components/schemas/BaseProduct' from the 'course_run/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/courses/
		removed '#/components/schemas/BaseProduct' from the 'results/items/courseruns/items/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/courses/{id}/
		removed '#/components/schemas/BaseProduct' from the 'courseruns/items/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/enrollments/
		removed '#/components/schemas/BaseProduct' from the '/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v1.yaml	
	in API POST /api/v2/enrollments/
		removed '#/components/schemas/BaseProduct' from the 'run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '201'

info	[response-property-all-of-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/program_enrollments/
		removed '#/components/schemas/BaseProduct' from the '/items/enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v1.yaml	
	in API DELETE /api/v2/program_enrollments/{id}/
		removed '#/components/schemas/BaseProduct' from the '/items/enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/program_enrollments/{id}/
		removed '#/components/schemas/BaseProduct' from the 'enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v1.yaml	
	in API POST /api/v2/verified_program_enrollments/{program_id}/{courserun_id}/
		removed '#/components/schemas/BaseProduct' from the 'run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '201'



## Changes for v2.yaml:
10 changes: 0 error, 0 warning, 10 info
info	[api-schema-removed] 	
	in components/schemas
		removed the schema 'BaseProductRequest'

info	[response-property-all-of-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/course_certificates/{cert_uuid}/
		removed '#/components/schemas/BaseProduct' from the 'course_run/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/courses/
		removed '#/components/schemas/BaseProduct' from the 'results/items/courseruns/items/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/courses/{id}/
		removed '#/components/schemas/BaseProduct' from the 'courseruns/items/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/enrollments/
		removed '#/components/schemas/BaseProduct' from the '/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v2.yaml	
	in API POST /api/v2/enrollments/
		removed '#/components/schemas/BaseProduct' from the 'run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '201'

info	[response-property-all-of-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/program_enrollments/
		removed '#/components/schemas/BaseProduct' from the '/items/enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v2.yaml	
	in API DELETE /api/v2/program_enrollments/{id}/
		removed '#/components/schemas/BaseProduct' from the '/items/enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/program_enrollments/{id}/
		removed '#/components/schemas/BaseProduct' from the 'enrollments/items/run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '200'

info	[response-property-all-of-removed] at head/openapi/specs/v2.yaml	
	in API POST /api/v2/verified_program_enrollments/{program_id}/{courserun_id}/
		removed '#/components/schemas/BaseProduct' from the 'run/allOf[#/components/schemas/V2CourseRunWithCourse]/products/items/' response property 'allOf' list for the response status '201'



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

Comment on lines +1633 to +1637
transaction.on_commit(
partial(
push_edx_modes_from_run, course_run=target_course, edx_client=edx_client
)
)
Copy link

Choose a reason for hiding this comment

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

Bug: The process_course_run_clone function incorrectly passes a Studio API client to push_edx_modes_from_run, which requires an LMS client to create course modes, causing enrollment setup to fail.
Severity: CRITICAL

Suggested Fix

The call to push_edx_modes_from_run should not be passed the Studio-based edx_client. Either pass edx_client=None to allow the function to default to the correct LMS service client, or explicitly pass a client created with get_edx_api_service_client().

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: openedx/api.py#L1633-L1637

Potential issue: In `openedx/api.py`, the `process_course_run_clone` function creates an
`edx_client` configured to use the Studio API (`use_studio=True`). This client is then
passed to `push_edx_modes_from_run` within a `transaction.on_commit` hook. The
`push_edx_modes_from_run` function uses this client to call `create_edx_course_mode`,
which is an LMS API endpoint, not a Studio one. This mismatch will cause the API call to
fail, likely with a 404 error. As a result, newly cloned course runs will be created
without the proper enrollment modes, breaking enrollment functionality for those
courses.

Did we get this right? 👍 / 👎 to inform future reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants