Skip to content

Release 0.138.4#3309

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

Release 0.138.4#3309
odlbot wants to merge 5 commits intoreleasefrom
release-candidate

Conversation

@odlbot
Copy link
Contributor

@odlbot odlbot commented Feb 19, 2026

annagav

renovate[bot]

renovate bot and others added 5 commits February 19, 2026 15:20
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@github-actions
Copy link

OpenAPI Changes

Show/hide ## Changes for v0.yaml:
## Changes for v0.yaml:
13 changes: 13 error, 0 warning, 0 info
error	[response-property-max-length-increased] at head/openapi/specs/v0.yaml	
	in API GET /api/v1/enrollments/
		the '/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v0.yaml	
	in API POST /api/v1/enrollments/
		the 'grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '201'

error	[response-property-max-length-increased] at head/openapi/specs/v0.yaml	
	in API PATCH /api/v1/enrollments/{id}/
		the 'grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v0.yaml	
	in API PUT /api/v1/enrollments/{id}/
		the 'grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v0.yaml	
	in API GET /api/v1/program_enrollments/
		the '/items/enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v0.yaml	
	in API DELETE /api/v1/program_enrollments/{id}/
		the 'enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v0.yaml	
	in API GET /api/v1/program_enrollments/{id}/
		the 'enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/enrollments/
		the '/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v0.yaml	
	in API POST /api/v2/enrollments/
		the 'grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '201'

error	[response-property-max-length-increased] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/program_enrollments/
		the '/items/enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v0.yaml	
	in API DELETE /api/v2/program_enrollments/{id}/
		the '/items/enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v0.yaml	
	in API GET /api/v2/program_enrollments/{id}/
		the 'enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v0.yaml	
	in API POST /api/v2/verified_program_enrollments/{program_id}/{courserun_id}/
		the 'grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '201'



## Changes for v1.yaml:
13 changes: 13 error, 0 warning, 0 info
error	[response-property-max-length-increased] at head/openapi/specs/v1.yaml	
	in API GET /api/v1/enrollments/
		the '/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v1.yaml	
	in API POST /api/v1/enrollments/
		the 'grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '201'

error	[response-property-max-length-increased] at head/openapi/specs/v1.yaml	
	in API PATCH /api/v1/enrollments/{id}/
		the 'grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v1.yaml	
	in API PUT /api/v1/enrollments/{id}/
		the 'grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v1.yaml	
	in API GET /api/v1/program_enrollments/
		the '/items/enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v1.yaml	
	in API DELETE /api/v1/program_enrollments/{id}/
		the 'enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v1.yaml	
	in API GET /api/v1/program_enrollments/{id}/
		the 'enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/enrollments/
		the '/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v1.yaml	
	in API POST /api/v2/enrollments/
		the 'grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '201'

error	[response-property-max-length-increased] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/program_enrollments/
		the '/items/enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v1.yaml	
	in API DELETE /api/v2/program_enrollments/{id}/
		the '/items/enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v1.yaml	
	in API GET /api/v2/program_enrollments/{id}/
		the 'enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v1.yaml	
	in API POST /api/v2/verified_program_enrollments/{program_id}/{courserun_id}/
		the 'grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '201'



## Changes for v2.yaml:
13 changes: 13 error, 0 warning, 0 info
error	[response-property-max-length-increased] at head/openapi/specs/v2.yaml	
	in API GET /api/v1/enrollments/
		the '/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v2.yaml	
	in API POST /api/v1/enrollments/
		the 'grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '201'

error	[response-property-max-length-increased] at head/openapi/specs/v2.yaml	
	in API PATCH /api/v1/enrollments/{id}/
		the 'grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v2.yaml	
	in API PUT /api/v1/enrollments/{id}/
		the 'grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v2.yaml	
	in API GET /api/v1/program_enrollments/
		the '/items/enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v2.yaml	
	in API DELETE /api/v1/program_enrollments/{id}/
		the 'enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v2.yaml	
	in API GET /api/v1/program_enrollments/{id}/
		the 'enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/enrollments/
		the '/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v2.yaml	
	in API POST /api/v2/enrollments/
		the 'grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '201'

error	[response-property-max-length-increased] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/program_enrollments/
		the '/items/enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v2.yaml	
	in API DELETE /api/v2/program_enrollments/{id}/
		the '/items/enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v2.yaml	
	in API GET /api/v2/program_enrollments/{id}/
		the 'enrollments/items/grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '200'

error	[response-property-max-length-increased] at head/openapi/specs/v2.yaml	
	in API POST /api/v2/verified_program_enrollments/{program_id}/{courserun_id}/
		the 'grades/items/letter_grade' response property's maxLength was increased from '6' to '10' for the response status '201'



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

null=False, validators=[MinValueValidator(0.0), MaxValueValidator(2.0)]
)
letter_grade = models.CharField(max_length=6, blank=True, null=True) # noqa: DJ001
letter_grade = models.CharField(max_length=10, blank=True, null=True) # noqa: DJ001
Copy link

Choose a reason for hiding this comment

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

Bug: The override_user_grade function uses a validation is_letter_grade_valid that only allows single-character grades, contradicting the PR's intent to support multi-character grades.
Severity: MEDIUM

Suggested Fix

Update the validation logic in the is_letter_grade_valid function in courses/utils.py to align with the new max_length=10 for letter_grade. The regex should be modified to accept multi-character strings. Additionally, enhance the tests for override_user_grade to include cases with multi-character grades to prevent future regressions.

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: courses/models.py#L1907

Potential issue: The pull request updates the `letter_grade` field to support up to 10
characters, but the validation function `is_letter_grade_valid` was not updated
accordingly. This function, which is called by `override_user_grade`, still enforces a
single-character grade (`[A-F]`). Consequently, any attempt by an administrator to
manually set a multi-character grade (e.g., "Pass") via the API or the
`manage_certificates.py` management command will fail with a `ValidationError`. This
creates an inconsistency where multi-character grades can be synced from external
systems but cannot be manually set or overridden.

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.

2 participants