#64 Create a custom FedoraAtomicCi rule
Closed by ralph. Opened by pingou.
pingou/greenwave ci_rule  into  master

Download 64.patch

The issue is that bodhi always provides an NVR but if the package is not
being considered by the Fedora Atomic CI pipeline, its corresponding git
repository isn't being clone and its original_spec_nvr value not
included in the pipeline.package.ignore fedmsg message.
In other words, relying on pipeline.package.ignore messages when
querying info about a particular NVR is never going to work.

With this rule we are specifying a list of packages of interest (to be
filled) and a test_case_name.
Every package that is part of the list of interest must satisfy this
test case, all the others are considered satisfying the rule.

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

This seats on the top of https://pagure.io/greenwave/pull-request/62

Unit-tests are passing but I didn't touch the integration tests. If someone could look at them it would be appreciated.

rebased

rebased

I kicked out the commit from #62 to make the review easier (esp since I don't rely on it)

OK, I cherry-picked a piece from #63 onto this and pushed it to a pre-release-2017-08-23 branch. I'm going to cut a pre-release rpm from it to test with.

And.. it's in "prod". @pingou, try out a test script like this (see the url, which changed):
#!/usr/bin/env python
import requests

nvr = 'kernel-4.13.0-0.rc6.git2.1.fc28'
url = 'https://greenwave-web-greenwave.app.os.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},
        {'item': 'FOO-123', 'type': 'bodhi_update'},
    ],
)
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())

So as I understand, we could drop #62 and #63 and use this one to solve logical disjunction discribed in #62, right? This patch looks good to me and as pingou said, we just need to add the missing functional tests which we can get from Ralph's patches, :-)

Do not worry, I think I have misunderstood sth here since Dan told me this is sth you have to do for your flock talk.

Dan told me this is sth you have to do for your flock talk.

Well yes and no, I also think this may be the way we integrate CI results for as long as it only supports a subset of Fedora's packages.

So as I understand, we could drop #62 and #63

As described in #68 we actually do need #63 but I think we can drop #62 indeed.

OK - I would like to back this out in favor of #75. Let's take discussion there.

Pull-Request has been closed by ralph

Metadata