Switch Treeherder from Python 2.7 to Python 3.6
Categories
(Tree Management :: Treeherder, defect, P2)
Tracking
(Not tracked)
People
(Reporter: emorley, Assigned: emorley)
References
Details
Attachments
(2 files, 1 obsolete file)
Assignee | ||
Comment 1•8 years ago
|
||
Comment 2•7 years ago
|
||
Assignee | ||
Comment 3•7 years ago
|
||
Assignee | ||
Comment 4•7 years ago
|
||
Assignee | ||
Comment 5•7 years ago
|
||
Assignee | ||
Comment 6•7 years ago
|
||
Assignee | ||
Comment 7•7 years ago
|
||
Assignee | ||
Comment 8•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Comment 9•7 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 10•6 years ago
|
||
There are now three bugs directly or indirectly blocked by this conversion work. Since it's only just over a year before Django 1.11 is EOL, I think we need to prioritise this soon - since we'll need to not only switch to Python 3, but also upgrade through 3 breaking change versions of Django to be on a supported release in that timeframe.
On the plus side, I believe this is now very close. I have a few WIP branches locally for some of the remaining issues, though hit some quirks wrt log parsing and line numbers not matching when using requests' decode_unicode=True in streaming mode.
Comment hidden (typo) |
Comment hidden (typo) |
Assignee | ||
Comment 13•6 years ago
•
|
||
Ah so it turns out that Celery doesn't yet support Python 3.7 (fix on celery master, not yet released: https://github.com/celery/celery/issues/4500), so we'll need to use Python 3.6 instead for now. Once they support Python 3.7, and we've had a chance to figure out the celery upgrade issue in bug 1337717, we can then upgrade.
This incompatibility didn't show up during tests likely due to bug 1349362. It could be seen via Papertrail in the form of:
app/worker_store_pulse_jobs.4: File "/app/.heroku/python/lib/python3.7/site-packages/celery/concurrency/prefork.py", line 20, in <module>
app/worker_store_pulse_jobs.4: from celery.concurrency.base import BasePool
app/worker_store_pulse_jobs.4: File "/app/.heroku/python/lib/python3.7/site-packages/celery/concurrency/base.py", line 21, in <module>
app/worker_store_pulse_jobs.4: from celery.utils import timer2
app/worker_store_pulse_jobs.4: File "/app/.heroku/python/lib/python3.7/site-packages/celery/utils/timer2.py", line 19
app/worker_store_pulse_jobs.4: from kombu.async.timer import Entry, Timer as Schedule, to_timestamp, logger
app/worker_store_pulse_jobs.4: ^
app/worker_store_pulse_jobs.4: SyntaxError: invalid syntax
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 14•6 years ago
|
||
A Python 3 compatible version of treeherder-client
will be released in bug 1529191.
Comment 15•6 years ago
|
||
Assignee | ||
Comment 16•6 years ago
|
||
Switch to Python 3 landed in:
https://github.com/mozilla/treeherder/commit/ff2993d2fb562676ab933e5dd3e5ddb4604f8d65
Comment 17•6 years ago
|
||
Assignee | ||
Comment 18•6 years ago
|
||
The switch to Python 3 was deployed to production at 08:12am UTC Thursday 21st.
No issues seen so far. Only notable change I've seen is a ~20% reduction in memory usage on certain worker dyno types, which is a welcome additional benefit :-)
Once this has been deployed for a bit longer, we'll remove Travis testing against Python 2, at which point this bug can be closed, and PRs opened for the bugs this one is marked as blocking.
Assignee | ||
Comment 19•6 years ago
|
||
Everything has been looking great on prod using Python 3 since last week.
Testing of Python 2 (for fallback purposes) removed in:
https://github.com/mozilla/treeherder/commit/a0d1f5fccfeb0a6cd6593d5017e4b70a8a191446
We're now fine to move on with the bugs that required we drop Python 2 support.
Description
•