-----Original Message-----
From: fedora-buildsys-list-bounces(a)redhat.com
[mailto:fedora-buildsys-list-bounces@redhat.com] On Behalf Of
Clark Williams
Sent: Monday, June 26, 2006 4:22 PM
To: Discussion of Fedora build system
Subject: Re: New version of mock working (I think)
If we presuppose that mock will make XML-RPC's to a URL
supplied by the build system to indicate status changes,
would it make sense to send the complete list of status's to
the build system before we start? In other words, when we
crank up, make an initial call to the status URL with "Here
is the list of status values you can receive", maybe as a
list of strings or a hash with descriptive text.
All good ideas. That was sort of an implicit placeholder in the
server.begin_mock_status(...) API. We can munge that call to do whatever
pre-processing that Dan would like to see implemented. I'm sort of a
"implement what we are going to actually use _now_" kind of guy, so I
like to build the API to be minimal but expandable. Something like
python named args we can add later if plague/brew request them.
This would give the build system a mechanism to quickly
detect when it and mock are out-of-sync with respect to state
changes (i.e.
brew/plague could receive the state list and abort if it sees
a state change it doesn't understand). Of course it can do
that anyway, but that might be a long while into a glibc
build before the build system sees an unknown state, as
opposed to 3 seconds into startup.
We probably also want to include our API version expectations in the
initial call. Revised proposed API:
server.begin_mock_status(api_ver=1, srpm="my.src.rpm",
pid=MY_PID)
server.set_mock_status(srpm="my.src.rpm", status_str="status",
pid=MY_PID)
server.end_mock_status(srpm="my.src.rpm", return_code=retcode,
pid=MY_PID)
With Clark's suggestion, begin would look like this:
server.begin_mock_status(api_ver=1, srpm="my.src.rpm",
pid=MY_PID, expected_status_codes=[codes,...])
--
Michael