[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensuse-buildservice
Subject:    Re: [opensuse-buildservice] [PATCH] Notifications do not support multiple action requests
From:       Adrian =?iso-8859-15?q?Schr=F6ter?= <adrian () suse ! de>
Date:       2010-09-30 8:01:28
Message-ID: 201009301001.28752.adrian () suse ! de
[Download RAW message or body]


Hi Islam,

thanks a lot for your patch, Klaas is responsible for this code parts
and he will review it next week (he is on vacation this week).

so please stay some more days patient with an answer.

thanks
adrian

Am Donnerstag, 30. September 2010, 02:33:14 schrieb Islam Amer:
> Hello,
> 
> I was trying out multiple actions in one request and noticed that the 
> notifications contain only the last action.
> 
> I looked at the code and found this in /usr/lib/obs/server/BSNotify.pm 
> line 82 :
> 
>      # FIXME: how to handle multiple actions in one request here ?
>      # right now the last one just wins ....
> 
> So here's a proposed fix : add an actions key in the reqinfo hash, that 
> contains an ordered list of hashes that contain the details of the actions.
> 
> The Data::Dumper of reqinfo produced by the attached patch looks like this :
> 
> $VAR1 = {
>            'when' => '2010-09-30T00:12:13',
>            'actions' => [
>                           {
>                             'sourcerevision' => '1',
>                             'sourceproject' => 'Foo:Devel:Personal',
>                             'deletepackage' => undef,
>                             'targetproject' => 'Foo:Trunk',
>                             'sourcepackage' => 'libfoo',
>                             'type' => 'submit',
>                             'targetpackage' => 'libfoo',
>                             'deleteproject' => undef
>                           },
>                           {
>                             'sourcerevision' => '1',
>                             'sourceproject' => 'Foo:Devel:Personal',
>                             'deletepackage' => undef,
>                             'targetproject' => 'Foo:Trunk',
>                             'sourcepackage' => 'bar',
>                             'type' => 'submit',
>                             'targetpackage' => 'bar',
>                             'deleteproject' => undef
>                           }
>                         ],
>            'author' => 'bob',
>            'description' => 'Test',
>            'state' => 'new',
>            'comment' => undef,
>            'who' => 'bob',
>            'sender' => 'bob',
>            'id' => 32,
>            'type' => ''
>          };
> 
> 
> Is this change acceptable ? If so, I guess the notification plugins will 
> have to be changed to accommodate this.
> 
> Thanks,
> Islam Amer
> 


-- 
Adrian Schroeter
SUSE Linux Products GmbH
email: adrian@suse.de
-- 
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-buildservice+help@opensuse.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic