When we tried upgrading Jenkins workers from Ubuntu 16.04 to 20.04, `diff-cover` started silently failing with a return code of `1`. We suspect this is due to https://github.com/Bachmann1234/diff_cover/issues/153 , so we're adding the workaround described in that ticket.
The requirements/edx/private.txt file is for dev's own private package
needs. There are two installation mechanisms in edx-platform, and
neither handled the file properly:
- `paver install_prereqs` had the wrong file name. The file was moved
almost three years ago, and paver wasn't kept up.
- `make requirements` used `private.*` which included private.in, which
pip-sync balks at.
On missing sass directory, the following kind of warning was printed:
Sass dir '[{'sass_source_dir': path('lms/static/sass'), 'css_destination_dir': Path('/openedx/themes/indigo/lms/static/css'), 'lookup_paths': [Path('/openedx/themes/indigo/lms/static/sas│.. s/partials'), path('lms/static/sass/partials'), path('lms/static/sass')]}, {'sass_source_dir': Path('/openedx/themes/indigo/lms/static/sass'), 'css_destination_dir': Path('/openedx/themes│. /indigo/lms/static/css'), 'lookup_paths': [Path('/openedx/themes/indigo/lms/static/sass/partials'), path('lms/static/sass/partials'), path('lms/static/sass')]}, {'sass_source_dir': Path('│ /openedx/themes/indigo/lms/static/certificates/sass'), 'css_destination_dir': Path('/openedx/themes/indigo/lms/static/certificates/css'), 'lookup_paths': [Path('/openedx/themes/indigo/lms│ /static/sass/partials'), Path('/openedx/themes/indigo/lms/static/sass')]}]' does not exists, skipping sass compilation for '/openedx/themes/indigo'
Which was rather inconvenient. Instead, we now print the following
warning:
Sass dir '/openedx/themes/indigo/lms/static/certificates/sass' does not exists, skipping sass compilation for '/openedx/themes/indigo'
This should solve the problem of getting `nodejs: not found` when
running `paver test_js_run -s lms` in lms-shell, which cropped up in
the past few days.
I don't know why this stopped working recently, but I don't have `nodejs`
on my recently re-created devstack, and some people with an older devstack
have both. Maybe a recent node.js release got rid of an alias.
Part of the notifier service deprecation (DEPR-106).
Also removed pdfminer from the package uninstall list, since we no longer install the package it conflicts with either.
enum34 is causing problems in python3.8 tests of edx-platform because it has incompatibility with recent versions of python, the error the error happens while importing the re module in these python versions.
This library is a backport of enum of python3.4 made for python<3.4, therefore is not needed anymore.
edx-val was updated to remove that dependency: https://github.com/edx/edx-val/pull/245
* Fix all stylelint errors
For any errors that fixing would require changing the output of the css disable stylelint for that line instead of modifying.
* Update quality.py
Make stylelint quality check pass when there are no errors
* Delete empty selectors
'npm install' command execution was changed from paver.easy.sh()
to subprocess.Popen() in commit 0dd13fad1b,
but exception handling was not updated accordingly. Due to this,
errors in 'npm install' execution were not detected.
Fixed the most frequently occurring deprecation warnings, which were causing over half of the 34,140 deprecation warnings raised during the unit tests:
* `Use of .. or absolute path in a resource path is not allowed and will raise exceptions in a future release` - most of these were due to a single mis-configured resource path with a leading slash.
* `count is deprecated. Use Collection.count_documents instead.` - I added a handful of simple workarounds for this pymongo deprecation that shouldn't increase the query counts
Also did some cleanup of unused code in pavelib after the recent split of the new `i18n_compilejs` command from `i18n_dummy`. (This had caused a diff-quality failure on the first commit.)
This patch adds compilejs
management command to be executed
on pull translations enabling
availability of js/jsx translations
for lms/cms code.
PROD-960
Unpin several more outdated dependencies whose changelogs don't contain any significant backwards incompatible changes. Also add "moto" to the list of packages to uninstall from existing environments, since it requires a jsondiff version that clashes with the one we now use (triggering a harmless but distracting warning on dependency updates).
We can potentially stop using path.py/path altogether by switching to pathlib in the Python 3 standard library, but that merits a separate PR of its own.
Also, note that I'm not actually unpinning freezegun; different PRs restricted it in both constraints.txt and test.in, I'm just removing the latter redundant constraint.
* Added pytest-json-report plugin
- modifying app-opts in setup.cfg
- adding hook to all conftest.py files in repo
- setting report to be saved to test_root/log/warnings.json
- Writing custom logic to save json report to avoid overwrite if pytest called twice
This was created to allow us to easily parse through test warnings in jenkins