As of https://github.com/CentOS-PaaS-SIG/ci-pipeline/pull/298 and https://pagure.io/ci-resultsdb-listener/pull-request/3 the Fedora Atomic CI pipeline is including a field called original_spec_nvr containing the NVR extracted from the spec file, untouched.
original_spec_nvr
So this is basically the NVR that bodhi will provide when asking GW about decision concerning a specific build.
Is this something GW can query? If not, can we adjust ci-resultsdb-listener to format the data in the desired way?
ci-resultsdb-listener is already using the PR I linked to above, so you can already see the data structure in : http://resultsdb.ci.centos.org/resultsdb/results or in https://taskotron.stg.fedoraproject.org/resultsdb
My question boils down to, can you work with this and if not what needs to change so you can? :)
Thanks for your help!
Yes, we can work with this and it is already supported in #34 where we've changed the subject of a decision to be a list of dicts. So a subject could be like this in your query:
{'original_spec_nvr': 'gdk-pixbuf2-2.36.9-1.f26.x86_64'}
And then Greenwave will look up the test results by original_spec_nvr and make a decision based on the test results.
Hey @mjia, there's more to this and I'm working on it. PR in a moment.
See #62.
See also https://github.com/fedora-infra/bodhi/pull/1765
OK, @pingou, with #62 and #63 applied to that staging dc, try messing around with this script:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/usr/bin/env python import requests nvr = 'fedrepo-req-1.4.0-1.fc26' url = 'https://greenwave-stg-web-greenwave.app.os.stg.fedoraproject.org/api/v1.0/decision' data = dict( # https://pagure.io/greenwave/blob/master/f/conf/policies/fedora.yaml decision_context='bodhi_update_push_stable', product_version='fedora-26', subject=[ {'item': nvr, 'type': 'koji_build'}, {'original_spec_nvr': nvr}, ], ) print("Querying %s with:" % url) import pprint; pprint.pprint(data) response = requests.post(url, json=data) print("Got %r" % response) import pprint; pprint.pprint(response.json())
After some more thoughts and realizing the .ignore messages do not include the original_spec_nvr field, I proposed https://pagure.io/greenwave/pull-request/64 as a potential solution (up for discussion of course).
.ignore
FYI @pingou, we are almost definitely going to back #64 out and replace it with something else.
This will wait at least another week until @dcallagh and @mjia are back from travel and vacation. :)
so what would be the ETA for this then? Enabling gating on bodhi based on AtomicCI results relies on this :)
OK - see #74 and #75 for my proposals on replacing this.
I believe we could close this ticket now, afaik, greenwave is considering the AtomicCI results in its decision making process :)
Closing this based on previous comment.
Metadata Update from @lucarval: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)