-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Replacing ofBorg with GitHub Actions #355847
Comments
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
evaluation checks takes too many resource. I'm worried about if github action's machine can run it in reasonable time. |
@Bot-wxt1221 I managed to run it in 5 minutes for naive nix-env evaluation based on the default.nix entry point and 15 minutes using the same logic that ofborg uses: https://github.com/Mic92/nixpkgs/actions/workflows/eval.yml Both seem already faster compared to the hours of waiting for the ofborg queue that we experience today. Also this is not yet the end of the line of optimizations. We still have https://github.com/Mic92/nixpkgs/blob/main/pkgs/top-level/release-attrpaths-superset.nix to split evaluation in smaller parts that can run even in parallel. |
Will PR commands like |
I worry that bot accounts like ryantm-r can easily hit the limit of CI. CC @ryantm |
Yes it's possible:
|
Well. We have to try and see. Just now it's speculation if it works or not. |
Good to know, though huge builds like kernel and its modules, chromium and firefox will obviously not work. And we'll possibly have to setup a blacklist else even individual contributors will hit their limits. |
According to github doc:
So maybe we don't need to worry about time? |
You can run builds for 12h. Obviously we should establish some reasonable timeouts to be a good citizen in the ecosystem. |
Added a ^ meeting date for this. |
Maybe of interest for this issue, at least just for inspiration, but I've also (ab)used GitHub actions to build tests in my project using a dynamically generated matrix. My project uses flakes but this should be adaptable to non-flakes https://github.com/ibizaman/selfhostblocks/blob/main/.github/workflows/build.yaml |
See the meeting notes for today's infra meeting where we mainly discussed the CI situation: https://github.com/NixOS/infra/blob/7688f20babbeb27a10e4d8669fffe4b0ed00e17f/docs/meeting-notes/2024-11-14.md Here is the high-level plan:
Independently from meeting we also have other discussions about how we can develop ofborg in the future. However this might not happen before February, so we need some alternative solution in the meantime if not longer. |
I've opened a draft PR here for evaluating Nixpkgs using GitHub Actions: #356023. For just evaluation (and those only taking 5 minutes on each arch) instead of also building, I don't think we need to do the running-on-forks dance. Building is harder to get, but it's arguably also less important (and very orthogonal to evaluation). |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
One important aspect that ofborg currently provides, and that this issue doesn't mention, is the performance report. For the majority of PRs the performance report is not important, but for work on The report currently does not report the impact of |
Could that be another on-demand GitHub actions job? We could even run automatically if certain paths has been changed. |
Building linux kernel is fine on Github Actions, the CPU time is sufficient, it takes less than 2 hours to build Jovian-NixOS linux kernel, and Github Actions offer max 6 hours per run. The only concern is disk space, workarounds:
All of the above workarounds are implemented in https://github.com/azuwis/actions/blob/main/nix/prepare.sh. Well, expect for 2), which can be set by:
|
Sounds good to me. |
I am concerned about building the kernel modules (both in tree and out of tree). |
Well. We should be quickly able to filter out and blacklist packages we don't want to build once the source of truth lives in the repository? Also we can actually stop github actions, which was not possible with ofborg builds. |
@ibizaman did you see this? https://github.com/thecaralice/flake-gha |
Next step: #359704 |
Github actions now show added/removed/changed packages in the overview: https://github.com/NixOS/nixpkgs/actions/runs/12106942278 thanks to @itepastra in #360339 |
Enable testing aliases: #360242 |
Nixos options: #360876 |
has it been raised somewhere already that github actions workflows won't run on PRs created by @github-actions? e.g. automated backports triggered using labels like |
We just need a GitHub app for that, NixOS/org#38 |
Builds |
Since we will be using |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as duplicate.
This comment was marked as duplicate.
GA eval runs out of memory in #303849: It runs through locally with Is this another example of #355847 (comment), so reducing the chunkSize would help? |
For requesting reviews from maintainers: #366046 |
How reproducible is this? We could also try to increase swap if it happens rarely. But also I haven't seen this in a while. Is your pr maybe massively increasing regressing on memory usage? |
While working on #359641, I found that the current GH actions that evaluate |
As reported in #366168 (comment), both GHA eval and ofborg eval do not catch some Darwin regressions. Both eval checks succeed but nixpkgs-review fails. |
@FliegendeWurst is it because of unfree |
The package has |
Any unfree dependencies? |
None: jdk21, openjfx21, maven, fetchFromGitHub, makeDesktopItem, copyDesktopItems, wrapGAppsHook3, gtk3. |
Yes, it is my PR's fault, see: #303849 (comment) Looking at the "master" column in the table in that comment, and taking into account that we run 4 chunks in parallel in CI.. we could end up with a worst-case of ~ 18.5 GB of memory used, if we're unlucky to have chunks 2 and 4 be finished before any of 0, 1 and 3 are. We currently have pretty much exactly 18.5 GB available:
So without major regressions like my PR, this should only be a problem very rarely. Of course, the memory usage can shift between chunks over time, so it could still become one. |
Not very related to ofborg itself but now we have a nixpkgs-review bot based on GitHub Actions from Brazil 🇧🇷. I trigger builds using a Telegram bot command and it notifies me back when all builds are done, and, of course nixpkgs-review post the comments on PRs. A feature that we would like is some way to add a text into the comment so we could link to the workflow logs there. This is the repo: https://github.com/nixosbrasil/nixpkgs-reviewd If @lucasewd comments on any PR there it is because of this. |
Another eval failure on memory: https://github.com/NixOS/nixpkgs/actions/runs/12468993409/job/34801318849 |
The error I am seeing in your link is:
That doesn't seem to be memory related. |
Oh thank you - I just say the message at the bottom stating how much memory is available and I thought it was because of this. Thank you and sorry for the noise :). |
This is one of the two plans to ensure we can also perform github evaluation checks in the future.
See https://discourse.nixos.org/t/infrastructure-announcement-the-future-of-ofborg-your-help-needed/56025
for more information.
To replace OfBorg’s functions with GitHub Actions the following tasks need to be implemented:
I already created a proof of concept pull request here: #352808
Update
We have our first jitsi meeting to coordinate the migration on the 14.11 (today) at 17:00 UTC (18:00 Berlin time) at https://jitsi.lassul.us/nixos-infra
The text was updated successfully, but these errors were encountered: