fix universal image selection
ClosedPublic

Authored by adamwill on Mar 2 2016, 6:22 PM.

Details

Summary

this was kinda completely broken, oops. When we first hit an
image with a score > 0 we put its *URL* in the univs dict,
then for each later image for the same arch we'd compare its
*score* against the current candidate's *URL*, which was...not
what I meant to do. strings always win vs. ints, so the effect
of this was that we'd always run the universal tests on the
first image we found for the arch with a score > 0.

We also lied about what image we were running the universal
tests on, because when we tried to log the URL we used the
var url, but we didn't read that var from the univs dict;
we were actually using the value of url that leaked from the
previous loop over the images list, image list, which was just
the URL of whatever the last image found was.

Oops!

Test Plan

You can kinda cut out the univs selection logic
from jobs_from_compose and put it in a script and just feed
it the output from a _get_images(location) call; drop the
jobs.extend() lines and you can just keep the univ selection
bits and log or print the univs dict and the finally-chosen
images to make sure it all works right. Or you can just run
some jobs in a test openQA instance, of course, and make sure
the right images are chosen and the correct image names logged.

Diff Detail

Repository
rOPENQA fedora_openqa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
adamwill retitled this revision from to fix universal image selection.Mar 2 2016, 6:22 PM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: jskladan, garretraziel.
garretraziel accepted this revision.Mar 7 2016, 8:48 AM

Looks OK.

This revision is now accepted and ready to land.Mar 7 2016, 8:48 AM
This revision was automatically updated to reflect the committed changes.