Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility with RHEL7 (and YUM v3) #45

Merged
merged 6 commits into from
Apr 16, 2024
Merged

Conversation

janblazek
Copy link
Contributor

mtps-pkg-test Fixed Show fixed Hide fixed
mtps-pkg-test Fixed Show fixed Hide fixed
mtps-pkg-test Fixed Show fixed Hide fixed
mtps-pkg-test Fixed Show fixed Hide fixed
mtps-pkg-test Fixed Show fixed Hide fixed
mtps-pkg-test Fixed Show fixed Hide fixed
mtps-pkg-test Fixed Show fixed Hide fixed
mtps-pkg-test Fixed Show fixed Hide fixed
Copy link
Member

@jpopelka jpopelka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the urls in the repo file, looks OK otherwise.
Sorry for late reply, I didn't get notification about this PR, I've updated my notification settings for this repo now.

profiles/rhel/repos/rhel-7.9-z.repo Outdated Show resolved Hide resolved
@jpopelka
Copy link
Member

@janblazek you can merge this anytime. Or do you want me to do it?

@janblazek janblazek merged commit 9910ec3 into fedora-ci:main Apr 16, 2024
12 checks passed
@AdamWill
Copy link
Contributor

I think this may have broken all installability tests for Fedora PRs, e.g. http://artifacts.dev.testing-farm.io/ef9fb00a-212e-4bc9-a51b-5fc1c9b945a6 from https://src.fedoraproject.org/rpms/anaconda/pull-request/151# .

It changes the command used to find packages from "$YUMDNFCMD" repoquery to just plain repoquery. It looks like the repoquery command in current Fedoras at least is a thin wrapper around dnf repoquery that's provided by the dnf-utils package, which nothing in particular depends on, and I'm guessing it's not installed into the environment that's used for the installability tests on PRs (I'm not sure where that's defined).

This doesn't seem to be affecting the installability test run on Koji package builds, at least I see many passed results for that version of the test. I guess dnf-utils happens to be present in that environment, or something.

AdamWill added a commit to AdamWill/mini-tps that referenced this pull request Apr 18, 2024
fedora-ci#45 changed two out of
three places we previously called `"$YUMDNFCMD" repoquery` to
instead just call `repoquery` (it missed one). This is because
`yum repoquery` doesn't exist on EL 7. However, it's also not
really safe to assume the standalone `repoquery` command will
always be available either; it's part of yum-utils or dnf-utils
and there's no reason to assume that will always be present. This
adds a fallback, and consistently uses the command we determine
across all three locations.

Signed-off-by: Adam Williamson <[email protected]>
@AdamWill
Copy link
Contributor

AdamWill commented Apr 18, 2024

Additionally, it seems to have missed changing one repoquery call - there's still a "$YUMDNFCMD" repoquery in mtps-get-task.

I checked and confirmed that yum repoquery does not exist as a subcommand in EL 7, so I see why the change was made.

Weirdly, a run on a similar PR three hours later worked: https://artifacts.dev.testing-farm.io/a221e399-1a3a-419f-bacc-39e6a53988e7/ from https://src.fedoraproject.org/rpms/anaconda/pull-request/152 . I can't see what the difference between the two runs was. Did anyone do anything intentional to fix this? You can tell the repoquery command worked on the second but failed on the first by comparing the "# INSTALL TEST" output. From the failed test:

12:16:24                 out:  ----------------
12:16:24                 out: |                |
12:16:24                 out: | # INSTALL TEST |
12:16:24                 out: |                |
12:16:24                 out: | Packages:      |
12:16:24                 out: |                |
12:16:24                 out: |                |
12:16:24                 out: ----------------
12:16:24                 out: Test 'install' failed due no packages for testing in repo 'brew-116502585:'.

From the passed test:

