Re: [PATCH 7/9] parser: avoid an unnecessary UPDATE of Person

2018-02-21 Thread Andrew Donnellan
not if it has a new name. Django is not smart enough to figure that out, and so unconditionally UPDATEs the model when asked to save. Give it a hand - only update the model and save it if the new name is in fact different. Signed-off-by: Daniel Axtens Reviewed-by: Andrew Donnellan Though, just

Re: [PATCH 6/9] parser: close a TOCTTOU bug on Person creation

2018-02-21 Thread Andrew Donnellan
the race, by catching the IntegrityError and fetching the winning Person model. Signed-off-by: Daniel Axtens LGTM apart from one comment below Reviewed-by: Andrew Donnellan --- patchwork/parser.py| 32 ++-- patchwork/tests/test_parser.py | 37

Re: [PATCH 0/9] Tools and fixes for parallel parsing

2018-02-21 Thread Andrew Donnellan
1 Core(s) per socket: 4 Socket(s): 1 NUMA node(s):1 Vendor ID: GenuineIntel CPU family: 6 Model: 60 Model name: Intel(R) Xeon(R) CPU E3-1220 v3 @ 3.10GHz -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com

Re: [PATCH 5/9] parser: Handle even more exotically broken headers

2018-02-21 Thread Andrew Donnellan
ix a hilarious* python bug that this exposes: whitespace-only headers cause an index error! Signed-off-by: Daniel Axtens Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited __

Re: [PATCH 4/9] tools/scripts: parallel_parsearchive - load archives in parallel

2018-02-21 Thread Andrew Donnellan
will work fine though... (Also, who was it that said Greenspun's tenth rule, but with GNU parallel?) One comment below, with that fixed: Reviewed-by: Andrew Donnellan --- tools/scripts/parallel_parsearchive.sh | 55 ++ 1 file changed, 55 insertions(+) create

Re: [PATCH 3/9] tools/scripts: split a mbox N ways

2018-02-21 Thread Andrew Donnellan
aniel Axtens A few comments below. Reviewed-by: Andrew Donnellan --- tools/scripts/split_mail.py | 76 + 1 file changed, 76 insertions(+) create mode 100755 tools/scripts/split_mail.py diff --git a/tools/scripts/split_mail.py b/tools/sc

Re: [PATCH 2/9] debugging: add command to dump patches and series

2018-02-21 Thread Andrew Donnellan
, reload files ... python3 manage.py debug_dump > file2 diff -u file file2 Signed-off-by: Daniel Axtens Don't know if "debug_dump" is the best name but I guess it's descriptive enough and I can't think of anything better off the top of my head. Revie

Re: [PATCH 1/9] tools/docker: assume terminal supports utf-8

2018-02-21 Thread Andrew Donnellan
On 22/02/18 01:17, Daniel Axtens wrote: Set PYTHONIOENCODING to UTF-8, which allows Python3 to print UTF-8 directly to the terminal (to a pipe or shell-redirected file) rather than throwing an error. Signed-off-by: Daniel Axtens Reviewed-by: Andrew Donnellan -- Andrew Donnellan

Re: [PATCH 0/9] Tools and fixes for parallel parsing

2018-02-21 Thread Andrew Donnellan
this is probably the way to go, but it's worth noting that as always I'm not at OzLabs any more :) incorrect, you're no longer at *IBM* any more ;) -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited

Re: [PATCH 0/9] Tools and fixes for parallel parsing

2018-02-21 Thread Andrew Donnellan
y just backport this to ozlabs.org after this gets a bit of review. -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork

Re: patchwork.ozlabs.org down, and e-mails not recorded

2018-02-16 Thread Andrew Donnellan
ll patches were properly recorded. The problem is frequent enough that we would have noticed. We have, anecdotally, noticed some regressions in database performance in patchwork 2.0 which might increase the likelihood of hitting race conditions. Hmm. -- Andrew Donnellan OzLab

Re: [PATCH] [RFC] Don't aim to have patchwork send email

2018-02-15 Thread Andrew Donnellan
on of the mailing list for now. Signed-off-by: Daniel Axtens Reviewed-by: Andrew Donnellan More broadly: should Patchwork move in the direction of being more than a status tracker? I think there's some interesting tools that could be developed to make the life of a developer easier when i

Re: patchwork.ozlabs.org down, and e-mails not recorded

