fix: Bug 404 for state RETIRING_FORUMS user retirement#33024
fix: Bug 404 for state RETIRING_FORUMS user retirement#33024AhtishamShahid merged 2 commits intoopenedx:masterfrom
Conversation
|
Thanks for the pull request, @DmytroAlipov! 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. |
|
Hi @openedx/edx-infinity! Is something you could please review/merge for us? Thanks! |
|
Hi @DmytroAlipov! Please see here regarding the 2 checks that have popped up and need to be run. I think rebasing should fix it. |
| name="discussion_course" | ||
| ), | ||
| path('v1/accounts/retire_forum', RetireUserView.as_view(), name="retire_discussion_user"), | ||
| path('v1/accounts/retire_forum/', RetireUserView.as_view(), name="retire_discussion_user"), |
There was a problem hiding this comment.
It would be nice if URI can handle both with and without trailing \
| path('v1/accounts/retire_forum/', RetireUserView.as_view(), name="retire_discussion_user"), | |
| re_path(r'^v1/accounts/retire_forum/?$', RetireUserView.as_view(), name="retire_discussion_user"), |
749de95 to
2e71a3f
Compare
2e71a3f to
b86bd98
Compare
|
Hi @openedx/edx-infinity! Flagging that this is ready for review. Thanks! |
|
@DmytroAlipov 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
Description
We ran into a problem when running the
retire_users.shcommand. The user must first delete their account from the platform. After that, the/edx/app/retirement_service/retire_users.shcommand is launched. However, for one step, an error appearsAt the same time, all user actions for the forum remain, since this retirement stage is not completed.
A problem was detected with the WALL of this endpoint.
URL looks like:
https://lms-palm.com/api/discussion/v1/accounts/retire_forum/However, this URL is expected on the platform:
https://lms-palm.com/api/discussion/v1/accounts/retire_forumThe URL is created in LmsApi, and the append_slash argument is responsible for adding a slash at the end of the URL. This addition of a slash is carried out for all retirement steps.
After fixing, the entire flow passes without errors:
User data is deleted in the Discussion:

Note:
We do not have all stages of retirement. Only such:
Might have similar problems for other stages.