patchwork - reducing your patch workload · patchwork basics patches parsed from mailing list...

39
Patchwork: reducing your patch workload Jeremy Kerr <[email protected]>

Upload: others

Post on 04-Oct-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

Patchwork: reducing your patch workload

Jeremy Kerr<[email protected]>

Page 2: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

patchwork.ozlabs.org

patchwork.kernel.org

Page 3: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

Patchwork basics

● Patches parsed from mailing list● Maintainer updates state

● Depending on patch review● Patch flow is tracked

Page 4: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

Patch flow

Page 5: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

“Todo list” for maintainers

Page 6: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

Patch flow

Page 7: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

Status updates for contributors

Page 8: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

Slightly-hidden features

Page 9: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

pwclient

Page 10: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

$ pwclient list -n 4ID State Name-- ----- ----44602 Rejected Configure WSGI to pass HTTP authorization44603 New De-hyphenate Git commands44605 Accepted Add a simple sample Git post-receive hook44606 Accepted Decode patch from UTF-8 while parsing

Page 11: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

$ pwclient list -n 4ID State Name-- ----- ----44602 Rejected Configure WSGI to pass HTTP authorization44603 New De-hyphenate Git commands44605 Accepted Add a simple sample Git post-receive hook44606 Accepted Decode patch from UTF-8 while parsing

$ pwclient get 44603Saved patch to De-hyphenate-Git-commands.patch

Page 12: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

$ pwclient list -n 4ID State Name-- ----- ----44602 Rejected Configure WSGI to pass HTTP authorization44603 New De-hyphenate Git commands44605 Accepted Add a simple sample Git post-receive hook44606 Accepted Decode patch from UTF-8 while parsing

$ pwclient get 44603Saved patch to De-hyphenate-Git-commands.patch

$ git am De-hyphenate-Git-comands.patch

Page 13: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

$ pwclient list -n 4ID State Name-- ----- ----44602 Rejected Configure WSGI to pass HTTP authorization44603 New De-hyphenate Git commands44605 Accepted Add a simple sample Git post-receive hook44606 Accepted Decode patch from UTF-8 while parsing

$ pwclient get 44603Saved patch to De-hyphenate-Git-commands.patch

$ git am De-hyphenate-Git-comands.patch

$ pwclient update -s Accepted 44603

Page 14: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

Patch hashes

● pwparser --hash < some.patch● Generates a hash of some.patch

● pwclient update -h <hash> …● Updates patchwork patch with hash <hash>

Page 15: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

# Patchwork “catchup” script

git rev-list rev1..rev2 |while read commitdo h=$(git show $commit | pwparser –hash)

pwclient update -s Accepted -h $hdone

Page 16: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

X-Patchwork-Hint: ignore

Page 17: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

New stuff

Page 18: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked
Page 19: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

xmlrpc: do slice before patch_to_dict Currently, we map patch_to_dict before we slice the results (to only return max_count patches). This means that we have to retrieve all patches, then throw away most of the results of the map. This change does the slice on the patches before the map, letting django do a LIMIT-ed query instead. Signed-off-by: Jeremy Kerr <[email protected]>

--- a/apps/patchwork/views/xmlrpc.py+++ b/apps/patchwork/views/xmlrpc.py@@ -328,7 +328,7 @@ def patch_list(filter={}): patches = Patch.objects.filter(**dfilter) if max_count > 0:- return map(patch_to_dict, patches)[:max_count]+ return map(patch_to_dict, patches[:max_count]) else: return map(patch_to_dict, patches)

Page 20: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

From: Patch Author <[email protected]>

Page 21: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

X-Patchwork-State: RFC

Page 22: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

X-Patchwork-State: rejected

Page 23: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

X-Patchwork-Delegate: [email protected]

Page 24: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

Feature requests

Page 25: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

Invalid encoding handling

Page 26: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

Current encoding handling● Parser reads encoding from mail headers

● Aborts on invalid byte sequences

Page 27: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

A charset unification patch● Removes a line in iso-8895-1

● Adds a line in utf-8

Page 28: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

Patches as binary data● Invalid encodings are flagged, not dropped

Page 29: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

Patches as binary data● How do we display patches?

● How do we indicate encoding errors?

Page 30: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

Notification suppression

Page 31: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

Multiple patch targets

Page 32: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

What would help reduce your backlog?

Page 33: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

Development

Page 34: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

git://git.ozlabs.org/home/jk/git/patchwork

Page 35: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

$ createdb patchwork$ ./manage.py syncdb$ ./manage.py runserver

Page 36: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

docs.djangoproject.com

Page 37: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

$ ./manage.py test patchwork

Page 38: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

ozlabs.org/~jk/projects/patchwork/[email protected]

Page 39: Patchwork - reducing your patch workload · Patchwork basics Patches parsed from mailing list Maintainer updates state Depending on patch review Patch flow is tracked

Thank you.