2018-02-13 Thread Andrew Donnellan
re more info next time this happens. Many apologies for the inconvenience! Andrew -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork

Re: Testing of patches on this list

2018-02-06 Thread Andrew Donnellan
-cloud-provider for having a free tier of VMs for us to run our tests with... Andrew -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited ___ Patchwork mailing list Patchwork@lists.ozlabs.org h

Testing of patches on this list

2018-02-06 Thread Andrew Donnellan
e we switch this on for LinuxPPC... Apologies for the noise on the list as we tested this setup! Thanks to Joel Stanley for helping us with Jenkins setup, and a certain bookstore-turned-cloud-provider for having a free tier of VMs for us to run our tests with... Andrew -- Andrew Donnellan

Re: patchwork.ozlabs.org down, and e-mails not recorded

2018-02-06 Thread Andrew Donnellan
if there's anything obviously wrong with that particular message ID - it appears to parse fine. jk, any idea whether there's something particular about the ozlabs.org instance that could be causing it to drop these patches? -- Andrew Donnellan OzLabs, ADL Canberra

[PATCH v5] Test patch, please ignore

2018-02-05 Thread Andrew Donnellan
Final one! I promise! Signed-off-by: Andrew Donnellan --- patchwork/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/patchwork/models.py b/patchwork/models.py index 3bf7c72dbe08..f786a6107357 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -442,6 +442,7 @@ class Patch

Re: [PATCH v4] Test patch, please ignore

2018-02-05 Thread Andrew Donnellan
Apologies for all the noise, you'll know why soon :) On 06/02/18 17:53, Andrew Donnellan wrote: Signed-off-by: Andrew Donnellan --- patchwork/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/patchwork/models.py b/patchwork/models.py index 3bf7c72dbe08..f786a6107357 100644

[PATCH v4] Test patch, please ignore

