use new openQA client library 'wait for jobs' method
ClosedPublic

Authored by adamwill on Sep 2 2015, 1:44 AM.

Details

Summary

I added a 'wait for jobs' method to the openQA client library,
so we could share this between fedora-openqa-schedule and check-
compose. This simplifies the code here nicely. It's a small
behaviour change in that this doesn't wait indefinitely (it'll
give up after 6 hours), but I think that's better than leaving
zombies lying around (I've seen some very old processes lying
around on BOS that were probably still waiting for jobs that
never completed or something).

openQA-python commit is:
https://github.com/os-autoinst/openQA-python-client/commit/9155b6a8

Test Plan

Check that reporting results still works properly
(that's what goes through here).

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 openQA client library 'wait for jobs' method.Sep 2 2015, 1:44 AM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: jskladan, garretraziel.

Just a note of where I'm going with this - my grander goal is to conceptually separate 'check the compose' from 'run the openQA jobs'. The way I did it so far kinda wound up tying the 'run the compose check' function to the 'schedule the openQA jobs' function, because only the box that scheduled the openQA jobs could know when they were done and hence it was appropriate to run the compose check.

When I started thinking about providing installers for the various bits here, it made me realize this works better if we view fedora-openqa-schedule and check-compose as completely separate bits, which will have their own installers. So I figured it would be sensible to make it really possible to run check-compose somewhere other than the box where fedora-openqa-schedule is running, which means making it possible to wait for the compose and the openQA jobs directly in check-compose. So then it makes sense to move the openQA job wait code into the openQA client library, just as we moved the fedfind compose wait code into fedfind itself.

Ultimately I'm intending to get rid of run-nightly.sh with this: we'll only ship the systemd services/timers to schedule the openQA jobs in fedora-openqa-schedule, and I'll add separate systemd services/timers to check-compose for the compose report side of things.

adamwill updated this revision to Diff 1432.Sep 2 2015, 1:56 AM

Also drop now unneeded WAITTIME

garretraziel accepted this revision.Sep 2 2015, 10:53 AM

Other than comment, LGTM.

fedora_openqa_schedule/report.py
53

Although I don't think that we are going to hit this ceiling soon, I would rather see waittime configurable :-)

This revision is now accepted and ready to land.Sep 2 2015, 10:53 AM

I'm planning another diff which will allow setting several things via the config file, including this wait time.

This revision was automatically updated to reflect the committed changes.