[dpdk-ci] [PATCH v2] add script to decide best tree match for patches

Ali Alnubani alialnu at mellanox.com
Sun Feb 17 09:09:17 CET 2019


Hi,
Thanks for the feedback. I sent v3.

Other comments are inline.

> -----Original Message-----
> From: Thomas Monjalon <thomas at monjalon.net>
> Sent: Saturday, February 16, 2019 1:08 AM
> To: Jeremy Plsek <jplsek at iol.unh.edu>
> Cc: Ali Alnubani <alialnu at mellanox.com>; ci at dpdk.org;
> ferruh.yigit at intel.com; Ori Kam <orika at mellanox.com>
> Subject: Re: [PATCH v2] add script to decide best tree match for patches
> 
> Hi Jeremy,
> Thanks for reviewing.
> Some comments below:
> 
> 15/02/2019 22:28, Jeremy Plsek:
> > We have a python script that we use to apply patches. With this
> > current script, it's a little bit awkward to use inside our apply
> > script.
> > Right now it would look something like this inside of our apply script:
> > (ggt = guess-git-tree)
> > ggt.configure_git_pw(args)
> > ggt.RULES = construct_rules()
> > series = ggt.api_get('series', id)
> > tree_list = list_trees_for_series(series) tree_list =
> > get_ordered_matches(tree_list) # now attempt to apply patch to each
> > tree until successful
> 
> I think you should call this script as a black box.
Yes, the script was meant to be run as a black box.
> 
> > I'd rather see this implemented in a class, so that things like the
> > construct_rules() and configure_git_pw() happens in the constructor,
> > then I'd like to call something like get_ordered_tree_for_series(id)
> > to get the list.
> 
> The idea behind dpdk-ci.git is to allow building a CI infrastructure by
> assembling a collection of scripts.
> If possible, we should keep each script independent and simple to use, in the
> Unix spirit.
> 
> > The constructor arguments would probably contain the server address
> > and project. (Or you could make the server address also an environment
> > variable like PATCHWORK_API_URL = os.getenv("PATCHWORK_API_URL",
> >
<url removed>
> > which is what we do in our scripts.)
> 
> The URL is not going to change anytime soon.
> What is the benefit of reading it from an environment variable?
> I see one benefit: allow to test with a test server.
> I would be in favor of providing a default URL and allow to override with an
> environment variable.
> 

The script follows the git-pw configuration style,
You can either set the environment variable PW_SERVER, or add the git configuration pw.server.

Regards,
Ali


More information about the ci mailing list