2018-02-05 Thread Andrew Donnellan
Signed-off-by: Andrew Donnellan --- patchwork/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/patchwork/models.py b/patchwork/models.py index 3bf7c72dbe08..f786a6107357 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -442,6 +442,7 @@ class Patch(SeriesMixin

[PATCH v3] Test patch, please ignore

2018-02-05 Thread Andrew Donnellan
Signed-off-by: Andrew Donnellan --- patchwork/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/patchwork/models.py b/patchwork/models.py index 3bf7c72dbe08..a41a5d882cca 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -442,6 +442,7 @@ class Patch(SeriesMixin

[PATCH v2] Test patch, please ignore

2018-02-05 Thread Andrew Donnellan
Signed-off-by: Andrew Donnellan --- patchwork/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/patchwork/models.py b/patchwork/models.py index 3bf7c72dbe08..a41a5d882cca 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -442,6 +442,7 @@ class Patch(SeriesMixin

[PATCH] Test patch, please ignore

2018-02-05 Thread Andrew Donnellan
Signed-off-by: Andrew Donnellan --- patchwork/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/patchwork/models.py b/patchwork/models.py index 3bf7c72dbe08..a41a5d882cca 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -442,6 +442,7 @@ class Patch(SeriesMixin

Re: [PATCH v2] parser: Fix parsing of pull request emails with CRLF line endings on Python 2

2018-01-28 Thread Andrew Donnellan
On 29/01/18 12:41, Daniel Axtens wrote: From: Andrew Donnellan When using Python 2, an incoming email that uses CRLF line endings won't have the line endings converted by the email parser. This means that the regex to detect pull request emails will fail to match. Clean up the line en

Re: [PATCH] parser: Fix parsing of pull request emails with CRLF line endings on Python 2

2018-01-18 Thread Andrew Donnellan
On 19/01/18 00:24, Stephen Finucane wrote: On Tue, 2018-01-09 at 23:56 +, Stephen Finucane wrote: On Tue, 2018-01-09 at 12:01 +1100, Andrew Donnellan wrote: On 09/01/18 11:56, Daniel Axtens wrote: diff --git a/patchwork/parser.py b/patchwork/parser.py index 1568bc4..7c677db 100644 --- a

Re: [PATCH] parser: Handle 'git-request-pull' mails from Git 2.14.3

2018-01-17 Thread Andrew Donnellan
Reviewed-by: Andrew Donnellan On 18/01/18 06:39, Stephen Finucane wrote: Make the regex case insensitive to catch both 'git' and 'Git'. Signed-off-by: Stephen Finucane Fixes: #159 --- patchwork/parser.py| 2 +- .../mail/0017-git-pul

Re: Lost pull requests...

2018-01-17 Thread Andrew Donnellan
ew days ago (which I need to resubmit) - Thunderbird also saves with CRLF line endings. -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited ___ Patchwork mailing list Patchwork@lists.ozlabs.org http

Re: [PATCH v2] models, templatetags: Make tag count column in patch list optional per tag

2018-01-08 Thread Andrew Donnellan
On 19/12/17 16:32, Andrew Donnellan wrote: Add a field, show_column, to the Tag model to determine whether the tag gets a tag count column in the patch list view. This allows the creation of tags that will be collated when generating mboxes but won't take up space in the patch list. N

Re: [PATCH] parser: Fix parsing of pull request emails with CRLF line endings on Python 2

2018-01-08 Thread Andrew Donnellan
ontent) +content = content.replace('\r\n', '\n') Shouldn't this go before the removal of signatures? Good point -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited ___ Patchwor

Re: [PATCH] parser: Fix parsing of pull request emails with CRLF line endings on Python 2

2018-01-07 Thread Andrew Donnellan
On 08/01/18 18:49, Andrew Donnellan wrote: On 08/01/18 18:46, Andrew Donnellan wrote: When using Python 2, an incoming email that uses CRLF line endings won't have the line endings converted by the email parser. This means that the regex to detect pull request emails will fail to match.

Re: [PATCH] parser: Fix parsing of pull request emails with CRLF line endings on Python 2

2018-01-07 Thread Andrew Donnellan
On 08/01/18 18:46, Andrew Donnellan wrote: When using Python 2, an incoming email that uses CRLF line endings won't have the line endings converted by the email parser. This means that the regex to detect pull request emails will fail to match. Clean up the line endings when we extrac

[PATCH] parser: Fix parsing of pull request emails with CRLF line endings on Python 2

2018-01-07 Thread Andrew Donnellan
email parser policy fixes this for us at the initial email parsing stage.) Add a test pull request mbox with CRLF line endings to ensure we don't regress. Closes: #148 ("Parsing pull request emails broken on Python 2") Signed-off-by: Andrew Donnellan ---

Re: patchwork.ozlabs.org down, and e-mails not recorded

2018-01-07 Thread Andrew Donnellan
patchwork logs myself - jk, any thoughts? -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork

[PATCH] docs/development: Fix tox invocation for listing targets

2018-01-04 Thread Andrew Donnellan
Signed-off-by: Andrew Donnellan --- docs/development/contributing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/contributing.rst b/docs/development/contributing.rst index 0cab79e..8988c9f 100644 --- a/docs/development/contributing.rst +++ b/docs

Re: Adding custom tags like bugzilla id to patches

2018-01-03 Thread Andrew Donnellan
but through api?? * display tags on patch webpage Thoughts? Cheers, Don -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozl

Re: Adding custom tags like bugzilla id to patches

2018-01-02 Thread Andrew Donnellan
sh_tag_counts). Not sure if bugzilla id fits in that model? What exactly would you want to do with these tags - expose them through the filter interface? -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited _

[PATCH] templates: Add click-to-copy patch ID ("mpe mode") to patch detail page

2017-12-19 Thread Andrew Donnellan
Similar to what we already do on the patch list page, display the patch ID on the patch detail page and make it a click-to-copy button. Closes: #115 ("Show copy-able patch ID ("mpe mode") on patch detail page") Signed-off-by: Andrew Donnellan --- patchwork

Re: [PATCH] views: Don't render token section of user profile if REST API disabled

2017-12-18 Thread Andrew Donnellan
On 19/12/17 16:41, Andrew Donnellan wrote: In profile.html, if settings.ENABLE_REST_API == False, trying to render a link to the generate_token page will raise a NoReverseMatch exception, so we shouldn't render that. In any case, if the REST API is disabled, we really shouldn't rend

[PATCH] views: Don't render token section of user profile if REST API disabled

2017-12-18 Thread Andrew Donnellan
nly render the API token and generation link if settings.ENABLE_REST_API is True. Cc: stable Reported-by: Tomas Novotny Closes: #138 ("NoReverseMatch exception on user login with disabled REST API") Fixes: 85c8f369204a ("views: Provide a way to view, (re)generate tokens") S

[PATCH v2] models, templatetags: Make tag count column in patch list optional per tag

2017-12-18 Thread Andrew Donnellan
rrent behaviour by default. Suggested-by: Michael Ellerman Closes: #142 ("Ability to add tags that don't also have a column in the UI") Signed-off-by: Andrew Donnellan --- v1->v2: - fix 80 column limit in models.py - add the correct migration file that I intended to add...

Re: Continuous integration with buildbot

2017-12-18 Thread Andrew Donnellan
iling list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork

[PATCH] models, templatetags: Make tag count column in patch list optional per tag

2017-12-18 Thread Andrew Donnellan
rrent behaviour by default. Suggested-by: Michael Ellerman Closes: #142 ("Ability to add tags that don't also have a column in the UI") Signed-off-by: Andrew Donnellan --- patchwork/fixtures/default_tags.xml | 5 - patchwork/migrations/0021_tag

Re: [PATCH] RFC: Monkey-patch Django performance bug

2017-12-18 Thread Andrew Donnellan
On 26/09/17 15:37, Andrew Donnellan wrote: Currently looking at this. For the ozlabs.org case, I'm also looking at getting the patch backported straight into Debian. Asked around on IRC - it seems that upstream's backporting policy is quite restrictive when it comes to anything

Re: [PATCH] xmlrpc/patch_list: only fetch required fields

2017-12-18 Thread Andrew Donnellan
; = 2 AND "patchwork_patch"."state_id" = 1) ORDER BY "patchwork_submission"."date" ASC These appear to be a result of pwclient list operations. We *do not* need content/headers/diff in this case - so do not fetch them as it is incredibly expensive - querie

