[RFC PATCH 0/1] add parserelations management command

Rohit Sarkar rohitsarkar5398 at gmail.com
Fri Jun 12 04:47:51 AEST 2020


Hey,
On Thu, Jun 11, 2020 at 09:26:28PM +0530, Rohit Sarkar wrote:
[snip] 
> > > Note that before ingesting the relations the existing relations in the
> > > DB are removed.
> > 
> > I'm not super keen on this bit, it seems too easy to shoot yourself in
> > the foot.
> > 
> > Can we restrict it to purging the relations of projects that contain the
> > patches? And require the user to specify the project they expect to be
> > purged on the command line?
> 
> I agree. But relations can be across projects. We did think a bit about
> this and decided to go with this approach as a v1. In our next steps we
> were considering some sort of differential approach towards pushing the
> relations into Patchwork, ie, how do we go from state A of relations in
> Patchwork to a target state B. This is non trivial as a patch can belong
> to only one relation. We need some more discussion about the design of
> the "differential" approach.

So currently, if we just do not refresh the db before running this
script what will happen is the relations in the patch groups file will
override the conflicting relations if any.

What I mean is if the Patchwork's database contains the relation: (1, 2,
3) and the incoming relation from the patch groups file is (2, 4, 5).
There is a conflict with patch 2.

The relations in Pathwork after running the script without refreshing
the relations table will be (1, 3) and (2, 4, 5).

If this is acceptable behaviour we can go with this as it is less
destructive in a way.

Thanks,
Rohit


More information about the Patchwork mailing list