odoo / runbot

115 stars 133 forks source link

Question: Should runbot for builds in Odoo-14.0 use py3.8 like odoo.sh? #414

Closed moylop260 closed 3 years ago

moylop260 commented 3 years ago

The CI Runbot is using py3.6 for builds of Odoo 14.0 But Odoo.sh is using py3.8

It could gets green results in runbot but red ones in live production odoo.sh

Should they use the same version? Are there plans to homologue the python version for both environments?

OCA, and other companies, including Vauxoo are taking decisions about our QA process depending of the answer. More info in the following thread:

What do you think @xmo-odoo @odony @d-fence ?

Thanks in advance!

odony commented 3 years ago

tl;dr: the purpose of Odoo.sh CI and the official Runbot are different, so it's natural that the Python version may diverge, no guarantee there.


Long version:

For Odoo.sh and SaaS deployment we generally use common sense: we run the version of Python that is shipped with the latest Ubuntu LTS at the time of the release, because that's what we deploy on. We expect it to be the most stable and the most widely run version for our users. For v13 that was Python 3.6, and for v14 that's Python 3.8 (which those cowboys recently upgraded from 3.8.2 to 3.8.5 overnight, causing a huge mess... so much for stability :roll_eyes:).

So because Odoo.sh CI is supposed to verify that your code works on Odoo.sh, it's logical that the Python version will be the same as the deployment environment. For more specifics you might want get @amigrave or @Icallhimtest into the discussion, I may have gotten that wrong.

On the Odoo Runbot side, the goal is different. We should ideally test all supported Python versions for each series. But we don't have the infrastructure for that now, so we have to settle for an acceptable common ground, which is currently Python 3.6 (it works from v11 to v14).

However there are plans from @Xavier-Do and @d-fence to support multiple versions, which means we may one day test 12.0 on P3.5, 13.0 on P3.6, or even multi-test 14.0 on 3.6, 3.7 and 3.8. And then the sky is the limit :rocket: But nothing is final yet, that's the R in R&D, and it also requires some computing resources :grin:

But why should you care about this? For the OCA I can't imagine any other option than to support all the same Python versions that are supported by the matching Odoo version. Anything else would just cause issues for your users. Sorry about that ;-)

As for a general policy on what version of Python we want to officially support, I'd like to point to another discussion. Our common sense rule: what's the broadest compatibility we can offer for cheap with reasonable risk? As a rule of thumb we will need to stay compatible from the baseline version specified in the documentation up to (at least) the latest Python version shipped in Debian/Ubuntu LTS at the time of release (because we deploy on that!). So for v14 that means from Python 3.6 to Python 3.8.

PS: don't get @xmo-odoo started on Python 3.9 ^^

moylop260 commented 3 years ago

Thank you for answer Olivier Regards!

amigrave commented 3 years ago

A little precision about Odoo.sh:

Odoo v14 uses the python3.8 interpreter on Odoo.sh because it's the interpreter shipped with ubuntu 20.04 system images and we set this image by default for new Odoo v14 projects.

We are currently fixing some dependencies issues then we will unlock the possibility for our users to upgrade the system images from ubuntu 18.04 to 20.04, when done we will have Odoo v13 instances running on python3.8. Another scenario could be Odoo v13 projects migrating to Odoo v14 on Odoo.sh, in such case the system image will remain 18.04 (until upgraded by the user) hence those Odoo v14 projects will run python 3.6.

moylop260 commented 3 years ago

@amigrave

Thank you for reply.

Ok, I understand that move following the obsolete timeline.

2021-12 py3.6 will be obsolete

I have a new question, py3.6 🔴 will be obsolete soon py3.7 🟡 is not available in Ubuntu LTS versions (used for odoo)

Why Odoo-14.0 is supporting py3.6 🔴, py3.7 🟡... and py3.8 🟢 ?

amigrave commented 3 years ago

@moylop260 The end of life of python 3.6 (from the PSF) does not mean that the LTS of Debian/Ubuntu is voided. Ubuntu 18.04 will get supports until April 2023 hence for Odoo.sh it does not change anything. That said we will do our best to ease project transition on Odoo.sh from 18.04 to 20.04 like we did from 16.04 to 18.04 in the past. Actually most projects could be upgraded without any problems.

Concerning Odoo I can't speak on behalf or the R&D but I don't see any feature in 3.7 or 3.8 that would be worth breaking the wider compatibly (3.6 - 3.8) possible at the moment.

odony commented 3 years ago

Why Odoo-14.0 is supporting py3.6, py3.7... and py3.8?

Again, common sense. It's the broadest compatibility we could offer for a small cost.

Debian 10 has Python 3.7 and is the current "Debian stable" in 2020. And since v13.0 worked on 3.6 and there was no significant feature we wanted in 3.7, there was no good reason to break compatibility with 3.6.

And indeed, Python deprecation plans are irrelevant as long as there is distrib support. That's another benefit for matching requirements with Debian & Ubuntu LTS: free maintenance ;-)