-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[BD-13] [BB-5519] refactor: deletes XModuleDescriptorToXBlockMixin #29927
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
[BD-13] [BB-5519] refactor: deletes XModuleDescriptorToXBlockMixin #29927
Conversation
|
Thanks for the pull request, @kaustavb12! I've created BLENDED-1097 to keep track of it in Jira. More details are on the BD-13 project page. When this pull request is ready, tag your edX technical lead. |
d49e998 to
48b6c91
Compare
48b6c91 to
d201b22
Compare
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.
Good to go once the tests pass.
👍
- I tested this: tested that the blocks are working within LMS, Studio and Preview; verified that the
ErrorBlockis rendering correctly - I read through the code
- I checked for accessibility issues: n/a
- Includes documentation: n/a
- I made sure any change in configuration variables is reflected in the corresponding client's
configuration-securerepository: n/a
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.
Note: it's fine to keep the code repetition here, as we'll be removing this in a follow-up ticket.
d201b22 to
b678466
Compare
2a2682e to
e5116f0
Compare
|
@ormsbee, would you like to review this before we merge it? |
|
@Agrendalath, @kaustavb12: Could you please explain in more detail the changes you made to the OLX data files and what that implies about breaking changes to the serialization format? |
|
Hi @ormsbee ! Thanks for reviewing the changes ! As part of this PR, we have removed the translation of legacy attributes which used to happen during course import. I noticed a few OLX data files also contained these legacy attributes, some of which caused existing test cases to fail, after the current changes. I have thus changed those legacy attributes to the correct ones in the OLX data files. This would imply that import of course xmls with legacy format would not be supported after merging of this PR. cc. @Agrendalath |
|
@kaustavb12, @Agrendalath: Please spell out exactly what attribute translations will stop working after this commit, and put that information in the PR description and later on in the commit message. If there isn't a DEPR for it, we may have to make one. (It's possible it's on the DEPR board somewhere, in which case great.) We've generally been pretty cautious about breaking backwards compatibility in OLX. This is old and obscure enough where I don't think we will run into trouble, but I do think we need to inform very loudly. FYI @pdpinch, @dianakhuang, @jristau1984, @doctoryes, @connorhaugh |
We only have a generic DEPR for XModule to XBlock conversion: openedx/public-engineering#70. Should we put this information as a comment there or create a separate DEPR issue? |
|
Separate issue please. Thank you. |
|
@ormsbee The following pairs of translations have been removed:
cc. @Agrendalath |
|
@ormsbee, I've created openedx/public-engineering#74. I've put dates from the BD-13 discovery, though we can adjust them if needed. |
|
Please set the acceptance date to two weeks from now and announce it in the DEPR section of the forums. I'm sorry if this delays this ticket or hampers other refactoring work, but we have to loudly broadcast anything that may break backwards compatibility with our import/export format, even if it's using really old 2012-compatibility features that we don't think anybody even remembers existing. |
|
@ormsbee, oh, I've just noticed your comment, as it didn't get through my inbox filters without an explicit mention. I've created the announcement.
Of course, that's understandable. Thank you for your guidance on this. |
|
@kaustavb12 🎉 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 may have caused e2e tests to fail on Stage. If you're a member of the edX org, please visit #e2e-troubleshooting on Slack to help diagnose the cause of these failures. Otherwise, it is the reviewer's responsibility. E2E tests have failed. https://gocd.tools.edx.org/go/tab/pipeline/history/deploy_to_stage |
|
EdX Release Notice: This PR has been deployed to the production environment. |
This:
1. Deletes XModuleDescriptorToXBlockMixin
2. Deletes `metadata_traslations` and `_translate()` from `XmlParserMixin`,
and all related implementations.
3. Removes translations of deprecated OLX attributes during import/export:
<old_attr> : <new_attr>
- 'slug' : 'url_name'
- 'name' : 'display_name'
- 'id' : 'discussion_id' (Discussion XBlock)
- 'for' : 'discussion_target' (Discussion XBlock)
- 'attempts' : 'max_attempts' (CAPA)
Description
The following changes are incorporated in this PR:
metadata_traslationsand_translate()and all related implementations.<old_attr> : <new_attr>
Supporting information
OpenCraft internal ticket BB-5519
Testing instructions
LMS: https://pr29927.sandbox.opencraft.hosting/
Studio: https://studio.pr29927.sandbox.opencraft.hosting/
Studio: