Skip to content

feat: trigger grade change event to message bus#29512

Closed
rgraber wants to merge 5 commits intomasterfrom
rsgraber/ARCHBOM-1918-producer-in-credentials-app
Closed

feat: trigger grade change event to message bus#29512
rgraber wants to merge 5 commits intomasterfrom
rsgraber/ARCHBOM-1918-producer-in-credentials-app

Conversation

@rgraber
Copy link
Contributor

@rgraber rgraber commented Dec 6, 2021

Description

Trigger an event to the message bus at the same time as the API request to credentials on grade change. Part of the effort to gradually replace these API calls with events.

Useful information to include:

  • affected roles: developer, mostly
  • Adds settings:
    -- KAFKA_ENABLED
    -- KAFKA_PRODUCER_CONF_BASE
    -- SCHEMA_REGISTRY_URL
    Right now kafka is only enabled on devstack since we don't have a real cluster set up yet.

Supporting information

Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions.
Be sure to check they are publicly readable, or if not, repeat the information here.

Testing instructions

Testing this change locally with devstack is a pain but can be done. You will need studio as well as all the kafka containers. You can bring up the kafka containers with make dev.up.kafka-control-center

In order to test this change, you will need to generate a certificate for a user in a verified seat in a course that is part of a program. There are a few different ways to do this. Using a clean devstack, the way I found was:

  1. Bring up frontend-app-support-tools (outside of devstack)
  2. Use support tools to enroll the verified@example.com user in the Demo course on the verified track
  3. As the verified user, go through some percentage of the demo course (it doesn't really matter how much but you do need to have some "points" for this to work)
  4. In the lms-shell, run ./manage.py lms cache_programs to populate the programs cache
  5. In a different window, log in using the edx@example.com user, which is a staff user on the Demo course.
  6. As edx@example.com, go to Studio and create a certificate for the demo course

Once you have a certificate and user set up, to actually test the event:

  1. Open up the kafka control center (localhost:9021) and navigate to Topics
  2. Go to the Grading section in studio and adjust the grading scale by adding or removing grades.
  3. Run ./manage.py lms compute_grades --courses 'course-v1:edX+DemoX+Demo_Course' --settings=devstack
  4. credentials_grade_change should appear as a new topic
  5. If you want to rerun, go into the credentials_grade_change topic and go to the Messages tab. Then update the studio grading and rerun the management command. A new message should appear. Make sure you open the Messages tab first, since that page only shows messages produced since you opened it.

Deadline

None

@rgraber rgraber changed the title <!-- feat: trigger grade change event to message bus Dec 6, 2021
@edx-status-bot
Copy link

Your PR has finished running tests. There were no failures.

@rgraber rgraber closed this Nov 1, 2023
@nedbat nedbat deleted the rsgraber/ARCHBOM-1918-producer-in-credentials-app branch January 8, 2024 14:58
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.

2 participants