Getting errors with Series support
Daniel Axtens
dja at axtens.net
Thu Nov 17 13:45:10 AEDT 2016
Hi Stephen,
> Secondly, we're not handling series revisions correctly when sent
> without a cover letter in-reply-to an existing series. Take something
> like this:
>
> [PATCH 1/2] My first patch
> [PATCH 2/2] My second patch
> [PATCH v2 1/2] My first patch
> [PATCH v2 2/2] My second patch
>
> When we receive these new patches, we'll traverse the references to find
> a stored SeriesReference objects [1]. This will match on a reference for
> the original patches and return the original series' Series object.
> Since this is actually a new series, the attempt to assign the revised
> patches to the original series hits the ('series', 'number') check and
> fails (note that this doesn't happen for series revisions sent *with* a
> cover letter because we don't traverse references for cover letters
> [2]). The easiest fix here would be to check the version of the Series
> returned by find_series. If it doesn't match, create a new series and
> store any new references against this new series, preventing further
> issues.
>
Will send an appropriate patch to do this.
> There's an issue we haven't seen yet but, as a variation of the above,
> is one likely to rear its malformed head sooner rather than later. Take
> the following series:
>
> [PATCH 1/2] My first patch
> [PATCH 2/2] My second patch
> [PATCH 1/2] My first patch
> [PATCH 2/2] My second patch
>
> The user has forgotten to add a version but has sent the message
> in-reply-to an existing series. The version check I suggested using
> above wouldn't work as the versions are "the same". I've no idea how we
> can solve this right now, I'm afraid, but I'd welcome some ideas.
TBPH, in this case I say just don't put the second two in a series at
all. They'll still be visible in Patchwork, just not in a separate
series. That's fine: we don't need to handle every conceivable
permutation of user behaviour - we can encourage sensible behaviour. We
just need to not throw exceptions!
Regards,
Daniel
>
> Stephen
>
> [1]
> https://github.com/getpatchwork/patchwork/blob/c3137fe/patchwork/parser.py#L203-L208
> [2]
> https://github.com/getpatchwork/patchwork/blob/c3137fe/patchwork/parser.py#L848-L851
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 859 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/patchwork/attachments/20161117/23446867/attachment.sig>
More information about the Patchwork
mailing list