Fix certificate generation without persistent grades#29793
Conversation
|
Thanks for the pull request, @dyudyunov! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
90388fb to
91e7b9f
Compare
|
Failed tests are already fixed: #29773 (comment) |
|
@dyudyunov Thank you for your contribution. @BbrSofiane Please line this up for your review. |
e97f76c to
6962b25
Compare
|
Hello! Can you please fix the failing tests? |
|
I can take this one @BbrSofiane, if it's OK with you. (I already reviewed this PR targetting master) |
6962b25 to
461aa5d
Compare
|
failing tests all have the following error: It seems to be a general error connected to test runs. I can't find anything that could break the tests in this PR. |
|
Now there's a new error: https://github.com/openedx/edx-platform/runs/7032568957?check_suite_focus=true#step:10:78 I'll research what could have happened |
|
Can we rebase again to trigger the tests? @dyudyunov |
Fix for an error related to endless recursion Dev Notes: The student gets the passing grade -> CourseGradeFactory sends the `COURSE_GRADE_NOW_PASSED` signal after the grade calculation -> `listen_for_passing_grade` receives the signal and calls `generate_certificate_task` -> `generate_certificate_task` calls `_generate_regular_certificate_task` -> `_generate_regular_certificate_task` trying to get grade by calling the `_get_course_grade` -> `_get_course_grade` calls `CourseGradeFactory().read()` but I have persistent grades off, so actually that ends with `CourseGradeFactory().update()` -> `CourseGradeFactory().update()` sends the `COURSE_GRADE_NOW_PASSED` And so on
461aa5d to
b26343a
Compare
|
Now the test errors say: The interesting part is that @mariajgrimaldi do you know anything about this? How can I help with fixing it? |
|
I believe it is a cache issue. Let me research a bit more to see if this has happened before. |
|
Update: I left a comment asking about this in the BTR wg in charge of release branches |
|
@mariajgrimaldi I agree that the test failures seem to be cache-related -- perhaps the edX-hosted unit test runners are leaking some state between this branch's build and the master branch's build. I have to admit that I don't how I would fix it... I will try to find someone at edX to take a look at the problem. In the meantime, though, I don't want this PR to have to remain stuck for much longer. If we could confirm in some other way that the changes here pass the unit testing suite, then I could force-merge this PR despite the testing errors. @mariajgrimaldi or @dyudyunov , could one of you please:
That would cause the unit test suite to run using GitHub-hosted runners instead of edX-hosted runners. If the test suite passed on the fork PR, then I would be happy to merge this PR despite the caching issues here. |
|
Thanks for the insight & the help @kdmccormick! @dyudyunov can you run the tests with gh-hosted runners as Kyle mentioned? Thank you 🙏 |
b26343a to
9e7d617
Compare
|
@mariajgrimaldi I've opened the PR in our fork, but unit test jobs are stacked in the Queued status for more than 3 hours for now. I'll try to find the reason when having some free time. Give me a clue if any)) PS: I've tried to restart jobs - I've got the same result - same jobs passed and same jobs stacked in the Queued state |
|
@dyudyunov you might need to change this line to |
I'll try, thanks |
2edccab to
5225be6
Compare
|
Let me know if that worked for you @dyudyunov |
your suggestion works but I've got problems with pip installing packages. Need more time to fix.
I'll ping you when I have any results, but I don't know when I'll find time for it |
|
Hi @dyudyunov! Just checking in to see if you are planning to pursue this PR? If so, looks like you will need to re-run some failing tests. Thanks! |
5225be6 to
b87ba33
Compare
|
hi, @mphilbrick211 Considering these changes are already in the master and maple is no longer supported I believe there is no reason to spend more time on this. Feel free to close it |
|
Closing per author. |
|
@dyudyunov Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future. |
Description
Fix for an error related to endless recursion
Dev Notes:
The student gets the passing grade
-> CourseGradeFactory sends the
COURSE_GRADE_NOW_PASSEDsignal after the grade calculation->
listen_for_passing_gradereceives the signal and callsgenerate_certificate_task->
generate_certificate_taskcalls_generate_regular_certificate_task->
_generate_regular_certificate_tasktrying to get grade by calling the_get_course_grade->
_get_course_gradecallsCourseGradeFactory().read()but I have persistent grades off, so actually that ends withCourseGradeFactory().update()->
CourseGradeFactory().update()sends theCOURSE_GRADE_NOW_PASSEDAnd so on
Related PR to master: