ℹ️ This DEPR ticket considers the Paver commands in two groups:
- Operator-facing commands, which were accepted for deprecation back in May 2023, and then rolled into this general Paver DEPR ticket. These are the commands that operators need to migrate away from.
- Internal CI commands, which will be replaced at the leisure of the edx-platform maintenance team. They should not affect operators in any way.
Timeline
Communicated
Operator-facing commands: 2023-03-08 (thread)
Internal CI commands: 2024-05-01 (thread)
Acceptance
Operator-facing commands: 2023-05-03
Internal CI commands: 2024-05-21
Replacement available
Operator-facing commands: 2024-05-07, Redwood
Internal CI commands: ~2024-11-09, early Teak (Target)
Earliest removal
Operator-facing commands: 2024-11-09, early Teak
Internal CI commands: as soon as replacement is available
Rationale
edx-platform historically handled its build scripts with paver:
Paver is a Python-based software project scripting tool along the lines of Make or Rake. It is not designed to handle the dependency tracking requirements of, for example, a C program. It is designed to help out with all of your other repetitive tasks (run documentation generators, moving files about, downloading things), all with the convenience of Python’s syntax and massive library of code.
Using paver has a few problems:
- Paver adds dependencies to edx-platform: Paver follows the Python packaging model, so anything that's a dependency of edx-platform's pavelib suite becomes a dependency of edx-platform itself. In addition to the
paver package, this means that we install libsass-python in production, which takes 60+ seconds (!) to compile and install.
- Paver makes Python a requirement for all build actions: When your build tooling runs on Python, then you need a Python environment in order to do anything, even things that don't involve Python (including building static assets, running JS tests, etc.). This harms the cachability of edx-platform Dockerfiles, because it means that any change to the Python requirements list will invalidate any build steps used by Paver.
- Paver is indirect: Paver basically just wraps shell commands that you could have run directly, adding a layer of complexity and potential bugs. Build scripts are ideally very simple--unlike application code, repetition is preferable to abstraction; they should be easy to write, easy to read, and easy to throw away and replace if necessary. Standard tools like Makefiles, Bash scripts, and Dockerfiles all encourage and excel at this sort of simplicity; Paver does not.
- Paver is idiosyncratic: Unlike Make and Bash, Paver is not at all a standard part of a programmer's toolset, so it makes edx-platform less approachable for new contributors. Even for programmers who want to script in Python, Click is significantly more popular, well-documented, and user-friendly.
For the Paver Asset commands in particular, more depth is provided in the 'Reimplement edx-platform static asset processing' ADR.
Replacement
| Module |
Replacement |
| assets |
New static assets guide |
| quality |
Directly invoking tools (pylint, etc.) when possible, Makefile targets otherwise |
| test_js |
Makefile target |
| prereqs |
pip |
| docs |
Makefile target |
| i18n |
Makefile targets for common tasks; i18n_tool for advanced tasks |
| servers |
Tutor (or the deprecated Docker-based Devstack, or bare-metal development |
Migration
To ease migration for Paver users, in Redwood, each Paver Asset command will simply proxy to its replacement command, and will raise a deprecation warning explaining the new command that it is running.
By Nov 9th 2024, operators will need to have switched to the new commands, taking the steps indicated below by ACTION REQUIRED.
Requirements (Operators: ACTION REQUIRED)
In Redwood and earlier, Paver and its dependencies were included in requirements/edx/base.txt
Starting in Sumac, these dependencies will be removed from requirements/edx/base.txt. Instead, operators will need to install:
- requirements/edx/assets.txt to build static assets
- requirements/edx/testing.txt to run Python tests and linting
- requirements/edx/base.txt download translations and collect static assets
Operator-facing commands with known users (Operators: ACTION REQUIRED)
These replacements are production-ready as of May 7th, for Redwood.
| Module |
Known Users |
Before |
After |
| assets |
Ansible, Devstack |
paver update_assets |
npm run build && ./manage.py lms collectstatic --noinput && ./manage.py cms collectstatic |
| assets |
None |
paver process_xmodule_assets |
No longer needed - no replacement |
| assets |
Tutor, pavelib |
paver compile_sass |
npm run compile-sass |
| assets |
pavelib |
./manage.py [lms/cms] compile_sass |
npm run compile-sass |
| assets |
pavelib |
paver webpack |
npm run webpack |
| assets |
Devstack |
paver watch_assets |
npm run watch |
| prereqs |
Ansible, Devstack, pavelib |
paver install_prereqs |
pip install -r requirements/edx/base.txt -r requirements/edx/assets.txt && npm clean-install |
| prereqs |
pavelib |
paver install_node_prereqs |
npm clean-install |
| prereqs |
pavelib |
paver uninstall_python_packages |
Will not be replaced |
| prereqs |
pavelib |
paver install_coverage_prereqs |
pip install -r requirements/edx/coverage.txt |
| prereqs |
pavelib |
paver install_python_prereqs |
pip install -r requirements/edx/base.txt |
Operator-facing commands without known users
These commands have been replaced for a long time. We don't know of any users of them, except the old Vagrant Devstack, which was deprecated 8 years ago.
| Module |
Before |
After |
| docs |
paver build_docs |
make docs |
| i18n |
paver i18n_validate_gettext |
which xgettext |
| i18n |
paver i18n_extract |
make extract_translations |
| i18n |
paver i18n_dummy |
i18n_tool dummy && i18n_tool generate |
| i18n |
paver i18n_generate |
i18n_tool generate |
| i18n |
paver i18n_generate_strict |
i18n_tool generate --strict |
| i18n |
paver i18n_clean |
make clean_translations |
| servers |
paver check_settings |
None |
| servers |
paver lms |
./manage.py lms runserver |
| servers |
paver studio |
./manage.py cms runserver |
| servers |
paver run_all_servers |
tutor local ... |
| servers |
paver devstack |
tutor dev ... |
Internal CI commands
These commands are only used by the upstream openedx project for CI. They will replaced before Sumac. Operators do not need to take action.
| Module |
Replacement Status |
Before |
After |
| quality |
This is a no-op |
paver find_fixme |
Remove |
| quality |
Need to implement |
paver run_eslint |
eslint |
| quality |
Need to implement |
paver run_stylelint |
make stylelint_js |
| quality |
Need to implement |
paver run_xsslint |
make xsslint |
| quality |
Need to implement |
paver run_pii_check |
make pii_check |
| quality |
Need to implement |
paver check_keywords |
make check_keywords |
| quality |
Ready to use |
paver run_quality |
Remove |
| quality |
Ready to use |
paver run_pylint |
pylint |
| quality |
Need to implement |
paver run_pep8 |
pycodestyle |
| js_test |
Need to implement |
paver diff_coverage |
make diff_coverage_js |
| js_test |
Need to implement |
paver test_js |
make test_js |
| js_test |
Need to implement |
paver test_js_run |
make test_js |
| js_test |
Need to implement |
paver test_js_dev |
make test_js MODE=browser |
Django settings for Asset commands (Operators: ACTION REQUIRED)
In order to reimplement the Paver Asset commands without Python/Django, we are changing how several settings are configured.
The following Django settings are becoming read-only mirrors. If you override them now, remove your overrides:
- LMS:
STATIC_ROOT (a string, loaded from STATIC_ROOT_LMS env var)
COMPREHENSIVE_THEME_DIRS (loaded from the env var, parsed into a list of strings)
- CMS:
STATIC_ROOT (a string, loaded from STATIC_ROOT_CMS env var)
COMPREHENSIVE_THEME_DIRS (loaded from the env var, parsed into a list of strings)
The following Django settings are being removed. If you override them now, remove your overrides:
- LMS:
STATIC_ROOT_BASE
WEBPACK_CONFIG_PATH
JS_ENV_EXTRA_CONFIG
- CMS:
STATIC_ROOT_BASE
WEBPACK_CONFIG_PATH
JS_ENV_EXTRA_CONFIG
The following new environment variables are available. Set these in your environment, in place of the overrides you removed above:
STATIC_ROOT_LMS (path)
STATIC_ROOT_CMS (path)
COMPREHENSIVE_THEME_DIRS (colon-separated paths)
WEBPACK_CONFIG_PATH (path)
JS_ENV_EXTRA_CONFIG (serialized as json)
Note: If you previously set the STATIC_ROOT_BASE Django setting to /blah, then you should now set the LMS and CMS environment variables as so:
STATIC_ROOT_LMS=/blah
STATIC_ROOT_CMS=/blah/studio
Deprecation
In time for Redwood, deprecation warnings will be added to all edx-platform Paver Asset commands.
Removal
### Tasks/PRs
- [ ] https://github.com/openedx/edx-platform/issues/31624
- [ ] https://github.com/openedx/edx-platform/pull/31810
- [ ] https://github.com/openedx/edx-platform/pull/31934
- [ ] https://github.com/openedx/edx-platform/pull/31790
- [ ] https://github.com/openedx/edx-platform/pull/32717
- [ ] https://github.com/openedx/edx-platform/pull/32767
- [ ] https://github.com/openedx/edx-platform/pull/32804
- [ ] https://github.com/openedx/edx-platform/pull/32823
- [ ] https://github.com/openedx/edx-platform/pull/32866
- [ ] https://github.com/openedx/edx-platform/pull/34318
- [ ] https://github.com/openedx/edx-platform/pull/34468
- [ ] https://github.com/openedx/edx-platform/pull/34554
- [ ] https://github.com/overhangio/tutor/pull/1042
- [ ] https://github.com/openedx/edx-platform/pull/34829
- [ ] https://github.com/openedx/edx-platform/pull/34830
- [ ] https://github.com/openedx/edx-platform/issues/34845
- [ ] https://github.com/overhangio/tutor/pull/1178
- [ ] https://github.com/openedx/edx-platform/issues/36025
- [ ] https://github.com/openedx/edx-platform/pull/36046
- [ ] https://github.com/openedx/edx-platform/pull/35741
- [ ] https://github.com/openedx/edx-platform/pull/34832
- [ ] https://github.com/openedx/studio-frontend/pull/399
- [ ] https://github.com/openedx/edx-documentation/pull/2314
ℹ️ This DEPR ticket considers the Paver commands in two groups:
Timeline
Communicated
Operator-facing commands: 2023-03-08 (thread)
Internal CI commands: 2024-05-01 (thread)
Acceptance
Operator-facing commands: 2023-05-03
Internal CI commands: 2024-05-21
Replacement available
Operator-facing commands: 2024-05-07, Redwood
Internal CI commands: ~2024-11-09, early Teak (Target)
Earliest removal
Operator-facing commands: 2024-11-09, early Teak
Internal CI commands: as soon as replacement is available
Rationale
edx-platform historically handled its build scripts with paver:
Using paver has a few problems:
paverpackage, this means that we installlibsass-pythonin production, which takes 60+ seconds (!) to compile and install.For the Paver Asset commands in particular, more depth is provided in the 'Reimplement edx-platform static asset processing' ADR.
Replacement
pylint, etc.) when possible, Makefile targets otherwisepipMigration
To ease migration for Paver users, in Redwood, each Paver Asset command will simply proxy to its replacement command, and will raise a deprecation warning explaining the new command that it is running.
By Nov 9th 2024, operators will need to have switched to the new commands, taking the steps indicated below by ACTION REQUIRED.
Requirements (Operators: ACTION REQUIRED)
In Redwood and earlier, Paver and its dependencies were included in requirements/edx/base.txt
Starting in Sumac, these dependencies will be removed from requirements/edx/base.txt. Instead, operators will need to install:
Operator-facing commands with known users (Operators: ACTION REQUIRED)
These replacements are production-ready as of May 7th, for Redwood.
paver update_assetsnpm run build && ./manage.py lms collectstatic --noinput && ./manage.py cms collectstaticpaver process_xmodule_assetspaver compile_sassnpm run compile-sass./manage.py [lms/cms] compile_sassnpm run compile-sasspaver webpacknpm run webpackpaver watch_assetsnpm run watchpaver install_prereqspip install -r requirements/edx/base.txt -r requirements/edx/assets.txt && npm clean-installpaver install_node_prereqsnpm clean-installpaver uninstall_python_packagespaver install_coverage_prereqspip install -r requirements/edx/coverage.txtpaver install_python_prereqspip install -r requirements/edx/base.txtOperator-facing commands without known users
These commands have been replaced for a long time. We don't know of any users of them, except the old Vagrant Devstack, which was deprecated 8 years ago.
paver build_docsmake docspaver i18n_validate_gettextwhich xgettextpaver i18n_extractmake extract_translationspaver i18n_dummyi18n_tool dummy && i18n_tool generatepaver i18n_generatei18n_tool generatepaver i18n_generate_stricti18n_tool generate --strictpaver i18n_cleanmake clean_translationspaver check_settingspaver lms./manage.py lms runserverpaver studio./manage.py cms runserverpaver run_all_serverstutor local ...paver devstacktutor dev ...Internal CI commands
These commands are only used by the upstream openedx project for CI. They will replaced before Sumac. Operators do not need to take action.
paver find_fixmepaver run_eslinteslintpaver run_stylelintmake stylelint_jspaver run_xsslintmake xsslintpaver run_pii_checkmake pii_checkpaver check_keywordsmake check_keywordspaver run_qualitypaver run_pylintpylintpaver run_pep8pycodestylepaver diff_coveragemake diff_coverage_jspaver test_jsmake test_jspaver test_js_runmake test_jspaver test_js_devmake test_js MODE=browserDjango settings for Asset commands (Operators: ACTION REQUIRED)
In order to reimplement the Paver Asset commands without Python/Django, we are changing how several settings are configured.
The following Django settings are becoming read-only mirrors. If you override them now, remove your overrides:
STATIC_ROOT(a string, loaded fromSTATIC_ROOT_LMSenv var)COMPREHENSIVE_THEME_DIRS(loaded from the env var, parsed into a list of strings)STATIC_ROOT(a string, loaded fromSTATIC_ROOT_CMSenv var)COMPREHENSIVE_THEME_DIRS(loaded from the env var, parsed into a list of strings)The following Django settings are being removed. If you override them now, remove your overrides:
STATIC_ROOT_BASEWEBPACK_CONFIG_PATHJS_ENV_EXTRA_CONFIGSTATIC_ROOT_BASEWEBPACK_CONFIG_PATHJS_ENV_EXTRA_CONFIGThe following new environment variables are available. Set these in your environment, in place of the overrides you removed above:
STATIC_ROOT_LMS(path)STATIC_ROOT_CMS(path)COMPREHENSIVE_THEME_DIRS(colon-separated paths)WEBPACK_CONFIG_PATH(path)JS_ENV_EXTRA_CONFIG(serialized as json)Note: If you previously set the
STATIC_ROOT_BASEDjango setting to/blah, then you should now set the LMS and CMS environment variables as so:STATIC_ROOT_LMS=/blahSTATIC_ROOT_CMS=/blah/studioDeprecation
In time for Redwood, deprecation warnings will be added to all edx-platform Paver Asset commands.
Removal
In edx-platform:
Elsewhere in the openedx GitHub org:
In Tutor: