]> 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:22:12 +0000 (18:22 +0000)
commit646a2f2c80056a33c70efd760446832f90899247
tree9222b370785e54104ca88f9ec90d24c4d716e046
parentfe07f30df6fe263938b1f898ffffc354c4ff470c
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
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