Skip to content

Release 1.146.2#3484

Merged
odlbot merged 6 commits intoreleasefrom
release-candidate
Apr 13, 2026
Merged

Release 1.146.2#3484
odlbot merged 6 commits intoreleasefrom
release-candidate

Conversation

@odlbot
Copy link
Copy Markdown
Contributor

@odlbot odlbot commented Apr 13, 2026

annagav

James Kachel

Dan Subak

renovate[bot]

pre-commit-ci[bot]

@github-actions
Copy link
Copy Markdown

OpenAPI Changes

Show/hide ## Changes for v0.yaml:
## Changes for v0.yaml:
No changes detected

## Changes for v1.yaml:
No changes detected

## Changes for v2.yaml:
No changes detected

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

Comment thread courses/admin.py
if failed_certificates:
# We indicate IDs, but errors should also be logged to sentry from within create_verifiable_credential
level = messages.WARNING
message = f"Successfully requested verifiable credential backfill for {len(certificates)} {self.model._meta.model_name} certificates, but encountered errors for certificates with IDs: {[cert.id for cert in failed_certificates]}" # noqa: SLF001
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 admin message for credential backfill incorrectly reports the total certificate count as successful, even when some certificates fail processing.
Severity: LOW

Suggested Fix

Update the message string to calculate the number of successful operations correctly. Instead of using len(certificates), use len(certificates) - len(failed_certificates) to reflect the actual number of successfully processed certificates when failures are present.

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/admin.py#L59

Potential issue: In the `populate_verifiable_credentials_for_certificate` admin action,
when some certificates fail the backfill process, the resulting message is misleading.
The message reports that `len(certificates)` certificates were successfully processed,
which is the total number of certificates attempted. However, it also lists the
certificates that failed. This creates a contradiction and misinforms the admin user
about the actual number of successful operations. The correct count of successful
backfills should be the total count minus the number of failures.

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

@odlbot odlbot merged commit a0790c6 into release Apr 13, 2026
13 checks passed
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