Re: [PATCH] RFC: Monkey-patch Django performance bug

2017-12-18 Thread Andrew Donnellan
Stack land at least). I can chase this up if no one else fancies doing it. I am also happy to add this to the documentation until that happens. Currently looking at this. For the ozlabs.org case, I'm also looking at getting the patch backported straight into Debian. -- A

[PATCH] views: Fix "Add to bundle" dropdown on patch list view

2017-08-30 Thread Andrew Donnellan
ottom of patch list page") Signed-off-by: Andrew Donnellan --- jk: if you could apply this to ozlabs.org would be much appreciated --- patchwork/views/patch.py | 4 1 file changed, 4 insertions(+) diff --git a/patchwork/views/patch.py b/patchwork/views/patch.py index c447b1c..7e962

Re: Patchwork v2.0.0 Available

2017-08-30 Thread Andrew Donnellan
amp;d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=-pHOU8dm1U-U1crivyxKr_-xvZrIBB8YUqvA3el0Ee0&m=aHV9QJsmxD7kAqZCdTgsOolAKc8lPk7EsmvpyXbwRHc&s=A51SSqtGLCddDiwJxV4ZX_ZCFLW6o2ZzcI-lGU297us&e= -- Andrew Donnellan OzLabs, ADL C

Re: Patchwork v2.0.0 Available

2017-08-27 Thread Andrew Donnellan
On 28/08/17 10:02, David Miller wrote: I cannot change the state of any patch, which means I can't get any work done at all today. I've tried to log out and log back in again, same problem. Now that jk has fixed user login, I can change the state of my patches fine. -- Andrew

Re: Patchwork v2.0.0 Available

2017-08-27 Thread Andrew Donnellan
On 27/08/17 21:37, Jeremy Kerr wrote: OK, we're back up now. Please let me know if anything looks amiss. I'm seeing a 500 immediately upon login at https://patchwork.ozlabs.org/user/... -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Austral

Re: Welcoming a new maintainer: Daniel Axtens

2017-08-26 Thread Andrew Donnellan
. He was a massive help in getting 2.0 out of the door, and I look forward to continuing to work with him on future improvements over the coming months and years. Thanks, Daniel! Daniel is a 100% excellent person and I'm sure he'll be an excellent maintainer too. Thanks for all your wor

Re: [PATCH 1/2] models: Fix invocation of refresh_tag_counts() for Comments

2017-08-21 Thread Andrew Donnellan
On 21/08/17 00:40, Andrew Donnellan wrote: In Comment.save() and Comment.delete(), we always call Submission.refresh_tag_counts(), which is an empty stub, rather than calling Patch.refresh_tag_counts() if the Submission is a Patch. As such, tag counts are never updated on incoming comments

