Support running tests for MRs in dist-git #104

Closed
opened 2023-07-20 18:44:34 +00:00 by duffy · 8 comments

It would be nice to have Fedora OpenQA support for running tests on merge requests to dist-git.

It would be nice to have Fedora OpenQA support for running tests on merge requests to dist-git.
Owner

This is a bit more feasible than the packit thing, I think. dist-git MRs are more obviously good things to test for Fedora, and dist-git is 'closer' to the Fedora ecosystem, which should mean it's easier to handle the communication problems (I'm pretty sure we get fedmsgs from dist-git, and Fedora CI has already figured out how to get results shown in dist-git so we should be able to piggyback off that knowledge).

It's still a "nice-to-have" though. It's been on my 'that'd be cool' list for a while and it's good to have a ticket for it, but I can't promise to get to it any time soon. If anyone else wants to take a crack at it I'm certainly happy to help.

This is a bit more feasible than [the packit thing](https://pagure.io/fedora-qa/fedora_openqa/issue/103), I think. dist-git MRs are more obviously good things to test for Fedora, and dist-git is 'closer' to the Fedora ecosystem, which should mean it's easier to handle the communication problems (I'm pretty sure we get fedmsgs from dist-git, and Fedora CI has already figured out how to get results shown in dist-git so we should be able to piggyback off that knowledge). It's still a "nice-to-have" though. It's been on my 'that'd be cool' list for a while and it's good to have a ticket for it, but I can't promise to get to it any time *soon*. If anyone else wants to take a crack at it I'm certainly happy to help.
Owner

Metadata Update from @adamwill:

  • Issue priority set to: Low
  • Issue tagged with: enhancement
**Metadata Update from @adamwill**: - Issue priority set to: Low - Issue tagged with: enhancement
Owner

So someone asked for this during Flock, and with Flock energy, I kinda did it - you actually can do this now, kinda. If you comment /openqa test on a dist-git PR, tests on the scratch build that Packit-CI (thanks!) built for it should get scheduled on openQA staging. There are many caveats, though!

  1. This has been tested like twice
  2. There's a mechanism to try and handle when the scratch build isn't done yet, but that hasn't even been tested once
  3. Results aren't reported back to the PR yet. That turned out to be much harder than actually running the tests. I just about finished writing it, but I wrote it entirely blind and have not had time to test it yet so it's likely broken. I wanted to get to deploying, testing and fixing it in the last few days, but got sidetracked (from this sidetrack...) by the openssl 4 update
  4. There are probably awkward corner cases I didn't discover / think about yet

Still, progress!

So someone asked for this during Flock, and with Flock energy, I [kinda did it](https://forge.fedoraproject.org/quality/fedora_openqa/src/branch/schedule-distgit-prs) - you actually can do this now, kinda. If you comment `/openqa test` on a dist-git PR, tests on the scratch build that Packit-CI (thanks!) built for it should get scheduled on openQA staging. There are many caveats, though! 1. This has been tested like twice 2. There's a mechanism to try and handle when the scratch build isn't done yet, but that hasn't even been tested once 3. Results aren't reported back to the PR yet. That turned out to be much harder than actually running the tests. I just about finished writing it, but I wrote it entirely blind and have not had time to test it yet so it's likely broken. I wanted to get to deploying, testing and fixing it in the last few days, but got sidetracked (from this sidetrack...) by the openssl 4 update 4. There are probably awkward corner cases I didn't discover / think about yet Still, progress!
Owner

Oh, forgot to mention: this is implemented as an "on request" thing rather than a "test every PR" thing for a couple of reasons:

  1. Resources (maybe we have enough to test every PR, but I didn't check yet)
  2. Known failure cases: we know the tests will fail on cases where multiple PRs need to be tested against each other (e.g. soname bumps), and I hate setting up something that we know will definitely cause false failures. I'd only consider making this automated once we have some kinda mechanism for associating multiple related PRs in place, so we can test them together
Oh, forgot to mention: this is implemented as an "on request" thing rather than a "test every PR" thing for a couple of reasons: 1. Resources (maybe we have enough to test every PR, but I didn't check yet) 2. Known failure cases: we *know* the tests will fail on cases where multiple PRs need to be tested against each other (e.g. soname bumps), and I hate setting up something that we *know* will *definitely* cause false failures. I'd only consider making this automated once we have some kinda mechanism for associating multiple related PRs in place, so we can test them together
adamwill added this to the Sprint 11 project 2026-06-23 07:56:10 +00:00
Owner

I've done more work on this but it's now a bit blocked by the issues with staging fedora-messaging. Once that's all cleared up I can get back to finishing this up.

I've done more work on this but it's now a bit blocked by the [issues with staging fedora-messaging](https://forge.fedoraproject.org/infra/tickets/issues/13422). Once that's all cleared up I can get back to finishing this up.
Owner

This is now basically working, with status reporting included - see how this test PR has a 'success' status for 'Fedora openQA tests - scratch build 146822887'. But I still need to do some polishing and check that various scenarios work, and write some tests. Moving to sprint 12.

This is now basically working, with status reporting included - see how [this test PR](https://src.fedoraproject.org/rpms/fedfind/pull-request/2) has a 'success' status for 'Fedora openQA tests - scratch build 146822887'. But I still need to do some polishing and check that various scenarios work, and write some tests. Moving to sprint 12.
Owner

PR merged. Will deploy this to prod tonight or tomorrow or Monday.

PR merged. Will deploy this to prod tonight or tomorrow or Monday.
Owner

Deployed, announced.

Deployed, [announced](https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/O3BQNADIGRBZVBR4BH4JPNMGPYFF6R7E/).
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
quality/fedora_openqa#104
No description provided.