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

2018-01-09 Thread Stephen Finucane
On Tue, 2018-01-09 at 18:15 +1100, Andrew Donnellan wrote: > 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

Re: Events for new comments for a patch series?

2018-01-09 Thread Stephen Finucane
On Thu, 2018-01-04 at 12:31 -0500, Don Zickus wrote: > On Thu, Jan 04, 2018 at 02:30:04PM +, Stephen Finucane wrote: > > On Mon, 2017-12-18 at 16:23 -0500, Don Zickus wrote: > > > Hi, > > > > > > I was playing with the events REST API interface and realized how > > > convenient the 'series-com

Re: [PATCH 1/4] Modify sections used in release notes

2018-01-09 Thread Stephen Finucane
On Sun, 2017-12-10 at 17:30 +, Stephen Finucane wrote: > Add an 'api' section and remove 'security' and 'issues'. The former > will helps us group REST API related changes, while the latter are > not currently used and are unlikely to ever be used. > > Signed-off-by: Stephen Finucane All fou

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

2018-01-09 Thread Stephen Finucane
On Fri, 2018-01-05 at 13:33 +1100, Andrew Donnellan wrote: > Signed-off-by: Andrew Donnellan Whoops. Reviewed-by: Stephen Finucane ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork

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

2018-01-09 Thread Stephen Finucane
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/patchwork/parser.py > > > +++ b/patchwork/parser.py > > > @@ -666,9 +666,13 @@ def clean_

Re: [PATCH v2] parser: Log when invalid project list-id passed

2018-01-09 Thread Stephen Finucane
On Thu, 2018-01-04 at 15:43 +, Stephen Finucane wrote: > I thought there was a bug. Turns out I was just using the wrong list- > id. > Make this clearer. > > Signed-off-by: Stephen Finucane Applied. ___ Patchwork mailing list Patchwork@lists.ozlab

[PATCH 1/6] gitignore: Ignore JSON files

2018-01-09 Thread Stephen Finucane
These are generated by the 'dumpdata' management command. Signed-off-by: Stephen Finucane --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 31fea23c..1d8b0735 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ htmlcov/ # Django stuff *.l

[PATCH 5/6] trivial: Fix some nits

2018-01-09 Thread Stephen Finucane
Signed-off-by: Stephen Finucane --- patchwork/signals.py | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/patchwork/signals.py b/patchwork/signals.py index e31ac2f3..e5e7370f 100644 --- a/patchwork/signals.py +++ b/patchwork/signals.py @@ -74,9 +7

[PATCH 2/6] trivial: Remove additional Django < 1.8 code

2018-01-09 Thread Stephen Finucane
This is no longer necessary, given that we don't support Django 1.6 or 1.7. This was missed in a previous patch. Signed-off-by: Stephen Finucane --- patchwork/fields.py| 10 +--- patchwork/settings/base.py | 60 -- 2 files changed, 21 inser

[PATCH 3/6] signals: Don't call event creation code for fixtures

2018-01-09 Thread Stephen Finucane
If loading fixtures via the 'loaddata' management command, then it is unlikely that the signal handling code should execute. Disable it. Signed-off-by: Stephen Finucane --- patchwork/signals.py | 46 ++ 1 file changed, 26 insertions(+), 20 deletions(-)

[PATCH 0/6] Random cleanups

2018-01-09 Thread Stephen Finucane
A couple of things I noticed while working on a resolution for the '/events' performance issues. Stephen Finucane (6): gitignore: Ignore JSON files trivial: Remove additional Django < 1.8 code signals: Don't call event creation code for fixtures REST: Add 'mbox' to cover-letter response

[PATCH 6/6] REST: Make single-use function a staticmethod

2018-01-09 Thread Stephen Finucane
Signed-off-by: Stephen Finucane --- patchwork/api/patch.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/patchwork/api/patch.py b/patchwork/api/patch.py index 1922cf5b..115feffa 100644 --- a/patchwork/api/patch.py +++ b/patchwork/api/patch.py @@ -38,10 +38,6 @@

[PATCH 4/6] REST: Add 'mbox' to cover-letter response

2018-01-09 Thread Stephen Finucane
This should have been here in the first place. Not sure why it was missed. Signed-off-by: Stephen Finucane --- NOTE: We need to add API versioning before we can release this. That can come later. --- patchwork/api/embedded.py | 4 ++-- releasenotes/notes/cover-le

Re: [PATCH 0/6] Random cleanups

2018-01-09 Thread Stephen Finucane
On Wed, 2018-01-10 at 00:05 +, Stephen Finucane wrote: > A couple of things I noticed while working on a resolution for the > '/events' performance issues. Because these are all nits and block the thing I really care about, I've gone ahead and just applied them. Ping me if I missed something.

[RFC 0/4] Add 'Event.payload' field

2018-01-09 Thread Stephen Finucane
The '/event' API endpoint is really slow due to the amount of JOINs necessary to retrieve records from the database. Resolve this by a static JSON representation of any embedded data in the database. This has some disadvantages, noted in the patches, but the performance improvement is huge and user

[RFC 2/4] REST: Support embedded serializers without context

2018-01-09 Thread Stephen Finucane
The use of 'HyperlinkedIdentityField' in a serializer requires the presence of a request context so that it's possible to get URL information. In general, this is no issue. However, going forward, this will not be guaranteed. Support serialization without this information by simply setting this fie

[RFC 1/4] Automatically remove old events

2018-01-09 Thread Stephen Finucane
Events are created for most state changes in Patchwork which means they're fairly numerous. Start removing them after a (configurable) interval. Signed-off-by: Stephen Finucane --- docs/deployment/configuration.rst | 7 +++ docs/usage/overview.rst

[RFC 4/4] REST: Only fetch required fields event filtering

2018-01-09 Thread Stephen Finucane
The filter widget is pretty dumb, containing a full list of every patch in the system. We will want to rework this in the future, but for now just minimize the amount of data we're pulling in. Signed-off-by: Stephen Finucane --- patchwork/api/filters.py | 7 +++ 1 file changed, 7 insertions(

[RFC 3/4] models: Migrate event fields to JSON field

2018-01-09 Thread Stephen Finucane
This allows us to remove swathes of ForeignKeys and greatly speed up the '/events' endpoint. This comes at the disadvantage of preventing us indexing the embedded fields and would result in different responses if the serializers ever change; however, we don't do the former at the moment and it's un

Re: Poor performance of '/api/events'

2018-01-09 Thread Stephen Finucane
On Fri, 2017-11-24 at 11:12 +1100, Daniel Axtens wrote: > Stephen Finucane writes: > > > I've noticed some poor performance for > > 'patchwork.ozlabs.org/api/events' when > > accessed via a browser or fetched via cURL. I haven't seen similar > > issues on > > any other endpoint and I also can't s