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

Run tmt tests #59

Closed
1 of 3 tasks
nikic opened this issue Oct 12, 2023 · 9 comments
Closed
1 of 3 tasks

Run tmt tests #59

nikic opened this issue Oct 12, 2023 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@nikic
Copy link
Collaborator

nikic commented Oct 12, 2023

I'm wondering whether we should try to run tmt tests on snapshots. The way I see this working is that after forking into llvm-snapshots we would run the tests for one fedora version in a corresponding container on Github Actions.

Possibly the overall approach could be that we move out the snapshot promotion out of fedora-copr-build into check-todays-snapshot, doing something like this:

  • Check whether any build has failed (until now). If so, open an issue. (Same as now.)
  • Check whether all builds succeeded. If so, perform the llvm-snapshots fork. (Similar to now, but happens as soon as builds are done, not the next day.)
  • Run tmt tests for one configuration. If they fail, open an issue. (Or initially don't do anything, until we know that the tests actually work.)

We could also swap the last two points, which means that we would only fork to llvm-snapshots if tmt tests pass as well. We'd probably need some experience with how often / why they fail first.

@kwk
Copy link
Collaborator

kwk commented Oct 12, 2023

@nikic thank you for these ideas.

About tmt tests

Why can't we run tmt tests in the incubator project? Because it is not the final place to consume from? I think for the most part this is negligible.

About forking earlier

I agree that we could potentially fork into the llvm-snapshots on copr repository earlier than at the end of the day. While this sounds nice on paper we have to consider several things:

  1. People who consume our snapshots in their CI jobs have worked with this schedule for a longer period of time and are fine with it.
  2. If we fork earlier and at a potentially more random point time, we might interrupt ongoing installs.
  3. Note that after the fork process we have some time in which the repository metadata on Copr needs to be regenerated. That is an asynchronous and I think long running operation.

I'll try to get more information about the time this all takes in Copr from the #copr team. Then we can decide if the downtime would be acceptable to have during the day.

@nikic
Copy link
Collaborator Author

nikic commented Oct 12, 2023

Why can't we run tmt tests in the incubator project? Because it is not the final place to consume from? I think for the most part this is negligible.

I don't think it matters on which repo they run. I was mainly thinking in terms of how to implement the process so they run exactly once, so doing it during the promotion seemed like a good idea. But if running them on the incubator project is easier that should be totally fine.

As to forking, that's a good concern. I think something to keep in mind is that it's always day somewhere -- the middle of the night for us is probably day time on the west coast. You're right though that at least the current time is very predictable.

@kwk
Copy link
Collaborator

kwk commented Oct 12, 2023

I don't think it matters on which repo they run. I was mainly thinking in terms of how to implement the process so they run exactly once, so doing it during the promotion seemed like a good idea. But if running them on the incubator project is easier that should be totally fine.

Okay.

As to forking, that's a good concern. I think something to keep in mind is that it's always day somewhere -- the middle of the night for us is probably day time on the west coast. You're right though that at least the current time is very predictable.

Right, that's the only part I meant. Predictability.

I found out from the #copr team that it can take up to 15 minutes to regenerate the repositories. This is a ticket that may help in the future to inspect status of such actions in Copr: fedora-copr/copr#1108

@kwk
Copy link
Collaborator

kwk commented Oct 16, 2023

Sorry for the late update. I didn't follow along our chat internally but apparently the forking takes 1 hour.

@kwk kwk self-assigned this Oct 23, 2023
@kwk kwk added the enhancement New feature or request label Oct 23, 2023
@kwk
Copy link
Collaborator

kwk commented Oct 23, 2023

@nikic I began working on this here: https://github.com/kwk/llvm-daily-fedora-rpms/blob/main/.github/workflows/tmt.yml . Once the workflow is free from systematic errors I think we can discuss how and when we wanna trigger it.

@kwk kwk added this to the Test Snapshots with TMT milestone Nov 8, 2023
kwk added a commit that referenced this issue Jan 29, 2024
kwk added a commit that referenced this issue Jan 29, 2024
kwk added a commit that referenced this issue Jan 29, 2024
Also, we default to YYYYMMDD to be the value of today, when the workflow
was running from a schedule.

See #59
kwk added a commit that referenced this issue Jan 29, 2024
I had to disable the tmt linting git pre-commit hook because the new
`$PROJECT_TODAY` apparently breaks `tmt lint` (see
teemtee/tmt#2651).

See #59
kwk added a commit that referenced this issue Jan 29, 2024
kwk added a commit that referenced this issue Jan 29, 2024
kwk added a commit that referenced this issue Jan 29, 2024
kwk added a commit that referenced this issue Jan 29, 2024
kwk added a commit that referenced this issue Jan 29, 2024
Don't overwrite other artifacts by using the strategy in the filename

See #59
kwk added a commit that referenced this issue Jan 31, 2024
In order to clean up for #59 I want to move the plans/example.fmf next to the llvm-snapshot-builder source code.
kwk added a commit that referenced this issue Feb 5, 2024
This is related to #59 because it allows us to call the snapshot
promotion from different places in the workflow more easily.
@kwk
Copy link
Collaborator

kwk commented Feb 6, 2024

Exceeding free execution minutes with Github actions

I gave this some thought yesterday. Looking at the usage time, we currently spend 1:45 hours per tmt run given that we have three strategies in parallel and three Fedora versions we test on:

grafik

The realistic case I can think of right now is that we have tmt running for 1:45 each day (1:45h x 31). That makes up a total of 3255 minutes per month.

Github gives us 2000 minutes per month in the free plan:

grafik

Given that our current selection process for a stable git commit in the LLVM repo has improved, it is theoretically possible that we have successful builds every day, hence we would run the tmt tests each day.

Proposal

I'd say we carefully select which Fedora version we run the tmt tests on. The architecture is more or less fixed and determined by the github action runner being x86_64. This happens to be the fastest architecture we build for on Copr (due to high performance builders). That means Copr builds on that architecture will always be done first for any given day and we can start tmt tests as early as this architecture is done. We should probably wait for all three supported Fedora versions (currently: fedora-38-x86_64, fedora-39-x86_64, and fedora-rawhide-x86_64) to finish in Copr before we kick off the tmt builds for that platform. Each strategy (currenty: standalone, big-merge, bootstrap) should be ran independently.

Summary

  • Continuously check if all builds of a strategy (standalone, big-merge, bootstrap) in an fedora-X-x86_64 are green
  • Run tmt workflow for the fedora-X-x86_64 and the given strategy
    • For a failing tmt run we may want to report it in the broken snapshot issue
    • For a successful tmt run we want to label the workflow run and make it identifiable so that we don't start the same tmt run if it already ran.

@nikic
Copy link
Collaborator Author

nikic commented Feb 6, 2024

I believe that limit only applies to private repos.

kwk added a commit that referenced this issue Feb 22, 2024
* Add tft-cli to python requirements

This adds the `testing-farm` cli command a described here:

https://docs.testing-farm.io/Testing%20Farm/0.1/cli.html
https://gitlab.com/testing-farm/cli/-/blob/main/README.adoc#user-content-pip

See #59

* run ppc64le-long-double test again

We intend to run tests in testing-farm and no longer on a github actions
runner. That's why we can include the test again.

* Add testing-farm workflow
@kwk
Copy link
Collaborator

kwk commented Apr 16, 2024

We do run testing-farm now and I think this issue can be closed. Currently the testing-farm results are not gating things because they need fixing. We're working on having the tests green by default and only report on real errors.

@nikic
Copy link
Collaborator Author

nikic commented Apr 17, 2024

Agree that this can be closed now. Thanks for your awesome work on this, the end result is really great!

@nikic nikic closed this as completed Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants