This rejigs things so that result reporting can be done by
BUILD as well as by list of job IDs. This is specifically
intended to help with T619: it will handle cases where jobs
get restarted by openQA. It has another significant benefit,
though. As things stand, for a list of job IDs, the client has
to run one API query per job, which takes longer and increases
the risk of hitting a timeout or something. For a build, the
client only has to run a single query. So this should be more
robust as well.
I have a PR upstream to allow for retrieving a bunch of jobs by
ID in a single query:
https://github.com/os-autoinst/openQA/pull/434
so if that gets merged, we could re-consider this. We'd still
need some code for catching when jobs get cloned, though.
You can imagine cases where this reports results from jobs
that weren't actually created by this specific submission,
but I can't think of any cases where it would do anything
*wrong*, really.
This is much better now!