bodhi icon indicating copy to clipboard operation
bodhi copied to clipboard

Don't treat all Greenwave errors as 'waiting' status

Open AdamWill opened this issue 4 years ago • 1 comments

Currently, update_test_gating_status just sets the status to TestGatingStatus.waiting if it gets any kind of error at all from Greenwave. But I'm not sure that's really correct. There are quite a lot of paths in Greenwave which would result in an error response to a gating query, and I don't think they all map to 'waiting'. For instance, you get an error if no policies apply to the query, for most subject types. You also get an error for various forms of badly-constructed request. Ideally Bodhi should never send Greenwave a 'wrong' request, but if it does, it seems wrong to consider the gating status to be 'waiting'. You can see a lot of the potential error paths in greenwave's decision.py.

My first idea for handling this would be to add a new TestGatingStatus.error status, and use that if we get an error from Greenwave that isn't of a kind we're sure should be treated as 'watiing' (or perhaps 'failed'). We'd have to figure out appropriate handling of this for the web UI and email notifications, I guess.

AdamWill avatar May 21 '21 21:05 AdamWill

Note: just a week later this has actually shown up 'in production': https://pagure.io/fedora-infrastructure/issue/9991

AdamWill avatar May 27 '21 20:05 AdamWill