-
Notifications
You must be signed in to change notification settings - Fork 4.2k
refactor: deprecate course_id from ModuleSystem [BD-13] #30715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: deprecate course_id from ModuleSystem [BD-13] #30715
Conversation
|
Thanks for the pull request, @Agrendalath! When this pull request is ready, tag your edX technical lead. |
81ff675 to
12b8d61
Compare
|
@Agrendalath Just checking if you are planning to pursue this any time soon. |
|
@Agrendalath I hope you had a great vacation, thanks for letting me know about the plans for the PRs. |
12b8d61 to
fc44ba9
Compare
e319158 to
b295d5a
Compare
a6025af to
68091e8
Compare
|
@ormsbee, would you like to review this PR? |
ormsbee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two main line of questions:
- Is it possible that this refactoring is introducing versioned CourseKeys in places they previously were not? I'm concerned that this might cause regressions for things like serialization or configuration lookup (e.g. the thing is enabled for the string that is the CourseKey, but not the string that is the CourseKey+branch/version information).
- Why are the service additions part of the same PR? Is it because course_id swichover requires it for some reason?
ormsbee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few comments and questions.
xmodule/x_module.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jristau1984: Sometime after this PR merges, you might want to look for this line in the Splunk logs. In particular, this could happen if edx.org uses extensions or XBlocks that try to access this deprecated attribute directly instead of deriving it directly from the UsageKey.
pkulkark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't done a deep code review since @ormsbee is already doing that. But I tested it out on the sandbox and it works as expected. LGTM 👍
ormsbee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I haven't done a deep code review since @ormsbee is already doing that. But I tested it out on the sandbox and it works as expected. LGTM 👍
@pkulkark: I actually meant to review only things that you had already reviewed, and did this one by accident without realizing. But as a general rule, please feel free to closely review everything, regardless of whether I do a pass at it. The Modulestore is tricky enough where I'm always grateful for an extra set of eyes on these things.
We will use `context_key` instead.
…errides We will use `context_key` instead.
We will use `context_key` instead.
We will use `context_key` instead.
This attribute is already deprecated for XBlocks in favour of directly retrieving it like `block.scope_ids.usage_id.context_key`. This commit also removes some redundant logging code which was omitted in the Datadog removal in openedx#19420.
d1525b7 to
dcabc5a
Compare
dcabc5a to
1afb32c
Compare
|
@Agrendalath 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
|
FYI I believe that this PR causes the following issue when building the openedx Docker image on Tutor: overhangio/tutor#726 EDIT 2022-10-03: nope! I was wrong |
Description
As a part of the ModuleSystem removal, we want to get rid of the
course_idfrom its attributes. We have replaced its usages in the platform withblock.scope_ids.usage_id.context_key. For backward compatibility, external XBlocks will still be able to implicitly obtain it either from the CachingDescriptorSystem or XModuleMixin as a fallback.Supporting information
Sandbox instance: https://pr30715.sandbox.opencraft.hosting
Use
staff@example.com:edxto log in.Testing instructions
verify=Falseto requests inlms/djangoapps/edxnotes/helpers.pyto quickly get this working.Other information
Private-ref: BB-5969