Skip to content

Release 1.143.5#3434

Closed
odlbot wants to merge 10 commits into
releasefrom
release-candidate
Closed

Release 1.143.5#3434
odlbot wants to merge 10 commits into
releasefrom
release-candidate

Conversation

@odlbot
Copy link
Copy Markdown
Contributor

@odlbot odlbot commented Mar 30, 2026

Muhammad Arslan

annagav

James Kachel

Tobias Macey

cp-at-mit

renovate[bot]

renovate Bot and others added 10 commits March 26, 2026 22:54
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…#3412)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: feoh <330070+feoh@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

OpenAPI Changes

Show/hide ## Changes for v0.yaml:
## Changes for v0.yaml:
13 changes: 0 error, 0 warning, 13 info
info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API GET /api/v1/program_enrollments/
		added the optional property '/items/program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API DELETE /api/v1/program_enrollments/{id}/
		added the optional property 'program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API GET /api/v1/program_enrollments/{id}/
		added the optional property 'program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API GET /api/v1/programs/
		added the optional property 'results/items/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API GET /api/v1/programs/{id}/
		added the optional property 'page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/pages/?fields=*&type=cms.programpage
		added the optional property 'items/items/program_details/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/pages/{id}/
		added the optional property '/oneOf[#/components/schemas/ProgramPageItem]/program_details/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/program_certificates/{cert_uuid}/
		added the optional property 'program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/program_enrollments/
		added the optional property '/items/program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API DELETE /api/v2/program_enrollments/{id}/
		added the optional property '/items/program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/program_enrollments/{id}/
		added the optional property 'program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/programs/
		added the optional property 'results/items/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/programs/{id}/
		added the optional property 'page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status



## Changes for v1.yaml:
13 changes: 0 error, 0 warning, 13 info
info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API GET /api/v1/program_enrollments/
		added the optional property '/items/program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API DELETE /api/v1/program_enrollments/{id}/
		added the optional property 'program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API GET /api/v1/program_enrollments/{id}/
		added the optional property 'program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API GET /api/v1/programs/
		added the optional property 'results/items/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API GET /api/v1/programs/{id}/
		added the optional property 'page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/pages/?fields=*&type=cms.programpage
		added the optional property 'items/items/program_details/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/pages/{id}/
		added the optional property '/oneOf[#/components/schemas/ProgramPageItem]/program_details/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/program_certificates/{cert_uuid}/
		added the optional property 'program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/program_enrollments/
		added the optional property '/items/program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API DELETE /api/v2/program_enrollments/{id}/
		added the optional property '/items/program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/program_enrollments/{id}/
		added the optional property 'program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/programs/
		added the optional property 'results/items/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/programs/{id}/
		added the optional property 'page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status



## Changes for v2.yaml:
13 changes: 0 error, 0 warning, 13 info
info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API GET /api/v1/program_enrollments/
		added the optional property '/items/program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API DELETE /api/v1/program_enrollments/{id}/
		added the optional property 'program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API GET /api/v1/program_enrollments/{id}/
		added the optional property 'program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API GET /api/v1/programs/
		added the optional property 'results/items/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API GET /api/v1/programs/{id}/
		added the optional property 'page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/pages/?fields=*&type=cms.programpage
		added the optional property 'items/items/program_details/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/pages/{id}/
		added the optional property '/oneOf[#/components/schemas/ProgramPageItem]/program_details/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/program_certificates/{cert_uuid}/
		added the optional property 'program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/program_enrollments/
		added the optional property '/items/program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API DELETE /api/v2/program_enrollments/{id}/
		added the optional property '/items/program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/program_enrollments/{id}/
		added the optional property 'program/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/programs/
		added the optional property 'results/items/page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status

info	[response-optional-property-added] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/programs/{id}/
		added the optional property 'page/allOf[#/components/schemas/ProgramPage]/include_in_learn_catalog' to the response with the '200' status



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

Comment on lines +135 to +142
toggleUpgradeDialogVisibility = async () => {
const { upgradeEnrollmentDialogVisibility } = this.state
const { programs, createProgramEnrollment } = this.props

this.setState({
upgradeEnrollmentDialogVisibility: !upgradeEnrollmentDialogVisibility
})
try {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The toggleUpgradeDialogVisibility function is called on modal dismissal, but it also unconditionally calls createProgramEnrollment, creating an enrollment when the user intends to cancel.
Severity: HIGH

Suggested Fix

Separate the logic for toggling the modal's visibility from the enrollment creation. The toggleUpgradeDialogVisibility function should only manage the modal's state. The createProgramEnrollment call should be moved to a new, separate function that is triggered only by an explicit user action, such as clicking a confirmation button within the modal.

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: frontend/public/src/components/ProgramProductDetailEnroll.js#L135-L142

Potential issue: The `toggleUpgradeDialogVisibility` function is bound to the modal's
`toggle` prop. This means it executes not only when the modal is opened, but also when
it's dismissed by clicking the 'X' button, pressing the ESC key, or clicking the
backdrop. The function's logic unconditionally calls `createProgramEnrollment`, which
makes a `POST` request to create a new program enrollment. As a result, an enrollment is
created every time a user closes the dialog, which is contrary to their intent and leads
to unintended data creation.

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.

6 participants