[PATCH 1/2] REST: Don't error if a versioned field we would remove is absent

Stephen Finucane stephen at that.guru
Thu Oct 28 03:00:34 AEDT 2021


On Fri, 2021-10-22 at 08:28 -0400, Konstantin Ryabitsev wrote:
> On Fri, 20 Aug 2021 at 17:59, Stephen Finucane <stephen at that.guru> wrote:
> > > We remove fields that shouldn't be seen on old versions of the API.
> > > This was done with `pop(field name)`, which will throw an exception
> > > if the named field is absent from the data. However, sometimes if
> > > a patch request is via an old API version, we hit this line without
> > > ever having the field present.
> > > 
> > > This is odd, but not harmful and we definitely shouldn't 500.
> > > 
> > > Fixes: d944f17ec059 ("REST: Use versioning for modified responses")
> > > Signed-off-by: Daniel Axtens <dja at axtens.net>
> > 
> > Looks good to me.
> > 
> > Reviewed-by: Stephen Finucane <stephen at that.guru>
> > 
> > I squashed the test into this (with a tweak in the name) and applied it.
> 
> Hi, all:
> 
> Could this please be backported to stable/2.2 and maybe released as 2.2.6?
> 
> -K

Hey,

v2.2.6 is available now. Let me know if there are any issues.

Somewhat related: are there any large blockers preventing you moving to v3.0.x?
Is it the major version bump or removal of Python 2.7 support that's preventing
the upgrade, or is there something else? In particular, is there anything that
we could address? I'd like to get v3.1.0 out before the end of year but I'm
slightly concerned that no one (?) has rolled forward to v3.0.x yet :D

Cheers,
Stephen




More information about the Patchwork mailing list