-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Add Django settings flags to roll out the extracted XBlocks #35549
Conversation
cabc843
to
64cf575
Compare
4ed8c6d
to
34d042c
Compare
cca34ec
to
b2dcc10
Compare
833b935
to
9820dd6
Compare
9eb768c
to
84aba33
Compare
84aba33
to
73ddfa0
Compare
Sandbox deployment failed 💥 |
Sandbox deployment failed 💥 |
a2e4584
to
73ddfa0
Compare
Sandbox deployment failed 💥 |
681020d
to
6c91c56
Compare
Sandbox deployment successful 🚀 |
Sandbox deployment successful 🚀 |
This is a good thing to keep in mind when changing the names of any classes which are persisted to the DB. In this particular case, though, I think we are OK. As far as I know, there are no features that depend on the literal class name of the block. The names that are used in de/serialization are the tag name(s) ( Looking through the test cases which were updated, it seems that they were checking the class name rather than the class itself only because the class itself ( |
@farhan Taking a look at your screenshot, it seems that either some CSS or JS (or both) is missing. And if you are able to still submit the problem's answer successfully, then that would imply that the JS is present, and that only the CSS is missing. If you haven't already, try re-building static assets ( |
One fix you could try, related to @feanil 's comment earlier, would be setting _BuiltInProblemBlock.__name__ = "ProblemBlock" This essentially tells Python "From the perspective of the module, the class goes by one name (_BuiltInProblemBlock), but I want it to appear to other objects as if it has a different name (ProblemBlock)". |
@kdmccormick Thanks for sharing thoughts
Next:
|
Sounds good @farhan . You may already know this, but just in case: if you are running on |
I had tried |
ee8a459
to
8d99d1b
Compare
PR is available for code review. I have reverted the test case fixing commit. |
chore: Update xblocks-contrib pypi package Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/farhan/waffle-flag-for-extracted-xblock`
This reverts commit 948922c.
942db0a
to
4360d9b
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 work. I have not tested it myself but I see that you have.
@@ -498,3 +498,4 @@ def safe_parse_date(date): | |||
_ExtractedHtmlBlock if settings.USE_EXTRACTED_HTML_BLOCK | |||
else _BuiltInHtmlBlock | |||
) | |||
HtmlBlock.__name__ = "HtmlBlock" |
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.
We need to ensure that the HTML subclasses (CourseInfoBlock, AboutBlock, and StaticTabBlock) are based on the extracted HTML block code rather than the built-in code, as they are now. This may require exposing a new HTMLMixin class from xblocks-contrib.
This can be done in a follow-up.
…35549) chore: Add Django settings flags to roll out the extracted XBlocks
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. |
1 similar comment
2U Release Notice: This PR has been deployed to the edX production environment. |
chore: Add Django settings flags to roll out the extracted XBlocks
Add Waffle flags to roll out the extracted XBlocks
Flags will use to toggle between the old and new block quickly
without putting course content or user state at risk.
Ticket: #35308
Django Settings Flags
Following built in blocks wafffle flags are in action in this PR and has been implemented: