-
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
revert: revert: build: remove dependency on Python sass
module
#34502
revert: revert: build: remove dependency on Python sass
module
#34502
Conversation
5705b42
to
75ed733
Compare
0b3db6b
to
65b84e8
Compare
This reverts commit a27cda2.
Fixes three NameErrors which were introduced by the previous commit, leading to it being reverted. These NameErrors slipped through because the script was not tested on any themes that had zero SCSS overrides.
65b84e8
to
e2e48b2
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.
Changes all make sense to me, glad to see this in CI now!
This will be used to protect against bugs like the on fixed in the previous commit.
This will help safe-guard against bugs in the Sass and Webpack build which only arise from certain uses of the legacy Comprehensive Theming system.
This fixes the ability to pass custom theme directories to the management command which compiles site themes, a la: ./manage.py lms compile_sass --theme-dirs /my/custom/themes/dir The exception, which was due to a incompatible use of @lru_cache, was: File "openedx/core/djangoapps/theming/management/commands/compile_sass.py", line 93, in parse_arguments: available_themes.update({t.theme_dir_name: t for t in get_themes([theme_dir])}) TypeError: unhashable type: 'list' This has been broken since the @lru_cache decorator was added, but it wasn't noticed because: * We weren't compiling any comprehensive themes in CI. * Tutor supports compehensive theming, but not *site theming*, so it doesn't use this management command at all (site themeing == comp theming * site configuration). * Although edx.org executes this management command, it does not provide use the `--theme-dirs` argument, so the bug was not hit.
e2e48b2
to
101aead
Compare
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. |
Description
This PR does five things, each separated into its own commit:
sass
module #34439sass
module #34476./themes/empty-theme
, which can be used to trigger said NameError../themes
in CI so that the NameError wouldn't have been introduced in the first place.compile_sass
management command, which I found when I began compiling themes in CI.Testing
Same as #34439
The improved CI check will provide additional confidence in the compile_sass.py script.
Merge considerations
High-urgency, as this blocks the Python 3.11 upgrade ( #34229 )