Bug 13684 - Patchwork instance is python2; needs to be updated to newer Django version (patchwork-fdo is now Django 2.2 LTS)
Summary: Patchwork instance is python2; needs to be updated to newer Django version (p...
Status: RESOLVED OBSOLETE
Alias: None
Product: Patchwork/Patchtest
Classification: Yocto Project Subprojects
Component: Patchwork (show other bugs)
Version: 5.99
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 4.99
Assignee: Changqing Li
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-12-05 16:18 UTC by Tim Orling
Modified: 2022-06-08 22:23 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments
local commit of patchwork (4.66 KB, application/octet-stream)
2019-12-25 05:44 UTC, Changqing Li
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Orling 2019-12-05 16:18:37 UTC
Our fork of the Freedesktop fork is currently running on Python 2.7 [1]. Upstream patchwork-fdo has recently been updated all the way to Django 2.2 LTS [2], which is Python 3 (only).

The patches we have on top of the Freedesktop fork need to be investigated to see whether they can be rebased on top of latest patchwork-fdo. Or whether the funtionality our patches added can be upstreamed or is already present in the patchwork-fdo repo.

FWIW, things have deviated too much from the original ozlabs patchwork, so any effort to move to "mainline" patchwork is probably fruitless and should be discouraged.

[1] http://git.yoctoproject.org/cgit/cgit.cgi/patchwork/tree/tox.ini
[2] https://gitlab.freedesktop.org/patchwork-fdo/patchwork-fdo/commit/bb22eebae419e27be0f617f2e5ebb8bf6af86bfc
Comment 1 Tim Orling 2019-12-05 16:35:09 UTC
The "shortest" path, might be updating to Django 1.11 LTS, which does have Python 3 support. Looking at our fork, I have not yet found what commit from patchwork-fdo we started with.
Comment 2 Changqing Li 2019-12-25 05:44:06 UTC
Created attachment 4608 [details]
local commit of patchwork
Comment 3 Changqing Li 2019-12-25 05:44:48 UTC
@Randy

I rebased patchwork to lastest upstream patchwork-fdo,  after rebase, patchwork instance can startup success,  I do below simple operation:
1. create projects   --- seems work well
2. load one series for one of projects ---work well
3. view patch.html
4. view series.html

for step3 and step4,  some of the function we add locally not work maybe since there is too much gap, the layout of web is changed.  And as I see, most of the work need to work with css/js/html,  but unfortunately, I don't have too much knowledge about frontend. So I think it is better to assign this to who is good at this, in this way,  it is possible to rebase current patchwork to lastest upstream patchwork-fdo.



I have attached the local_commit for refer.
Comment 4 Randy MacLeod 2020-02-21 17:22:50 UTC
Paul,
Would you be able to take over this defect from here or could you help Sandy with it?
Comment 6 Tim Orling 2020-06-09 08:56:37 UTC
We have ~50 commits on top of the fork. These will have to be gone through one by one to see whether the equivalent is already upstream, whether it is functionality upstream would accept, or whether it is a feature specific to us that we cannot live without and we need to carry the technical debt.

As an example of likely upstream friendly change (which we would have trouble living without):

models.py: Mark patches as superseded when receiving a new revision
http://git.yoctoproject.org/cgit/cgit.cgi/patchwork/commit/?id=6bc63d14d298ad97cf1ea3c9439c1fbad081878b

Upstream patchwork-fdo has many many commits on top of where we forked. It appears that it will be much less work to try to rebase our changes on top of their tree than the other way around. But upstreaming our changes would be even better.
Comment 7 Tim Orling 2020-06-09 09:30:06 UTC
Upstream commit count since we forked:
git rev-list d8a74c39..HEAD | wc -l
166

Yocto commit count since we forked:
git rev-list 855a5db..HEAD | wc -l
45 since we forked:
Comment 8 Tim Orling 2020-06-09 09:33:48 UTC
Correction:
Yocto commit count since we forked:
git rev-list d8a74c39..HEAD | wc -l
49
Comment 9 Richard Purdie 2022-06-08 22:23:53 UTC
We moved to upstream patchwork