[PATCH 1/2] models: Fix invocation of refresh_tag_counts() for Comments

2017-08-20 Thread Andrew Donnellan
x27;s useless, and in Comment.save()/delete(), invoke Patch.refresh_tag_counts() directly when the submission is a Patch. Reported-by: David Demelier Fixes: 86172ccc161b ("models: Split Patch into two models") Closes-bug: #111 ("A/R/T not updated on comments") Signed

[PATCH 2/2] tests: Add test for updating tag counts in patch comments

2017-08-20 Thread Andrew Donnellan
We accidentally broke the updating of tag counts for tags in comments, and we didn't notice for quite a while. Add a test for this. Signed-off-by: Andrew Donnellan --- patchwork/tests/test_parser.py | 37 ++--- 1 file changed, 34 insertions(+), 3 dele

Re: Patchwork 2.0 ready for takeoff? (redux)

2017-07-26 Thread Andrew Donnellan
hwork.dja family of sites to master, assuming nothing goes wrong in the next couple of days we should be OK to release. Sounds good to me. Thanks again, Daniel. Stephen ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listin

Re: [PATCH 1/3] parse(mail|archive): handle early fail within email module

2017-07-03 Thread Andrew Donnellan
On 04/07/17 05:45, Stephen Finucane wrote: On Mon, 2017-07-03 at 15:32 +1000, Andrew Donnellan wrote: On 03/07/17 15:31, Andrew Donnellan wrote: So we should report this bug upstream, but we should also merge this fix to work around it. Oh, and this fix is, obviously: Reviewed-by: Andrew

Re: [PATCH 1/3] parse(mail|archive): handle early fail within email module

2017-07-02 Thread Andrew Donnellan
On 03/07/17 16:04, Daniel Axtens wrote: I'm up to my eyeballs in kernel networking code, so I'd really appreciate that. My envy for your current circumstances is limited... Will do that this evening. -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ib

Re: [PATCH 1/3] parse(mail|archive): handle early fail within email module

2017-07-02 Thread Andrew Donnellan
On 03/07/17 15:31, Andrew Donnellan wrote: So we should report this bug upstream, but we should also merge this fix to work around it. Oh, and this fix is, obviously: Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM

Re: [PATCH 1/3] parse(mail|archive): handle early fail within email module

2017-07-02 Thread Andrew Donnellan
ultipartContentTransferEncodingDefect. So we should report this bug upstream, but we should also merge this fix to work around it. dja - I'm happy to write this up and file it if you haven't already? Andrew -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@

Re: [PATCH 2/3] parser: limit emails and names to 255 chars

2017-07-02 Thread Andrew Donnellan
Reviewed-by: Andrew Donnellan On 01/07/17 14:28, Daniel Axtens wrote: Also picked up with afl-fuzz. Signed-off-by: Daniel Axtens --- patchwork/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patchwork/parser.py b/patchwork/parser.py index 37603f944150

Re: [PATCH 10/10] [RFC] Fuzzing harness

2017-06-29 Thread Andrew Donnellan
On 30/06/17 15:37, Daniel Axtens wrote: Ah yes, sorry, you do. I just downloaded it into the source dir and set PATH so py-afl-fuzz could find it. apt-get install --no-install-recommends afl works too :) -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM

Re: [PATCH 10/10] [RFC] Fuzzing harness

2017-06-29 Thread Andrew Donnellan
docker/entrypoint.sh /usr/local/bin/entrypoint.sh +RUN apt-get install -y cython cython3; pip3 install python-afl; pip install python-afl + Do you need afl-fuzz itself as well? -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia L

Re: [PATCH 08/10] parse(mail|archive): handle early fail within email module

2017-06-28 Thread Andrew Donnellan
rn + try: result = parse_mail(mail, options['list_id']) if result: -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork

Re: [PATCH 07/10] parser: Don't pass a message-id longer than 255 chars to the db

2017-06-28 Thread Andrew Donnellan
On 28/06/17 17:48, Daniel Axtens wrote: The db limit is 255: we need to make sure we don't pass anything longer in or it will throw an exception. Signed-off-by: Daniel Axtens Reviewed-by: Andrew Donnellan --- patchwork/parser.py | 6 -- 1 file changed, 4 insertions(+), 2 dele

Re: [PATCH 06/10] parser: better date parsing