15:08:01                 out:  -------------------------------------------------------------
15:08:01                 out: |                                                             |
15:08:01                 out: | # INSTALL TEST                                              |
15:08:01                 out: |                                                             |
15:08:01                 out: | Packages:                                                   |
15:08:01                 out: |                                                             |
15:08:01                 out: |    * anaconda-0:41.12-1.fc41.x86_64                         |
15:08:01                 out: |    * anaconda-core-0:41.12-1.fc41.x86_64                    |
15:08:01                 out: |    * anaconda-core-debuginfo-0:41.12-1.fc41.x86_64          |
15:08:01                 out: |    * anaconda-debuginfo-0:41.12-1.fc41.x86_64               |
15:08:01                 out: |    * anaconda-debugsource-0:41.12-1.fc41.x86_64             |
15:08:01                 out: |    * anaconda-dracut-0:41.12-1.fc41.x86_64                  |
15:08:01                 out: |    * anaconda-dracut-debuginfo-0:41.12-1.fc41.x86_64        |
15:08:01                 out: |    * anaconda-gui-0:41.12-1.fc41.x86_64                     |
15:08:01                 out: |    * anaconda-install-env-deps-0:41.12-1.fc41.x86_64        |
15:08:01                 out: |    * anaconda-install-img-deps-0:41.12-1.fc41.x86_64        |
15:08:01                 out: |    * anaconda-live-0:41.12-1.fc41.noarch                    |
15:08:01                 out: |    * anaconda-tui-0:41.12-1.fc41.x86_64                     |
15:08:01                 out: |    * anaconda-widgets-0:41.12-1.fc41.x86_64                 |
15:08:01                 out: |    * anaconda-widgets-debuginfo-0:41.12-1.fc41.x86_64       |
15:08:01                 out: |    * anaconda-widgets-devel-0:41.12-1.fc41.x86_64           |
15:08:01                 out: |    * anaconda-widgets-devel-debuginfo-0:41.12-1.fc41.x86_64 |
15:08:01                 out: |                                                             |
15:08:01                 out: -------------------------------------------------------------

that box is populated with the content of nevras_in_repo, and nevras_in_repo is set by running repoquery --repoid=${REPONAME} --all blahblahblah. So clearly that failed in a test run at 12:16:24 but passed in the same test run on an almost-identical PR at 15:08:01. I don't know why, though.

I came up with two alternative options to fix this, but seems like it might be worth figuring out the mystery first...

edit: oh, I see, the failed test got mini-tps-0.1-171.fc41.noarch.rpm but the passed test got mini-tps-0.1-170.fc41.noarch.rpm (despite running later). Maybe someone saw this problem and rewound the COPR, or something?

AdamWill added a commit to AdamWill/mini-tps that referenced this pull request Apr 18, 2024
fedora-ci#45 changed two of the
three places we try and do a repoquery operation from calling
`"$YUMDNFCMD" repoquery` to just calling `repoquery`, but it
missed one. This fixes the remaining one. Also, this attempts
to ensure the plain `repoquery` command will always be available.
It's not safe to assume this, because it's part of dnf-utils (on
Fedora) and yum-utils (on EL), it's not part of core dnf/yum, and
nothing much else requires it. It does seem to be missing in the
environment in which tests on Fedora package pull requests run,
for instance, which I think causes the test to fail on all pull
requests at present.

Signed-off-by: Adam Williamson <[email protected]>
AdamWill added a commit to AdamWill/mini-tps that referenced this pull request Apr 18, 2024
…i#47)

fedora-ci#45 changed two of the
three places we try and do a repoquery operation from calling
`"$YUMDNFCMD" repoquery` to just calling `repoquery`, but it
missed one. This fixes the remaining one. Also, this attempts
to ensure the plain `repoquery` command will always be available.
It's not safe to assume this, because it's part of dnf-utils (on
Fedora) and yum-utils (on EL), it's not part of core dnf/yum, and
nothing much else requires it. It does seem to be missing in the
environment in which tests on Fedora package pull requests run,
for instance, which I think causes the test to fail on all pull
requests at present.

Signed-off-by: Adam Williamson <[email protected]>
AdamWill added a commit to AdamWill/mini-tps that referenced this pull request Apr 18, 2024
…ora-ci#47)

fedora-ci#45 changed two out of
three places we previously called `"$YUMDNFCMD" repoquery` to
instead just call `repoquery` (it missed one). This is because
`yum repoquery` doesn't exist on EL 7. However, it's also not
really safe to assume the standalone `repoquery` command will
always be available either; it's part of yum-utils or dnf-utils
and there's no reason to assume that will always be present. This
adds a fallback, and consistently uses the command we determine
across all three locations.

Signed-off-by: Adam Williamson <[email protected]>
@janblazek
Copy link
Contributor Author

Thank you @AdamWill for catching this and @jpopelka for quick turn-around with new PR!
I'll try to be double cautious about testing on both RHEL and Fedora-CI pipeline next time.
Are you able to use previous copr build in the Fedora-CI pipeline in the meantime when something gets broken?

@AdamWill
Copy link
Contributor

well, this time @jpopelka just deleted the broken build from COPR, which caused subsequent tests to use an older build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants