DPDK CI discussions
 help / color / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Jeremy Plsek <jplsek@iol.unh.edu>
Cc: Ali Alnubani <alialnu@mellanox.com>, "ci@dpdk.org" <ci@dpdk.org>,
	"ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
	Ori Kam <orika@mellanox.com>
Subject: Re: [dpdk-ci] [PATCH v2] add script to decide best tree match for patches
Date: Sat, 16 Feb 2019 00:08:25 +0100
Message-ID: <5917852.0VcOUA9y90@xps> (raw)
In-Reply-To: <CA+xUZB5yTd+b0jEBu1Xj329ogMw-iCd5bVvaseybeRsW0Hsntw@mail.gmail.com>

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.

> 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", "http://patches.dpdk.org/api/1.0/"),
> 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.

  reply index

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 14:48 Ali Alnubani
2019-02-15 21:28 ` Jeremy Plsek
2019-02-15 23:08   ` Thomas Monjalon [this message]
2019-02-17  8:09     ` Ali Alnubani
2019-02-16 16:03 ` [dpdk-ci] [PATCH v3] " Ali Alnubani
2019-04-09 16:12   ` [dpdk-ci] [PATCH v4] " Ali Alnubani
2019-04-18  8:16     ` Ali Alnubani
2019-04-19 16:21       ` Jeremy Plsek
2019-04-19 16:24         ` Thomas Monjalon
2019-04-19 17:33           ` Jeremy Plsek
2019-04-19 17:55             ` Thomas Monjalon
2019-04-19 18:06               ` Jeremy Plsek
2019-04-19 19:41                 ` Thomas Monjalon
2019-04-19 19:45                   ` Jeremy Plsek
2019-04-19 20:39     ` Thomas Monjalon

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5917852.0VcOUA9y90@xps \
    --to=thomas@monjalon.net \
    --cc=alialnu@mellanox.com \
    --cc=ci@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jplsek@iol.unh.edu \
    --cc=orika@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK CI discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/ci/0 ci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ci ci/ http://inbox.dpdk.org/ci \
		ci@dpdk.org
	public-inbox-index ci


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.ci


AGPL code for this site: git clone https://public-inbox.org/ public-inbox