2017-06-28 Thread Andrew Donnellan
except block. Regardless, Reviewed-by: Andrew Donnellan --- patchwork/parser.py | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/patchwork/parser.py b/patchwork/parser.py index 203e11584504..80450c2e4860 100644 --- a/patchwork/parser.py +++ b/patchwork

Re: [PATCH 05/10] parser: deal with headers entirely failing to parse

2017-06-28 Thread Andrew Donnellan
() should return None, and thus clean_header() should return None. We then need to plumb that through. Signed-off-by: Daniel Axtens All looks good Reviewed-by: Andrew Donnellan --- patchwork/parser.py | 70 + 1 file changed, 55 insertions

Re: [PATCH 04/10] parser: catch failures in decoding headers

2017-06-28 Thread Andrew Donnellan
On 28/06/17 17:48, Daniel Axtens wrote: Headers can fail to decode: - if a part cannot be encoded as ascii - if the coding hint names a codec that doesn't exist - if there's a null byte in the codec name Catch these errors. Signed-off-by: Daniel Axtens Reviewed-by: Andrew

Re: [PATCH 03/10] parser: codec lookup fails when a NUL (\x00) is in the name

2017-06-28 Thread Andrew Donnellan
Reviewed-by: Andrew Donnellan --- patchwork/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patchwork/parser.py b/patchwork/parser.py index 3ab4eb3d2011..19ed7ca4e315 100644 --- a/patchwork/parser.py +++ b/patchwork/parser.py @@ -436,7 +436,7 @@ def _find_content

Re: [PATCH 02/10] parser: don't assume headers are strings

2017-06-28 Thread Andrew Donnellan
ng email due to 'ignore' hint") return @@ -870,7 +870,7 @@ def parse_mail(mail, list_id=None): # parse metadata -msgid = mail.get('Message-Id').strip() +msgid = clean_header(mail.get('Message-Id')).strip() author = find_author(mail) subject = mail.get('Subject') name, prefixes = clean_subject(subject, [project.linkname]) -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork

Re: [PATCH 01/10] parser: fix charset 'guessing' algorithm

2017-06-28 Thread Andrew Donnellan
Reviewed-by: Andrew Donnellan On 28/06/17 17:48, Daniel Axtens wrote: The charset guessing algorithm doesn't work if it has to guess multiple charsets, as it overwrites the payload with None. Signed-off-by: Daniel Axtens --- patchwork/parser.py | 5 +++-- 1 file changed, 3 insertions(

Re: [PATCH] Remove ResourceWarnings under Py3

2017-06-28 Thread Andrew Donnellan
On 28/06/17 16:55, Daniel Axtens wrote: This is just a matter of correctly closing files we open. Signed-off-by: Daniel Axtens Reviewed-by: Andrew Donnellan --- patchwork/management/commands/parsearchive.py | 1 + patchwork/tests/test_management.py| 2 ++ patchwork/tests

Re: Check API - permissions/authorisation

2017-06-15 Thread Andrew Donnellan
I users somewhere in the frontend, rather than requiring admins. But yes, I get your point. Personally, I think we can keep things as they are now and look towards 2.1 _if_ this is requested by real world Patchwork maintainers. Until then, as before, YAGNI. Agreed. -- Andrew Donnellan

Re: Check API - permissions/authorisation

2017-06-14 Thread Andrew Donnellan
t, he wasn't overly concerned if we required the user to be a maintainer for the time being, it's a bit annoying to have to ask the patchwork admin to add a new maintainer though. -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limi

Re: [PATCH RFC] events-api: allow filtering by date

2017-06-14 Thread Andrew Donnellan
should be noted that my motivation for this is to implement a git-pw event poll command for CI integration. If you think there's a better way of achieving this, let me know. You should check out Snowpatch: Andrew Donnellan and Russell Currey (on this list) are the developers.

Re: [PATCH 3/5] REST: Enable token auth support

2017-06-13 Thread Andrew Donnellan
authenticate to API endpoints. Enable this support and add some tests to validate correct behavior. Signed-off-by: Andrew Donnellan Signed-off-by: Stephen Finucane Changes from my RFC (that I spotted on first reading): * add token property on Person * add tests * split out regenerate_token

Re: [PATCH 2/5] htdocs: Add clipboard.js

