Skip to content

flake: add ci.buildbot output #3410

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

Merged
merged 4 commits into from
Jun 2, 2025

Conversation

MattSturgeon
Copy link
Member

@MattSturgeon MattSturgeon commented May 29, 2025

Background

I've long complained that buildbot is too tightly coupled to our flake's checks output; the same one used by nix flake check. Being unable to customise what buildbot builds has been a pain point for a while.

Turns out around seven months ago buildbot added a per-repo config file in nix-community/buildbot-nix#318.

The available options are documented on its readme, here. Currently only lock_file and attribute, but the latter enables this PR!

Core change

This PR adds an explicit ci.buildbot output to the flake, which we configure buildbot to use instead of the default checks output via a buildbot-nix.toml file.

This allows us to specify a different set of tests for nix flake check and buildbot.

Additional changes

This PR is not focused on fully taking advantage of the new separation, however it does make some minor tweaks:

  • packages are now only built on x86_64-linux, but are built by nix flake check on all systems 🚀
    • Dropped for now due to feedback. Will address docs packages specifically in future work.
  • Many tests imported by tests/default.nix are also only built on x86_64-linux.
    • "Platform" tests and "module" tests (generated by fetch-tests) are still built on all platforms.

Without this PR buildbot had 288 builds, with just tests it has 205, with tests and packages it has 214, with tests (mostly single system) and packages (all systems), it has 235.

Future work:

  • Some builds may be better off done by a GitHub Actions workflow instead of buildbot. This will further reduce the load on buildbot while also improving the UX of how other tests get displayed in PR status checks.
  • We can further iterate on deciding which tests should/shouldn't be built by CI and/or nix flake check
    • E.g., do we really need packages to be built by nix flake check?

Related:

@MattSturgeon MattSturgeon changed the title ci/buildbot output flake: add ci.buildbot output May 29, 2025
@MattSturgeon

This comment was marked as resolved.

@MattSturgeon MattSturgeon force-pushed the ci/buildbot-output branch 3 times, most recently from 4c1c386 to 8bac46b Compare May 30, 2025 18:08
@MattSturgeon MattSturgeon marked this pull request as ready for review May 30, 2025 18:17
@MattSturgeon MattSturgeon requested a review from a team May 30, 2025 18:17
Adds top-level and per-system `ci.buildbot` option for defining tests to
build on buildbot.

These are exposed as the `ci.buildbot.«system»` flake output.
Most still run on all platforms, but many now only run on x86_64-linux.
@MattSturgeon MattSturgeon requested review from khaneliman and a team May 30, 2025 21:08
@MattSturgeon

This comment was marked as resolved.

This comment was marked as resolved.

Copy link
Contributor

mergify bot commented Jun 2, 2025

This pull request, with head sha 6c456efc96f60213019460046d07f5691e0fafa3, has been successfully merged with fast-forward by Mergify.

This pull request will be automatically closed by GitHub.

As soon as GitHub detects that the sha 6c456efc96f60213019460046d07f5691e0fafa3 is part of the main branch, it will mark this pull request as merged.

It is possible for this pull request to remain open if this detection does not happen, this usually happens when a force-push is done on this branch ci/buildbot-output, this means GitHub will fail to detect the merge.

@mergify mergify bot merged commit 6c456ef into nix-community:main Jun 2, 2025
4 checks passed
@mergify mergify bot temporarily deployed to github-pages June 2, 2025 09:55 Inactive
@MattSturgeon MattSturgeon deleted the ci/buildbot-output branch June 2, 2025 09:55
@nixvim-ci
Copy link
Contributor

nixvim-ci bot commented Jun 2, 2025

Successfully created backport PR for nixos-25.05:

@nixvim-ci
Copy link
Contributor

nixvim-ci bot commented Jun 2, 2025

Backport failed for nixos-24.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin nixos-24.11
git worktree add -d .worktree/backport/nixos-24.11/3410 origin/nixos-24.11
cd .worktree/backport/nixos-24.11/3410
git switch --create backport/nixos-24.11/3410
git cherry-pick -x e18d3fb2804908fc00629e9139059d26a3ff4dcb 74e6ada9d1545d3a3c515ea3d85ad6766dc00df5 7d0ac00557dd97d4353cfcad8ffb65163ac1d782 6c456efc96f60213019460046d07f5691e0fafa3

@nixvim-ci
Copy link
Contributor

nixvim-ci bot commented Jun 2, 2025

Git push to origin failed for nixos-25.05 with exitcode 1

@nixvim-ci
Copy link
Contributor

nixvim-ci bot commented Jun 2, 2025

Backport failed for nixos-24.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin nixos-24.11
git worktree add -d .worktree/backport/nixos-24.11/3410 origin/nixos-24.11
cd .worktree/backport/nixos-24.11/3410
git switch --create backport/nixos-24.11/3410
git cherry-pick -x e18d3fb2804908fc00629e9139059d26a3ff4dcb 74e6ada9d1545d3a3c515ea3d85ad6766dc00df5 7d0ac00557dd97d4353cfcad8ffb65163ac1d782 6c456efc96f60213019460046d07f5691e0fafa3

@MattSturgeon
Copy link
Member Author

Backport failed for nixos-24.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

Looked into it, there's too many differences between nixvim 24.11 and 25.05 to be worth backporting when we'll be dropping 24.11 support soon anyway.

@MattSturgeon
Copy link
Member Author

Git push to origin failed for nixos-25.05 with exitcode 1

This seems to be caused by the backport workflow running twice. We should be using the same conditions as nixpkgs, but maybe something is wrong?

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

Successfully merging this pull request may close these issues.

2 participants