]> git.ipfire.org Git - thirdparty/patchwork.git/commit
REST: Null out previous, current relation info
authorStephen Finucane <stephen@that.guru>
Sun, 29 Nov 2020 12:50:22 +0000 (12:50 +0000)
committerStephen Finucane <stephen@that.guru>
Sun, 13 Dec 2020 18:32:03 +0000 (18:32 +0000)
commit1ea8b10264f66833da921055947f8431cf831179
tree7a3b0ad100005c50b1e648b0c19f8a0a2a6249df
parenta8492f0e2ba3ca783c1b7748ad3d9b204372acf4
REST: Null out previous, current relation info

These fields don't work like we expect them to. Because we're linking to
a non-idempotent entity, an instance of 'relation', what we're storing
in either of these fields is subject to change as patches are added and
removed. This makes the information pretty much useless after the fact.
It's best to just state the patch and request that people query the
information themselves if necessary. We don't want to remove the field
entirely from the API - that would be a truly breaking change - so
instead we null it out like we do for patch tags. In a v2 API (i.e. a
major version bump) we can remove this entirely.

A small bug with the schema generation is corrected.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Related: #379
(cherry picked from commit 646a2f2c80056a33c70efd760446832f90899247)
docs/api/schemas/patchwork.j2
docs/api/schemas/v1.1/patchwork.yaml
docs/api/schemas/v1.2/patchwork.yaml
patchwork/api/event.py
patchwork/signals.py
patchwork/tests/test_events.py