Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

Add Python 3.9 to Synapse tests #104

Closed
callahad opened this issue Oct 27, 2020 · 7 comments · Fixed by #119
Closed

Add Python 3.9 to Synapse tests #104

callahad opened this issue Oct 27, 2020 · 7 comments · Fixed by #119

Comments

@callahad
Copy link
Contributor

callahad commented Oct 27, 2020

Synapse supports Python 3.9.

We should probably have some tests to make sure it stays that way.

Right now our pipeline yields a test matrix like this:

Twisted Trial:

3.5 3.6 3.7 3.8 3.9
Sqlite ✅¹
Postgres 9.5
Postgres 9.6
Postgres 10
Postgres 11
Postgres 12
Postgres 13

¹: Also includes an additional olddeps variant

Sytest:

3.5 3.6 3.7 3.8 3.9
Sqlite 💧
Postgres 9.5
Postgres 9.6 💧💦
Postgres 10
Postgres 11 💦²
Postgres 12 💧
Postgres 13

💧: Monolith
💦: Multiple Workers
²: Also includes an additional with redis variant

Synapse Port DB:

3.5 3.6 3.7 3.8 3.9
Sqlite
Postgres 9.5
Postgres 9.6
Postgres 10
Postgres 11
Postgres 12
Postgres 13

This raises all kinds of questions (Do we really need all of those Postgres versions? And why those specific ones, when upstream is up to 13.0?)... but more immediately, where should Python 3.9 fit in here?

Seems like there are holes for Twisted Trial runs with:

  • Py 3.8 + Sqlite
  • Py 3.9 + Sqlite
  • Py 3.9 + Postgres ?.?

But what about Sytest?

@callahad
Copy link
Contributor Author

Input from @matrix-org/synapse-core would be appreciated.

@clokep
Copy link
Member

clokep commented Oct 28, 2020

This raises all kinds of questions (Do we really need all of those Postgres versions? And why those specific ones, when upstream is up to 13.0?)... but more immediately, where should Python 3.9 fit in here?

A bit of data is that 9.5 is the earliest maintained version that still receives security updates. I also think PostgreSQL changed their versioning recently to more aggressively update the major version number. Do we have an earliest version of PostgreSQL we support? I'm not sure if we use specific features.

@erikjohnston
Copy link
Member

We require 9.5 or later

@callahad
Copy link
Contributor Author

Looks like I mistranscribed pg versions numbers in the tables above; fixed.

There's a hole where we're not testing anything against Postgres 10, nor the recently released 13 -- I've added those (and Python 3.9) to the tables to give a more complete picture.

@callahad
Copy link
Contributor Author

I'm wondering if our Postgres testing strategy should just target the oldest supported (py3.5 + pg9.5) and newest supported (py3.9 + pg13) combinations. Is there much value in scattershot testing of the intermediate Postgres versions?

Similar question on the sqlite side: Should we run the Trial tests on every supported Python version, or just our oldest + newest?

@richvdh
Copy link
Member

richvdh commented Oct 28, 2020

I think we started out testing oldest supported and newest supported, and then python 3.8 and pg12 came along so we just added more jobs to test that.

There are enough differences between python versions that I would advocate testing all of them in the range in some form: there have been instances where we end up with stuff that works on 3.5 and 3.7 but not 3.6.

@anoadragon453
Copy link
Member

I agree with testing intermediate python versions, though not sure we need to do the same for postgres. Oldest and newest postgres sounds like a fine tradeoff for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants