I noticed something amiss in the waiverdb consumer test. It was passing
the subject with lists of values:
'subject':[{'item': [nvr],'type':['koji_build']}]
which is contrary to how all our other tests and examples work. And
contrary to how Bodhi will query the API.
This unusual value for 'subject' is not an error, and the test passes as
is, because Greenwave treats the subjects as opaque values. But when
I changed the test case to match the others, it revealed a problem.
In ResultsDB the 'data' dict is actually multi-valued:
In theory there could be multiple values in those lists. And there could
be other, unrelated keys present too. So I'm not sure if we can reliably
map 'data' back to a 'subject' for Greenwave.
For now, let's assume there is always one value and no extra keys. This
should always be true for the test cases we know about, at least.
I noticed something amiss in the waiverdb consumer test. It was passing
the subject with lists of values:
which is contrary to how all our other tests and examples work. And
contrary to how Bodhi will query the API.
This unusual value for 'subject' is not an error, and the test passes as
is, because Greenwave treats the subjects as opaque values. But when
I changed the test case to match the others, it revealed a problem.
In ResultsDB the 'data' dict is actually multi-valued:
In theory there could be multiple values in those lists. And there could
be other, unrelated keys present too. So I'm not sure if we can reliably
map 'data' back to a 'subject' for Greenwave.
For now, let's assume there is always one value and no extra keys. This
should always be true for the test cases we know about, at least.