fedora-ci / mini-tps

Installability test for RPMs
GNU General Public License v2.0
1 stars 8 forks source link

RHEL 7 compatibility changes to repoquery broke test on Fedora package pull requests #47

Closed AdamWill closed 6 months ago

AdamWill commented 6 months ago

https://github.com/fedora-ci/mini-tps/pull/45 changed two out of three invocations of "$YUMDNFCMD" repoquery to just plain repoquery (it missed one other one, in mtps-get-task. This is to try and be compatible with EL 7, which has no yum repoquery subcommand, but whose yum-utils package does have a /usr/bin/repoquery.

However, this change kinda just assumes that a repoquery command will always be present, which doesn't seem to be a safe assumption. In EL that command is always part of yum-utils, in Fedora it's part of dnf-utils. Nothing much else very important requires those packages, so you can't just assume they will be installed. It seems like dnf-utils is not installed in the environment in which mini-tps is run on Fedora package pull requests (as part of the 'installability' test), so the repoquery calls fail; specifically the one that is used to set nevras_in_repo doesn't work, meaning we think there's no packages in the repo, so we hit the "failed due no packages for testing in repo" failure a bit lower down. This is what happened to https://artifacts.dev.testing-farm.io/ef9fb00a-212e-4bc9-a51b-5fc1c9b945a6/ , which is the 'installability' test for https://src.fedoraproject.org/rpms/anaconda/pull-request/151 . That test ran with mini-tps-0.1-171.fc41.noarch.rpm - the build that added #45 - and failed as described. A slightly later run of the same test on a similar PR - https://artifacts.dev.testing-farm.io/a221e399-1a3a-419f-bacc-39e6a53988e7/ - got mini-tps-0.1-170.fc41.noarch.rpm without #45 , and passed. It looks like @jpopelka saw this problem but couldn't see the cause, so he deleted the -171 build.

I have two ideas to fix this, will submit two PRs and you can pick whichever you like.

jpopelka commented 6 months ago

Thorough description, thanks! I merged #48