Skip to content

feat: Move Program Certificate event publishing to the monolith#38753

Open
rahulkanneri-2u wants to merge 9 commits into
openedx:masterfrom
rahulkanneri-2u:move-program-certificate-events
Open

feat: Move Program Certificate event publishing to the monolith#38753
rahulkanneri-2u wants to merge 9 commits into
openedx:masterfrom
rahulkanneri-2u:move-program-certificate-events

Conversation

@rahulkanneri-2u

Copy link
Copy Markdown

Description

This PR moves program certificate event publishing from the Credentials IDA to the LMS monolith.

When a program certificate is awarded or revoked, the LMS now publishes the following events to the event bus:

  • PROGRAM_CERTIFICATE_AWARDED
  • PROGRAM_CERTIFICATE_REVOKED

These events are disabled by default until the Credentials IDA is ready to consume them instead of relying on direct REST API calls.

Supporting Information

This is related to the initiative to move program certificate lifecycle event publishing into edx-platform using [openedx-events](https://github.com/openedx/openedx-events).

Testing Instructions

  1. Run the programs task tests:

    pytest openedx/core/djangoapps/programs/tests/ -v
  2. To test event emission manually, enable the feature flags in your settings:

    EVENT_BUS_PRODUCER_CONFIG[
        "org.openedx.learning.program.certificate.awarded.v1"
    ]["learning-program-certificate-lifecycle"]["enabled"] = True
    
    EVENT_BUS_PRODUCER_CONFIG[
        "org.openedx.learning.program.certificate.revoked.v1"
    ]["learning-program-certificate-lifecycle"]["enabled"] = True
  3. Trigger a program certificate award or revocation.

  4. Verify that the corresponding event is published to the event bus.

Deadline

None

Other Information

  • No database migrations are required.
  • Both new event bus entries are disabled by default with enabled: False until the Credentials IDA is ready to consume them.
  • The events carry a ProgramCertificateData payload with user information and the program UUID.
  • The title, program_type, and uuid fields on the program/certificate are intentionally left as empty strings because the LMS does not have authoritative access to that data at award time.

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