[PATCH 09/13] email: add support for X-Aiaiai-Cancel-Email-Test-Patchset

Keller, Jacob E jacob.e.keller at intel.com
Mon Mar 24 12:13:17 PDT 2014



> -----Original Message-----
> From: Artem Bityutskiy [mailto:dedekind1 at gmail.com]
> Sent: Monday, March 24, 2014 1:41 AM
> To: Keller, Jacob E
> Cc: aiaiai at lists.infradead.org
> Subject: Re: [PATCH 09/13] email: add support for X-Aiaiai-Cancel-Email-
> Test-Patchset
> 
> On Fri, 2014-03-21 at 20:57 +0000, Keller, Jacob E wrote:
> > > -----Original Message-----
> > > From: Artem Bityutskiy [mailto:dedekind1 at gmail.com]
> > > Sent: Friday, March 21, 2014 10:32 AM
> > > To: Keller, Jacob E
> > > Cc: aiaiai at lists.infradead.org
> > > Subject: Re: [PATCH 09/13] email: add support for X-Aiaiai-Cancel-
> Email-
> > > Test-Patchset
> > >
> > > On Thu, 2014-03-20 at 16:37 -0700, Jacob Keller wrote:
> > > > +
> > > > +# Check whether a hook has indicated to cancel the testing this
> patch
> > > > set
> > > > +cancel="$(fetch_header "X-Aiaiai-Cancel-Email-Test-Patchset")"
> > > > +if [ -n "$cancel" ] && [ "$cancel" = "1" ]; then
> > > > +       verbose "Canceling $PROG without testing."
> > > > +       exit 0
> > > > +fi
> > >
> > > So which e-mail will the sender receive if the patch-set testing was
> > > canceled?
> >
> > In my example it's expected that the hook is the one that notifies the
> user, and this flag was the cleanest way to stop the email-test-patchset
> from running at all essentially...
> >
> > That could be changed, but I expected the hook to have the most
> information about why the patch was cancelled.
> 
> OK. I do not know what is the better design, but would be nice to have
> less code duplication.
> 
> What do you think if the hooks are invoked by
> 'aiaia-email-testpatchset', rather than the dispatcher?
> 

It might make more sense to invoke from the email-testpatchset..

> So, tespatchet would check the project config, see which hooks should be
> invoked, and run them.
> 
> testpatches would probably know the specifics of the hooks too. E.g.,
> what they return.
> 
> I guess, generally, if hook returns failure exit code, then the stdout
> of the hook is considered to be the reply to the user, and testpatchet
> sends it out.
> 
> If hook returns success, then testpatched proceeds. The stdout of the
> hook is interpeted differently, depending on the hook.
> 

I think I would prefer to use the tags, rather than stdout.

> Testpatchset would also add various notes to the e-mail reply. For
> example, if the base commit was changed, testpatchset could tell about
> this in the e-mail reply.
> 
> The e-mail tags would not be used, then, I guess.
>

Personally would rather use the tags here, than interpret stdout, but it could be done either way.

 
> What do you think? I do not insist on any of the two, just asking. You
> gave this some thought, so you may see the pros and cons of both.
> 

I like moving the hook into email-test-patchset. That makes a bit more sense.

> Thanks!
> 
> --
> Best Regards,
> Artem Bityutskiy



More information about the aiaiai mailing list