mitodl/mitxpro

Don't halt certificate generation process on failure

Closed this issue · 1 comments

Steps to Reproduce

  • Setup certificates for a couple of courses in xPRO (Includes Course/CourseRun, Wagtail CoursePage, and Certificate page, etc)
  • Make sure your xPRO instance is configured with edX (Alternatively make some tweaks in the certificate creation process for generating dummy grades)
  • If you've configured your xPRO with edX, set up a grade for a user that's more than 100%, otherwise make tweaks in the xPRO code to return a grade of more than 1.
  • Now run, sync_grades_and_certificates and notice that there will be a failure because xPRO allows grades only between 0-1.
  • Notice that the command would throw an error and stop, so the other certificates are not generated

Expected Behavior

  • The command sync_grades_and_certificates should not halt when there is an error in any of the certificate creations, Instead it should continue and generate the rest of the certificates

Actual Behavior

  • Command stops on failure and doesn't generate remaining certificates

Stacktrace

Take a look at this https://mit-office-of-digital-learning.sentry.io/issues/4192538204/?project=1413655&query=is%3Aunresolved&referrer=issue-stream&stream_index=22

Related Issues

Done via #2677