Skip to content

Conversation

@marslanabdulrauf
Copy link
Contributor

Related ticket

https://github.com/mitodl/hq/issues/9621 (MIT Internal)

Discussion

https://discuss.openedx.org/t/recalculate-subsection-grade-v3-is-submitted-with-the-wrong-user-id/17873/12?u=muhammad_arslan

Description

This pull request makes a minor change to how services are handled when creating a runtime for a course. Instead of using the original self.services dictionary directly, the code now uses a copy of it to prevent unintended side effects from modifications.

  • Use a copy of the services dictionary in create_runtime to avoid mutating the original self.services when creating a runtime.

Steps to reproduce the issue:

Follow the steps mentioned in the discussion post: https://discuss.openedx.org/t/recalculate-subsection-grade-v3-is-submitted-with-the-wrong-user-id/17873/12?u=muhammad_arslan

Testing instructions

Follow the same steps and now each user should have their own submission

@openedx-webhooks
Copy link

Thanks for the pull request, @marslanabdulrauf!

This repository is currently maintained by @openedx/wg-maintenance-edx-platform.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Dec 29, 2025
@marslanabdulrauf marslanabdulrauf force-pushed the marslan/9621-grading-issue branch from 2beec34 to a086e36 Compare December 30, 2025 08:43
@marslanabdulrauf marslanabdulrauf requested a review from a team as a code owner December 30, 2025 12:40
@marslanabdulrauf marslanabdulrauf force-pushed the marslan/9621-grading-issue branch 4 times, most recently from 04f6f37 to 67a9f9e Compare December 31, 2025 11:55
@mariajgrimaldi mariajgrimaldi added the release blocker Blocks the upcoming release (fix needed) label Jan 2, 2026
Create the proper runtime for this course
"""
services = self.services
services = self.services.copy()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how this helps. Isn't this just a shallow copy? So the copy and the original still point at the same shared objects?

Copy link
Contributor Author

@marslanabdulrauf marslanabdulrauf Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were 3-4 common objects, I haven't explored all of them but yeah they might be sharing the same objects. Let me deep copy this service object

@ormsbee
Copy link
Contributor

ormsbee commented Jan 5, 2026

One of my higher level concerns is that I don't know if this is happening because of something weird that the XBlock runtime or grading system is specifically doing, or whether it's a more general problem with an underlying piece of infrastructure like the RequestCache, which we use in a lot of places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U release blocker Blocks the upcoming release (fix needed)

Projects

Status: In progress
Status: Waiting on Author

Development

Successfully merging this pull request may close these issues.

4 participants