Page MenuHomeSoftware Heritage

Pin test requirements pytest < 7.0
Closed, MigratedEdits Locked

Description

Since fairly recently, our builds (if not all) are broken [1].

This is due to two external pytest modules we are using that are importing private
pytest modules that were removed:

  • pytest-postgresql < 4.0.0
  • pytest-redis

The issue has been fixed in pytest-postgresql >= 4.0.0 but not in pytest-redis yet.
Currently we cannot use pytest-postgresql >= 4.0.0 as it now uses psycopg3 but our
codebase is still based on psycopg2.

To currently work around this, we started pinning some of our modules. This task tracks
the remaining work to do the same on the remaining broken modules.

[1] https://jenkins.softwareheritage.org/view/swh-draft/

Event Timeline

ardumont triaged this task as High priority.Feb 7 2022, 4:14 PM
ardumont created this task.
ardumont renamed this task from Fix jenkins builds by pinning pytest < 7.0 to Pin test requirements pytest < 7.0.Feb 7 2022, 4:21 PM

Some more details about why the tests are failing since the release of pytest 7.0.0,
this is due to two external pytest modules we are using that are importing private
pytest modules that were removed:

  • pytest-postgresql < 4.0.0
  • pytest-redis

The issue has been fixed in pytest-postgresql >= 4.0.0 but not in pytest-redis yet.
Currently we cannot use pytest-postgresql >= 4.0.0 as it now uses psycopg3
but our codebase is still based on psycopg2.

So looks like that pytest version pinning will stay here for a while.

Thanks for giving some more details.

We started pinning other of our dependencies (e.g. mypy). That sounds like the proper
tradeoff to avoid some more surprises (extra maintenance work out of the current weekly
plan because of some new dependency upstream release evolved and broke our base code).

Thaty means we'll have to actually dedicate tasks to once in a while evolve those
versions though.

@anlambert i've edited the description with your details, thx again.

All builds are now ok with this.
So closing.

Note: Deposit is still failing for another unrelated reason (so no need to block for this).

ardumont claimed this task.