qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: John Snow <jsnow@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Li-Wen Hsu" <lwhsu@freebsd.org>, "Kevin Wolf" <kwolf@redhat.com>,
	Qemu-block <qemu-block@nongnu.org>,
	"Michael Roth" <michael.roth@amd.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Ed Maste" <emaste@freebsd.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v3 00/15] python: drop qemu.qmp from qemu.git tree
Date: Wed, 10 Dec 2025 16:25:25 +0000	[thread overview]
Message-ID: <aTme9SHngGqLUXZv@redhat.com> (raw)
In-Reply-To: <CAFn=p-ZXsHpht=Yz=b6rs4As5OMCpGfqCw68C5Z3OwQg3N-7kg@mail.gmail.com>

On Tue, Dec 09, 2025 at 03:05:43PM -0500, John Snow wrote:
> On Tue, Dec 9, 2025 at 2:46 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
> >
> > On Tue, Dec 09, 2025 at 12:23:21PM -0500, John Snow wrote:
> > > On Tue, Dec 9, 2025, 12:00 PM Daniel P. Berrangé <berrange@redhat.com>
> > > wrote:
> > >
> > > > On Fri, Dec 05, 2025 at 01:00:42AM -0500, John Snow wrote:
> > > > > Hello!
> > > > >
> > > > > This series drops the in-tree version of our python-qemu-qmp package
> > > > > ("qemu.qmp") in favor of the version hosted on PyPI, whose repository is
> > > > > located at https://gitlab.com/qemu-project/python-qemu-qmp.
> > > > >
> > > > > GitLab CI: https://gitlab.com/jsnow/qemu/-/pipelines/2197613036
> > > > >        (FreeBSD isn't my fault...!)
> > > > >
> > > > > The major effects of this patch series are:
> > > > >
> > > > > 1. qemu.qmp will be installed from PyPI or vendored packages instead of
> > > > >    being utilized directly from the qemu.git tree.
> > > >
> > > > This is not getting installed in enough scenarios IMHO.
> > > >
> > >
> > > It's hard to trigger an install when you don't use the build system,
> >
> > Well I am using the build system in the same way that I've always
> > used it with QEMU. IOW, the benchmark for this is the current way
> > things work with the python stuff in tree. The ideal would be to
> > match that behaviour with no workflow changes needed, if it is
> > practical to achieve that without major downsides.
> 
> I know, but if we add out-of-tree things, there's some fundamental
> things that change - we need to load that dependency somewhere,
> somewhen.

Yep, there's a tradeoff, so we have to figure out what's practical
to achieve.

> > > though... If you bypass make/meson/ninja entirely I'm not really sure what
> > > I can do to bootstrap the test deps.
> >
> > Can we just do it unconditionally in configure / meson ? These aren't
> > big files to download, and we're already dealing other python stuff
> > for the build, and git submodules, and rust crates. Pulling in qemu.qmp
> > doesn't feel like it is a burden to do by default ?
> 
> I definitely could, and I think it would be rather convenient; I only
> have some minor concerns about it:
> 
> - We don't promise tests on all platforms that we promise builds on.
> We have definitely broken this in the past. It might work currently,
> but it's a line I want to be aware we are crossing. It may necessitate
> python3-wheel and python3-setuptools just to build in this case.
> That's probably not an issue on workstations, but it's more bricks on
> the wall that are actually not truly needed until you run tests (or
> prepare to run tests).

We should focus on doing what's optimal for platforms where
tests do work, since they're inherantly our most important
platforms. If we proactively fetch python deps for tests that
happen to be broken on a platform already, I'm not too fussed
about that, as long as we don't break things more than they
are already broken.


> - Configure will get slower by default. I can install the core test
> deps by default if people don't mind the additional delay time. It
> might be something like 2-4 seconds, depending. If you don't care, I
> don't.

IIUC,  'pip' will have a local cache of downloads somewhere under
$HOME, so presumably when we install deps, we're only going to have
a download hit the very first time on a machine, or when the needed
versions change ? If we're mostly just copying files out of the
local cache, the time overhead should remain fairly minimal most of
the time.

We have precedent for downloading stuff at configure stage from
the Rust deps and git submodules. Those Rust deps are used for
built code rather than tests, but if we did need some rust deps
only for tests, presumably they'd still be done in configure ?

> - Things like functional tests are still going to require some kind of
> environment prep for all the extra stuff they require, I don't think
> it's reasonable to preload all of that stuff at configure time, and we
> never have. "make check-functional" is sufficient to pull those deps
> in, but if there are ways to engage the functional tests manually that
> people are using, I think another preparation step is unavoidable
> there.

I'd we interested to know how much overhead loading the functional
test deps actually is ?

As a conceptual point beyond this series, I've always tended to expect
that a "configure" script (or equivalent) is responsible for validating
the host OS pre-requisites and/or fetching neede pre-requisites.

Anything after that (whether builds or tests) would then (mostly) work
from stuff that was already acquired by configure.

This lets devs see upfront if there are any problems with their host,
instead of the host problems being hit later where the errors are
mixed in with build logs.

With functional tests we of course don't want to download the assets
upfront as that's GB's of data. I would tend towards suggesting that
any python deps should be fetched upfront at the configure stage
though, unless we see an unacceptable time hit from that.

> So, in addition to the "pyrun" wrapper I mailed in a separate reply
> (which I think is a good idea anyway, regardless of what direction we
> go here), I see two main paths that address your issues in differing
> amounts:

I sent that as a formal proposal here:

  https://lists.nongnu.org/archive/html/qemu-devel/2025-12/msg01351.html

For the functional test example illustrated there though, we would
preferrably want the functional test deps fetched upfront.

> (1) make configure prepare the test deps *by default*, adding a flag
> like --without-test-deps to disable it, or

Note, this is not just about test deps. The qemu python code is used by
other misc QEMU developer tools, such as the qmp-shell command. I'm
considering the python deps as more like "QEMU build env pre-requisites",
which is what pushed me towards believeing they should be fetched by
default

> (2) Continue not prepping the test deps, but allow --with-test-deps to
> pre-load them.
> 
> More or less the same solution, just with different defaults. I'm
> fairly ambivalent, my only personal "habit" here is "I am really
> reluctant to touch configure unless there is a strong consensus around
> it because I dislike having to make arguments at that level."


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



      reply	other threads:[~2025-12-10 16:26 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-05  6:00 [PATCH v3 00/15] python: drop qemu.qmp from qemu.git tree John Snow
2025-12-05  6:00 ` [PATCH v3 01/15] python/mkvenv: create timestamp file for each group "ensured" John Snow
2025-12-05  8:32   ` Thomas Huth
2025-12-05  6:00 ` [PATCH v3 02/15] python/mkvenv: bump 'qemu.qmp' dependency for testdeps John Snow
2025-12-05  6:00 ` [PATCH v3 03/15] python/mkvenv: add 'checktests' and 'functests' dependency groups John Snow
2025-12-05  8:47   ` Thomas Huth
2025-12-05  6:00 ` [PATCH v3 04/15] python/mkvenv: add mechanism to install local package(s) John Snow
2025-12-05  6:00 ` [PATCH v3 05/15] meson, mkvenv: add checktests and functests custom targets John Snow
2025-12-05  6:00 ` [PATCH v3 06/15] tests: Use configured python to run GitLab iotests John Snow
2025-12-05  6:00 ` [PATCH v3 07/15] tests: run "make check-venv" before running iotests John Snow
2025-12-05  6:00 ` [PATCH v3 08/15] tests: ensure "make check-venv" is run for crash tests John Snow
2025-12-05  8:53   ` Thomas Huth
2025-12-05  6:00 ` [PATCH v3 09/15] tests/lcitool: add python3 wheel and setuptools deps for qemu John Snow
2025-12-05  6:00 ` [PATCH v3 10/15] python: add vendored qemu.qmp package John Snow
2025-12-05  6:00 ` [PATCH v3 11/15] meson, mkvenv: make iotests depend on checktests group John Snow
2025-12-05  6:00 ` [PATCH v3 12/15] meson, mkvenv: make functional tests depend on functests group John Snow
2025-12-05  6:00 ` [PATCH v3 13/15] meson, mkvenv: add qemu.git/python/qemu package to pythondeps.toml John Snow
2025-12-05  6:00 ` [PATCH v3 14/15] tests: replace old "check-venv" target with meson target John Snow
2025-12-05  6:00 ` [PATCH v3 15/15] python: delete qemu.qmp John Snow
2025-12-09 16:35 ` [PATCH v3 00/15] python: drop qemu.qmp from qemu.git tree John Snow
2025-12-09 17:00 ` Daniel P. Berrangé
2025-12-09 17:23   ` John Snow
2025-12-09 19:43     ` John Snow
2025-12-09 19:46     ` Daniel P. Berrangé
2025-12-09 20:05       ` John Snow
2025-12-10 16:25         ` Daniel P. Berrangé [this message]

Reply instructions:

You may reply publicly 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=aTme9SHngGqLUXZv@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=crosa@redhat.com \
    --cc=emaste@freebsd.org \
    --cc=hreitz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lwhsu@freebsd.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).