There can be a race condition if a customer asks for greenwave for a status before the test systems has ran.
This results, in bodhi, in updates marked as failed while in fact we do not know since the tests have not ran yet.
Cross-ref: https://github.com/fedora-infra/bodhi/issues/2124
Bodhi has marked a lot of updates as failing tests, since the policies_satisfied attribute in Greenwave's response is a boolean, and is set to False if tests are missing. Bodhi has a state to indicate that it is waiting on tests, but we need a machine friendly way for Greenwave to tell Bodhi this state.
policies_satisfied
False
Could Bodhi just ignore Greenwave's policies_satisfied response, while it knows there are still tests running? And only start paying attention to it when the tests are no longer running?
How does bodhi know tests are running?
Bodhi could crawl the details of the greenwave response and look for test-result-absent to determine if all results really failed or if some are just absent. This information should already be present in the greenwave response. This is an if any([... kind of check.
test-result-absent
if any([...
Correction, this is test-result-missing not test-result-absent. (The "absent" one is not a thing.)
test-result-missing
Ah sorry, I read it backwards. Randy said "Bodhi has a state to indicate that it is waiting on tests" which I thought meant, it already knows when to wait for more results. But the whole point of this issue is that it doesn't currently know how to wait for more results, we want Greenwave to tell it that. Right?
Bodhi has a state to indicate that it is waiting on tests
That state is the default one, set when the update is created and basically corresponds to the: I have no idea about the gating status (which is provided by greenwave). Sorry that wasn't clear.
@dcallagh yes, sorry, I was unclear there. What I meant was just that Bodhi has a label to show to the users that the update is waiting. Bodhi itself does not know whether tests are running or not unless Greenwave tells us.
I'll take a look at @ralph's suggestion when I get back from PTO next week. It sounds viable.
Closing for now. Please open anew if there is some action to take here.
Metadata Update from @ralph: - Issue status updated to: Closed (was: Open)