Merge ~pwlars/testflinger-cli:safer-polling into testflinger-cli:master
Status: | Merged |
---|---|
Approved by: | Paul Larson |
Approved revision: | bb3f35afe75880e368fb69631f8123daa9ba9bf7 |
Merged at revision: | b34625416293ca9bf1291a2e8fceba19676eb63d |
Proposed branch: | ~pwlars/testflinger-cli:safer-polling |
Merge into: | testflinger-cli:master |
Diff against target: |
69 lines (+26/-23) 1 file modified
testflinger-cli (+26/-23) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Larson | Approve | ||
Review via email:
|
Description of the change
I found even more cases where polling can fail, this time it failed to even get the job_state at the beginning of polling - not due to a bad job_id or anything, just due to timeout. The downside of this is that if something is really stuck, or server continually times out, the jenkins job could be stuck waiting forever (or until the jenkins job timeout is reached). I'm leaning towards that being ok though, because the alternative is pretty annoying when testflinger is still running the test job, but the server timed out a response, so we crash on the jenkins side and don't see proper results from it.
We could also take the approach of "make sure the server never times out", and there may be more we could do there too, but in general, I think tools should handle failure cases gracefully.
I'd like to go ahead and land this and try it in trunk at least. If it seems to work well with our jenkins jobs (which pull from there), then I'll promote the snap to candidate/stable also.