2017-06-13 Thread Andrew Donnellan
-tested code. Signed-off-by: Stephen Finucane One comment below Reviewed-by: Andrew Donnellan --- We should probably look at integrating Django Compressor in a future release, as the number of JS files we have is slowly increasing. Work for v2.1.0. --- htdocs/README.rst

Re: [PATCH 5/5] docs: Document token auth support

2017-06-13 Thread Andrew Donnellan
Acked-by: Andrew Donnellan On 10/06/17 03:25, Stephen Finucane wrote: Signed-off-by: Stephen Finucane --- docs/api/rest.rst | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/docs/api/rest.rst b/docs/api/rest.rst index 8c8fd95..3d7292e 100644 --- a

Re: [PATCH 3/5] REST: Enable token auth support

2017-06-12 Thread Andrew Donnellan
authenticate to API endpoints. Enable this support and add some tests to validate correct behavior. Signed-off-by: Andrew Donnellan Signed-off-by: Stephen Finucane Thanks for respinning this, was meaning to do so this coming week but you beat me to it! Will review the rest of the series

Re: [RFC PATCH] REST: enable token authentication

2017-05-29 Thread Andrew Donnellan
On 30/05/17 16:26, Russell Currey wrote: What exactly does BA get used for at the moment? REST requests that update status, e.g. sending a PATCH request on a patch to change status from "new" to "under-review", or something like that. -- Andrew Donnellan

Re: [PATCH 3/4] parser: allow to handle multiple projects under the same list

2017-05-29 Thread Andrew Donnellan
projects, though from a CI perspective I think we're adequately served already. Andrew -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork

Re: [RFC PATCH] REST: enable token authentication

2017-05-28 Thread Andrew Donnellan
On 27/05/17 09:32, Philippe Pepiot wrote: Thanks for adding this ! Aside my comments below, I tested a bit and it worked fine. Thanks for the review, I'll fix all those comments in the next version. -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com

Re: [PATCH 2/2] tests: Add tests for viewing private bundles

2017-05-28 Thread Andrew Donnellan
need some adjustments if we switch to token auth. -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork

[RFC PATCH] REST: enable token authentication

2017-05-25 Thread Andrew Donnellan
x27;s token support and add options to the user profile view to view or regenerate tokens. Signed-off-by: Andrew Donnellan --- This is an RFC; I haven't written any tests or documentation, UI's a bit ugly, need to split patches. --- patchwork/settings/base.py | 6 ++

[PATCH] docs/api: change POST to PATCH in REST API parameters example

2017-05-25 Thread Andrew Donnellan
api/rest.rst gives an example of how to POST parameters to the PatchDetail view at api/patches/. However, the endpoint in question doesn't support POST - you need to use PUT or PATCH. Change it to PATCH. Signed-off-by: Andrew Donnellan --- I have no idea whether it's *meant* to su

[PATCH 1/2] bundle: Fix use of basic auth for bundle mboxes

2017-05-25 Thread Andrew Donnellan
check whether request.user is actually the bundle owner. Found by code inspection. Fixes: 0b4f508a8438 ("views: Allow use of basic auth for bundle mboxes") Signed-off-by: Andrew Donnellan --- Given this is a (very, very, very minor) security issue, this should land in the 2.0 rele

[PATCH 2/2] tests: Add tests for viewing private bundles

2017-05-25 Thread Andrew Donnellan
Add some tests to check that owners can view their private bundles while other authenticated users can't. Signed-off-by: Andrew Donnellan --- I'm not very familiar with writing Django tests, please flame away --- patchwork/tests/test_bundl

[PATCH] docker: increase database connection timeout

2017-05-24 Thread Andrew Donnellan
slow computers with slow mechanical hard drives which take just a bit longer. Increase the second timeout from 15 seconds to 60 seconds, testing every 5 seconds. Cc: Daniel Axtens Signed-off-by: Andrew Donnellan --- tools/docker/entrypoint.sh | 9 +++-- 1 file changed, 7 insertions(+), 2 dele

Re: Rate Limiting

2017-05-03 Thread Andrew Donnellan
lve the problems you have, not the problems you wish you had" - I think we can probably survive without rate limiting until there's a non-negligible number of REST API consumers out there / someone starts complaining. :) But when you say "very high" default limit

Re: [PATCH v2] REST: allow fetching of subject prefixes

