use new 'iterate_jobs' function for wiki result reporting
ClosedPublic

Authored by adamwill on Dec 22 2015, 6:57 PM.

Details

Summary

This uses the new generator function in openQA-python-client
for reporting results to the wiki. The main advantage is that
we'll report results to the wiki as each openQA test completes,
instead of reporting all results in a lump after every test
has completed. It's also somewhat simpler, as iterate_jobs can
operate on job_ids or build. Note for review: report_results
doesn't return anything, so the use of a return statement was
unnecessary, that's why I dropped it.

We may, at this point, want to switch back to reporting by ID
in 'compose' and 'current', but I think I'd at least want to
add a method to openQA-python-client for checking if jobs have
been cloned before doing that (so if we create jobs 1, 2 and
3, then job 3 is restarted for some reason as job 4, we would
report results from 1, 2 and 4).

Test Plan

Try out all the paths through report resulting and
make sure they all still work as expected, make sure results
are submitted as they arrive, rather than after all jobs are
complete.

Diff Detail

Repository
rOPENQA fedora_openqa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
adamwill retitled this revision from to use new 'iterate_jobs' function for wiki result reporting.Dec 22 2015, 6:57 PM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: jskladan, garretraziel.
garretraziel accepted this revision.Dec 23 2015, 7:40 AM

Other that what my comment says, looks OK.

fedora_openqa_schedule/report.py
143–144

I don't think that it's necessary to instantiate generator like that, I believe that you can do:

for joblist in client.iterate_jobs(jobs=job_ids, build=build, waittime=waittime):

but nvm.

This revision is now accepted and ready to land.Dec 23 2015, 7:40 AM
adamwill added inline comments.Dec 23 2015, 7:55 AM
fedora_openqa_schedule/report.py
143–144

oh, yeah - it's actually that way because at first I had two different iterate_jobs() calls for job_ids and build, then realized I could just use one and it'd work with whichever was set, but didn't notice it could then be optimized one step further :) I'll clean it up for commit.

This revision was automatically updated to reflect the committed changes.