#438 Improve how packagers can see a package dependecy problem without waiting for a QA comment in Bodhi
Closed: Invalid by kparal. Opened by kparal.

Today we've been talking to a package maintainer of FEDORA-2025-0cfda7c73a update, which failed OpenQA gating.

There was a frustration about not understanding what the problem is, until we (QA) could provide him with a simple package dependency error message. It would be much easier if at least for these very trivial cases (the update can't be installed!), we could do a better job and let packagers figure out the problem themselves (without forcing them to become OpenQA masters).

Quite interestingly, I wasn't able to easily figure out what the problem was. Only when I pinged Lukas, he could. That shows that this is far from easy.

I see the following issues:
1. There are lots (tens) of failed tests. In some tests, finding the error message is relatively easier, but in some, it's much harder.
2. Even in those "easier to find error" tests, you still need to know where to look (e.g. several screenshots/pages back).

In the Bodhi automated tests tab, there are tens of tests to click on. If you get lucky, you pick e.g. desktop_background test, where the error is presented two screens before the red-colored screen. But if you get unlucky and pick e.g. install_default_update_live test, then I still have no idea how to figure out the error from that page.

Can we do better (without significant engineering efforts)?
Here is my completely naive idea:

  1. Create a single pre-requisite test which will try to install an update. It if succeeds, run all the other tests as child tests. If it fails, don't run the child tests. In this case, Bodhi update would show only a single failed test, and the rest would be missing, instead of failed. That would incentivize the packager to click on the single red one.
  2. We can fine-tune this single "install update" test to be user-friendly visually. If we detect that the update can't be installed, we can make sure that this is the screen that we fail on. Meaning the clicking the obvious red rectangle would show the error to the user immediately. (If we can't do it because technical reasons, it could still be the last one before the red one?).
  3. We could also save the dnf error output in this case into a specialized log file and upload it as an asset. So if things get more complex in some cases, and the error dialog is not in the very last, or the last but one screen, people (including me!) can still find it easily in Assets. (Yes, this is non-straightforward, and relies on knowledge. But as a fallback, it's better to have something that at least someone knowledgeable can find, than not having it at all).

Please tell me how great idea this is, or that it's a technically impossible solution but you have a better idea :-)


Hi, welcome to my life!

So, that idea won't work for...oh, lots of reasons.

  1. Some tests are already grouped with parents and children. Making all of them run after another grandparent test would be difficult/impossible (not sure which).
  2. Tests on different flavors can't have relationships, so you'd need one parent test per flavor.
  3. You'd need at least one parent test per flavor anyway because the problem might occur or not occur depending on what's already installed on the system.
  4. It won't catch problems openQA would otherwise catch only in an image build test. These do exist - it's why I did the work of extending the 'is the package from the update actually used' code to the image build tests (which isn't straightforward).
  5. Probably some others I forgot!

But more importantly, this is not worth doing because catching dependency errors in openQA is the wrong way to do it. We only do it because nothing else is gating on it (or even doing it reliably), so if we don't do it in openQA, we will let updates with dependency issues through testing and blow up subsequent openQA runs (this is a real thing that was happening all the time before I added these checks).

The right way to do it is rmdepcheck in Fedora CI, which we're working on in https://pagure.io/fedora-ci/general/issue/522 , when I have the time. That has a ton of advantages - like it runs in about a minute flat, so we can run it on every package build, and it should catch every case where a package has dependency problems, which openQA definitely doesn't. And the output is relatively easy to understand, and right there.

I don't think it's worth spending much/any engineering effort on this as opposed to spending it on getting rmdepcheck moved along. I think it's easier just to have you and lruzicka and anyone else who's interested learn how to find the errors. FWIW I usually look for a test where it failed in _advisory_update, then look at serial_terminal.txt, which should always have the errors. But getting them from the red frame is fine too. The idea is that we should promptly investigate failures and interpret them on the Bodhi update page, so the maintainer doesn't have to.

For install_default_update_live, BTW, there is literally no easy way to debug it. If that test fails in this check, it means the packages from the update weren't baked into the live image in the parent live image build test. So you can go to the parent test and look at the kiwi logs and confirm that, yes, it put in the older packages for some reason. Why? You don't know! If you're lucky, other tests will also fail and you can find the error from their logs. But if openQA is only encountering the dep issue in an image build test, it's a huge PITA.

In the past, when this happened, I would swear a lot, then manually look at what the new and old package provide and which of those things other packages depend on and try to figure out what the problem was. Maybe I'd set up a mock chroot and try to replicate the live image package set, then try and update it to the package from the update and look for an error, and then not get one, and then swear a lot more and bitch about it on Matrix. It was the worst.

Now what I do is go to staging openQA and look at the rmdepcheck result, because rmdepcheck usually finds the problem. Much nicer. :D (if staging isn't on the rmdepcheck branch, I change it to the rmdepcheck branch and rerun the everything-boot-iso tests for the update).

This is actually a large part of why I wrote rmdepcheck; this was the situation that made me think "heyy, if we could somehow edit the repo metadata so the old packages aren't available to the depsolver, it'd be way easier to see what's going wrong." originally I was going to do it inside openQA till I realized that was dumb.

btw, for investigating these issues it's also useful to know how openQA handles repositories.

Currently, for Rawhide and Branched before Bodhi activation, openQA adds the buildroot repository. So all packages that have been 'pushed to stable' in Bodhi at the time the test runs (give or take a few minutes for repo regeneration) should be available to the test.

For Branched after Bodhi activation and stable releases, openQA does not add the buildroot repository. So only packages which have actually been in a compose are available to the tests. So if update B depends on something from update A, tests for update B will only pass after update A has been pushed stable and there has been a compose - for Branched, a nightly compose; for stable, an updates compose.

The openQA 'workarounds' mechanism can be used to short-circuit the wait if you're in a hurry for some reason - add the update that's gone stable but not yet been in a compose to the workarounds hash in utils.pm somewhere, roll that out, re-run the tests.

We could potentially enable the buildroot repo for all tests. It's a pretty subjective choice. The tradeoff is that then we miss problems if they're masked by a buildroot override.

This has been very helpful, thanks for writing it all down.

But more importantly, this is not worth doing because catching dependency errors in openQA is the wrong way to do it

I agree that focusing on rmdepcheck (I always read it as rpmdepcheck) is the better way to go. Thanks for working on it.

For Branched after Bodhi activation and stable releases, openQA does not add the buildroot repository

Right, I forgot about this part again. That was the reason for the packager's confusion.

Metadata Update from @kparal:
- Issue close_status updated to: Invalid
- Issue status updated to: Closed (was: Open)

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/quality/os-autoinst-distri-fedora/issues/438

Please continue any further discussion there.

Metadata