Page MenuHomeSoftware Heritage

Fix tests due to some dependencies upgrade
ClosedPublic

Authored by anlambert on May 18 2021, 12:34 PM.

Details

Summary

Recent swh-web dependencies upgrade broke the tests:

  • pip new resolver and its backtracking process now ends up installing pybadges 1.0 instead of pybadges 2.2.1 (I did not look at the details but some transitive dependencies must have pinned pybadges version)
  • django-webpack-loader 1.0 got released, it expects a JSON schema for the webpack stats file different than in previous releases

That diff fixes all new errors that were raised since these depencencies upgrade.

django-webpack-loader 1.0 is not packaged in debian and will surely be not distributed in buster
so we will have to package it ourselves (T3330).

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D5746 (id=20546)

Rebasing onto a33f56e5ff...

Current branch diff-target is up to date.
Changes applied before test
commit b613c2c6952a65349f6fdd4c4e94ba5d4af5f19a
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue May 18 12:14:28 2021 +0200

    assets: Migrate to django-webpack-loader 1.0
    
    django-webpack-loader 1.0 got freshly released so remove the custom
    webpack plugin that was fixing the generated JSON stats file schema
    as it is no longer needed and now produces errors.
    
    Also update the mocked webpack stats files schema in conftest.py
    (used when running python tests while no static assets have been
    generated).

commit 8cc739269d83aaec5e4382e157035fdb171bda4f
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue May 18 11:21:55 2021 +0200

    requirements: Pin pybadges version to >= 2.2.1
    
    Due to pip new dependency resolver and its backtracking process,
    pybages 1.0 now gets installed instead of its latest version,
    resulting in mypy errors.
    
    So pin pybadges version to be >= 2.2.1 in requirements file.

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/830/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/830/console

Harbormaster returned this revision to the author for changes because remote builds failed.May 18 2021, 12:43 PM
Harbormaster failed remote builds in B21523: Diff 20546!
anlambert edited the summary of this revision. (Show Details)

Build is green

Patch application report for D5746 (id=20546)

Rebasing onto a33f56e5ff...

Current branch diff-target is up to date.
Changes applied before test
commit b613c2c6952a65349f6fdd4c4e94ba5d4af5f19a
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue May 18 12:14:28 2021 +0200

    assets: Migrate to django-webpack-loader 1.0
    
    django-webpack-loader 1.0 got freshly released so remove the custom
    webpack plugin that was fixing the generated JSON stats file schema
    as it is no longer needed and now produces errors.
    
    Also update the mocked webpack stats files schema in conftest.py
    (used when running python tests while no static assets have been
    generated).

commit 8cc739269d83aaec5e4382e157035fdb171bda4f
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue May 18 11:21:55 2021 +0200

    requirements: Pin pybadges version to >= 2.2.1
    
    Due to pip new dependency resolver and its backtracking process,
    pybages 1.0 now gets installed instead of its latest version,
    resulting in mypy errors.
    
    So pin pybadges version to be >= 2.2.1 in requirements file.

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/831/ for more details.

douardda added a subscriber: douardda.

tests are green, so it should be ok I guess

This revision is now accepted and ready to land.May 18 2021, 1:02 PM