2017-02-21 Thread Andrew Donnellan
ff-by: Daniel Axtens Reviewed-by: Andrew Donnellan --- v2: call them prefixes rather than categories, only expose in detail view --- patchwork/api/patch.py | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/patchwork/api/patch.py b/patchwork/api/patch.py

Re: [PATCH] REST: allow fetching of subject prefixes (categories)

2017-02-21 Thread Andrew Donnellan
On 21/02/17 16:16, Daniel Axtens wrote: We could possibly move this into the detail view. Andrew or Russell: would that work for you? That's fine by me. -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Li

Re: [PATCH] REST: allow fetching of subject prefixes (categories)

2017-02-14 Thread Andrew Donnellan
e 'name' field, right? What extra functionality would this give us other than slight simplification of the client side code (though maybe that's enough of a win by itself)? Making life easier for clients usually is a win in and of itself :) But additionally it'

Re: [PATCH] REST: allow fetching of subject prefixes (categories)

2017-02-13 Thread Andrew Donnellan
you can do this for non-model fields though... At the moment, no. The use case is our CI system where we want to be able to take each patch one by one and figure out which tree to apply it to. So we don't need to filter on categories/prefixes. I think it would be useful to implement regardl

Re: [PATCH 4/6] views: Add 'series' parameter to '/mbox' endpoint

2017-02-02 Thread Andrew Donnellan
that later on in the series. :) ACK, I want this in the API. -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/lis

Re: Pagination

2017-01-05 Thread Andrew Donnellan
urposes? Alas I didn't get to the series API patches before you merged them, sorry! Am reviewing/testing v3 of the filter series currently. -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork

Pagination (was: Re: [PATCH 1/3] REST: Integrate django-filter support)

2016-12-11 Thread Andrew Donnellan
On 21/11/16 14:17, Andrew Donnellan wrote: On 21/11/16 11:39, Russell Currey wrote: Do you know if there's a way to get a reverse ordering of entries in the REST API? For example in the patches API each "page" has 30 entries, and you can get the latest page with ?page=last - bu

Re: [PATCH] views: Add List-Id to mbox

2016-12-11 Thread Andrew Donnellan
On 11/12/16 22:39, Thomas Monjalon wrote: The List-Id header is retrieved from the Project object. Fixes #53 Signed-off-by: Thomas Monjalon Reviewed-by: Andrew Donnellan --- patchwork/views/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/patchwork/views/__init__.py b

Re: [PATCH v2 06/13] REST: Stop using ViewSets

2016-11-23 Thread Andrew Donnellan
ValueError, Project.DoesNotExist): +query.get(linkname=self.kwargs['pk']) + This should be: +if 'pk' in self.kwargs: +try: +query = query.filter(id=int(self.kwargs['pk'])) +except (ValueError, Project.D

Re: [PATCH] views: don't duplicate tags in patch message when generating mbox

2016-11-22 Thread Andrew Donnellan
On 23/11/16 18:01, Andrew Donnellan wrote: When generating an mbox for a patch with tags in the original commit message, e.g.: Example patch This patch is awesome! Signed-off-by: Andrew Donnellan Acked-by: Russell Currey the tags from the original email are duplicated

[PATCH] views: don't duplicate tags in patch message when generating mbox

2016-11-22 Thread Andrew Donnellan
When generating an mbox for a patch with tags in the original commit message, e.g.: Example patch This patch is awesome! Signed-off-by: Andrew Donnellan Acked-by: Russell Currey the tags from the original email are duplicated: Example patch This patch is awesome

Re: [PATCH 1/3] REST: Integrate django-filter support

2016-11-20 Thread Andrew Donnellan
ring of ids or dates. Do you know if there's a way to do this at present, or is that something that could be made available with filters? I'd be kinda tempted to consider using cursor pagination for this, which Django REST Framework supports. That's not a filter-related

Re: [PATCH 1/3] REST: Integrate django-filter support

2016-11-20 Thread Andrew Donnellan
of this patch. Same comments apply here though. -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork

Re: [RFC 1/2] REST: Integrate django-filter support

2016-11-20 Thread Andrew Donnellan
jango-debug-toolbar==1.5 python-dateutil>2.0,<3.0 selenium>2.0,<3.0 djangorestframework>=3.4,<3.5 -drf-nested-routers>=0.11.1,<0.12 Why are we removing this here? +django-filter>=0.15,<0.16 -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel..

<    1   2   3   >