buildbot-nix: CI for anything not Hydra-shaped #19

Open
opened 2024-07-04 18:10:12 +00:00 by raito · 6 comments
Owner

I think it'd be great to setup CI for side-projects, e.g. this infra, etc., etc. which integrates in the code review tool.

Probably, a similar setup to Lix one with buildbot-nix wired up to Gerrit but generalized with lix-project/buildbot-nix#8.

What should be the set of workers, though?

I think it'd be great to setup CI for side-projects, e.g. this infra, etc., etc. which integrates in the code review tool. Probably, a similar setup to Lix one with buildbot-nix wired up to Gerrit but generalized with https://git.lix.systems/lix-project/buildbot-nix/pulls/8. What should be the set of workers, though?
raito changed title from buildbot-nix: CI for side projects to buildbot-nix: CI for anything not Hydra-shaped 2024-07-15 10:25:36 +00:00
Author
Owner

Related to #3.

Related to #3.
Author
Owner

Requirements:

Start from lix-project/buildbot-nix#8 and develop the rest ideally.

Auto-discovery

It should be achieved via a .ci/buildbot.nix which describes what is the evaluation entrypoint and returns a (potentially deep?) attribute set of derivations, IMHO, requirements:

schedule a task to check the main branch (?):

  • receive the repo, check if there's a .ci/buildbot.nix
  • if there's one, evaluate it and configure the repo accordingly

Scheduled tasks

Via the previous configuration mechanisms, we can describe "scheduled" regular tasks to achieve, e.g. large CI checks and describe notification strategies (?).

Requirements: **Start from https://git.lix.systems/lix-project/buildbot-nix/pulls/8 and develop the rest ideally.** ### Auto-discovery It should be achieved via a `.ci/buildbot.nix` which describes what is the evaluation entrypoint and returns a (potentially deep?) attribute set of derivations, IMHO, requirements: schedule a task to check the main branch (?): - receive the repo, check if there's a `.ci/buildbot.nix` - if there's one, evaluate it and configure the repo accordingly ### Scheduled tasks Via the previous configuration mechanisms, we can describe "scheduled" regular tasks to achieve, e.g. large CI checks and describe notification strategies (?).
Author
Owner

TODO:

  • Replace hydraJobs hardcoding in the checks.js plugin
  • Further factor things in the NixOS modules wrt to base URI & supported projects in the Gerrit plugin
  • Get rid of the /etc/nix/machines configuration and make it local to the Nix commands inside the Buildbot
TODO: - Replace `hydraJobs` hardcoding in the checks.js plugin - Further factor things in the NixOS modules wrt to base URI & supported projects in the Gerrit plugin - Get rid of the /etc/nix/machines configuration and make it local to the Nix commands inside the Buildbot
Author
Owner

At the moment, buildbot-nix branch non-flakes can almost work, the scheduling of build requests is broken: https://buildbot.forkos.org/#/builders/3/builds/19 is stuck.

At the moment, buildbot-nix branch `non-flakes` can almost work, the scheduling of build requests is broken: https://buildbot.forkos.org/#/builders/3/builds/19 is stuck.
Owner

We had the builders configured globally, but @delroth said we should not globally set the builders.

While configuring the builders via --builders in the CI, we ran into an issue where we are not allowed to specify the builders because we are not a trusted user.

We worked around this, by copying the .drvs to a single-user store in the working directory and running the build on that single-user store.

But now I'm thinking it would be a lot more elegant to directly run the builds with --store ssh-ng://$remote-builder, since this would save a lot of copying around

We had the builders configured globally, but @delroth said we should not globally set the builders. While configuring the builders via --builders in the CI, we ran into an issue where we are not allowed to specify the builders because we are not a trusted user. We worked around this, by copying the .drvs to a single-user store in the working directory and running the build on that single-user store. But now I'm thinking it would be a lot more elegant to directly run the builds with `--store ssh-ng://$remote-builder`, since this would save a lot of copying around
Owner

But now I'm thinking it would be a lot more elegant to directly run the builds with --store ssh-ng://$remote-builder, since this would save a lot of copying around

we are going for this now, knowing that we are essentially reinventing the nix scheduler: each buildbot job is going to have to decide which (single) remote builder to schedule builds to. in the beginning this will be easy since there is only one remote builder, but it will also have to account for different architectures once we have aarch64.
This solves the issue of the buildbot host's disk running full. Additionally, we'll attach a ?remote-store=/mnt similar to how we are doing it for hydra, and set up a garbage collection job for the store in /mnt on the builder.

> But now I'm thinking it would be a lot more elegant to directly run the builds with --store ssh-ng://$remote-builder, since this would save a lot of copying around we are going for this now, knowing that we are essentially reinventing the nix scheduler: each buildbot job is going to have to decide which (single) remote builder to schedule builds to. in the beginning this will be easy since there is only one remote builder, but it will also have to account for different architectures once we have aarch64. This solves the issue of the buildbot host's disk running full. Additionally, we'll attach a ?remote-store=/mnt similar to how we are doing it for hydra, and set up a garbage collection job for the store in /mnt on the builder.
Sign in to join this conversation.
No labels
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: the-distro/infra#19
No description provided.