diff --git a/pavelib/utils/envs.py b/pavelib/utils/envs.py index d2cdd4a77d7a..7dc9870fbdea 100644 --- a/pavelib/utils/envs.py +++ b/pavelib/utils/envs.py @@ -88,15 +88,19 @@ class Env: KARMA_BROWSER = 'FirefoxNoUpdates' # Files used to run each of the js test suites - # TODO: Store this as a dict. Order seems to matter for some - # reason. See issue TE-415. + # TODO: We have [temporarily disabled] the three Webpack-based tests suites. They have been silently + # broken for a long time; after noticing they were broken, we added the DieHardPlugin to + # webpack.common.config.js to prevent future silent breakage, but have not yet been able to + # fix and re-enable the suites. Note that the LMS suite is all Webpack-based even though it's + # not in the name. + # Issue: https://github.com/openedx/edx-platform/issues/35956 KARMA_CONFIG_FILES = [ REPO_ROOT / 'cms/static/karma_cms.conf.js', REPO_ROOT / 'cms/static/karma_cms_squire.conf.js', - REPO_ROOT / 'cms/static/karma_cms_webpack.conf.js', - REPO_ROOT / 'lms/static/karma_lms.conf.js', + ## [temporarily disabled] REPO_ROOT / 'cms/static/karma_cms_webpack.conf.js', + ## [temporarily disabled] REPO_ROOT / 'lms/static/karma_lms.conf.js', REPO_ROOT / 'xmodule/js/karma_xmodule.conf.js', - REPO_ROOT / 'xmodule/js/karma_xmodule_webpack.conf.js', + ## [temporarily disabled] REPO_ROOT / 'xmodule/js/karma_xmodule_webpack.conf.js', REPO_ROOT / 'common/static/karma_common.conf.js', REPO_ROOT / 'common/static/karma_common_requirejs.conf.js', ] @@ -104,10 +108,10 @@ class Env: JS_TEST_ID_KEYS = [ 'cms', 'cms-squire', - 'cms-webpack', - 'lms', + ## [temporarily-disabled] 'cms-webpack', + ## [temporarily-disabled] 'lms', 'xmodule', - 'xmodule-webpack', + ## [temporarily-disabled] 'xmodule-webpack', 'common', 'common-requirejs', 'jest-snapshot' diff --git a/requirements/constraints.txt b/requirements/constraints.txt index e3634ad32799..991291fa1ab1 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -78,7 +78,7 @@ django-storages<1.14.4 # The team that owns this package will manually bump this package rather than having it pulled in automatically. # This is to allow them to better control its deployment and to do it in a process that works better # for them. -edx-enterprise==5.2.0 +edx-enterprise==5.3.1 # Date: 2024-05-09 # This has to be constrained as well because newer versions of edx-i18n-tools need the diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 3e5b55c55ba6..5092347c0a2c 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -472,7 +472,7 @@ edx-drf-extensions==10.5.0 # edx-when # edxval # openedx-learning -edx-enterprise==5.2.0 +edx-enterprise==5.3.1 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/kernel.in @@ -841,7 +841,7 @@ openedx-filters==1.11.0 # -r requirements/edx/kernel.in # lti-consumer-xblock # ora2 -openedx-forum==0.1.2 +openedx-forum==0.1.3 # via -r requirements/edx/kernel.in openedx-learning==0.18.1 # via diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index c9e21dce0fcb..c0e9f30b3df4 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -748,7 +748,7 @@ edx-drf-extensions==10.5.0 # edx-when # edxval # openedx-learning -edx-enterprise==5.2.0 +edx-enterprise==5.3.1 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/doc.txt @@ -1396,7 +1396,7 @@ openedx-filters==1.11.0 # -r requirements/edx/testing.txt # lti-consumer-xblock # ora2 -openedx-forum==0.1.2 +openedx-forum==0.1.3 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt diff --git a/requirements/edx/doc.txt b/requirements/edx/doc.txt index 867a17f80703..5af9839ce1d1 100644 --- a/requirements/edx/doc.txt +++ b/requirements/edx/doc.txt @@ -555,7 +555,7 @@ edx-drf-extensions==10.5.0 # edx-when # edxval # openedx-learning -edx-enterprise==5.2.0 +edx-enterprise==5.3.1 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt @@ -1010,7 +1010,7 @@ openedx-filters==1.11.0 # -r requirements/edx/base.txt # lti-consumer-xblock # ora2 -openedx-forum==0.1.2 +openedx-forum==0.1.3 # via -r requirements/edx/base.txt openedx-learning==0.18.1 # via diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index e28871ea389e..c5564ccb05fa 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -576,7 +576,7 @@ edx-drf-extensions==10.5.0 # edx-when # edxval # openedx-learning -edx-enterprise==5.2.0 +edx-enterprise==5.3.1 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt @@ -1055,7 +1055,7 @@ openedx-filters==1.11.0 # -r requirements/edx/base.txt # lti-consumer-xblock # ora2 -openedx-forum==0.1.2 +openedx-forum==0.1.3 # via -r requirements/edx/base.txt openedx-learning==0.18.1 # via diff --git a/webpack.common.config.js b/webpack.common.config.js index de8b545c978b..c9b69eef4292 100644 --- a/webpack.common.config.js +++ b/webpack.common.config.js @@ -26,6 +26,27 @@ var defineFooter = new RegExp('(' + defineCallFooter.source + ')|(' var staticRootLms = process.env.STATIC_ROOT_LMS || './test_root/staticfiles'; var staticRootCms = process.env.STATIC_ROOT_CMS || (staticRootLms + '/studio'); +class DieHardPlugin { + /* A small plugin which ensures that if Webpack fails, it causes the surrounding process to fail + * as well. This helps us prevent JavaScript CI from "false passing" upon build failures--that is, + * we want to avoid having another situation where the Webpack build breaks under Karma (our + * test runner) but Karma just lets it slide and moves on to the next test suite. + * + * One would imagine that this would be Webpack's default behavior (and maybe it is?) but, + * regardless, karma-webpack does not seem to consider Webpack build failures to be fatal errors + * without this plugin. We don't fully understand it, but this is good enough given that we plan + * to remove all JS in this repo soon (https://github.com/openedx/edx-platform/issues/31620). + * + * Inpsired by: https://github.com/codymikol/karma-webpack/issues/49#issuecomment-842682050 + */ + apply(compiler) { + compiler.hooks.failed.tap('DieHardPlugin', (error) => { + console.error(error); + process.exit(1); + }); + } +} + var workerConfig = function() { try { return { @@ -153,6 +174,7 @@ module.exports = Merge.smart({ // any other way to declare that dependency. $script: 'scriptjs' }), + new DieHardPlugin(), ], module: {