Bug 1402217

Summary: rpm-test-trigger still runs tests and reports results even if the product is not applicable
Product: [Community] rpm-test-trigger Reporter: Dan Callaghan <dcallagh>
Component: generalAssignee: beaker-dev-list
Status: MODIFIED --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unreleasedCC: jorris
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dan Callaghan 2016-12-07 05:11:09 UTC
I am running rpm-test-trigger against a RHEL6.8 advisory, but I left advisory.releases_to_test config setting blank:

2016-12-07 15:06:57,430 rpmtesttrigger.trigger INFO Ignoring advisory for release: RHEL-6.8.z. Configured releases: []
2016-12-07 15:06:57,434 rpmtesttrigger.trigger INFO Ignoring advisory for release: RHEL-6.8.z. Configured releases: []
2016-12-07 15:06:57,435 rpmtesttrigger.trigger INFO Downloaded packages directory /tmp/tmpgq6orfsa
2016-12-07 15:06:57,435 rpmtesttrigger.trigger INFO rpmdeplint result 0
2016-12-07 15:06:57,435 rpmtesttrigger.trigger INFO Post comment to ET: test has passed

If it's not going to test anything, it shouldn't download packages and run rpmdeplint (or claim to), nor should it comment to say that a test has passed when it never tested anything.

Comment 1 Dan Callaghan 2016-12-08 03:04:47 UTC
A related problem: we are checking the release (and its applicability) for every advisory in the dependency chain. We don't need to do that -- what matters is whether the advisory we are actually testing is applicable or not.

Seems like the fix is to shuffle things around so that the get_release_for_advisory() test is done before calling get_builds_for_errata().

Comment 2 Dan Callaghan 2016-12-14 04:39:11 UTC
https://gerrit.beaker-project.org/5543