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

WIP vision for builders data model (build capabilities) #9899

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

roberth
Copy link
Member

@roberth roberth commented Feb 1, 2024

Motivation

Current goal is to agree on terminology.

  • A build capability is an umbrella for schedulability on both the local host and remote builders.
  • It is more fine grained and therefore more accurate than the current representation of remote builders (unless it's considered ok to configure the same remote multiple times, for each capability)

I'm not actively working on this.

End goal is to have more flexible and accurate dispatch.

See build-capability.hh for the new concept.

machines.cc suggests a path for introducing this incrementally.

Context

Everything starts with a good data model.

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

const std::string sshKey;
const unsigned int maxJobs;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually removing this is probably wrong, because it can be used to represent a limit on a single resource, such as an x86_64 + i686 build capability, or the resources of VMs (+ non-VM capabilities) such as an aarch64-darwin host with an aarch64-linux build VM.
So yes, we probably want maxJobs in both the machine and in the capabilities.

This limit may be crude, but the same idea applies when it's, say, a (cpu, memory) tuple instead of a single number of jobs; that's an orthogonal issue.

@Ericson2314
Copy link
Member

I don't think we need much incrementality/deprecation cycles on the C++ level. I'm fine just forcing the needed changes through Hydra (now that I've made it start using Nix's Machine type) as much as is needed.

/**
* Which derivations can be built.
*/
BuildCapability capability;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be a list of capabilities, because of shared resources? Alternatively, see https://github.com/NixOS/nix/pull/9899/files#r1478444104

Do we still conflate too many concepts? Maybe we need a build routing tree that's about available resources (and load). Each node may or may not impose restrictions on builds that are routed through it. Each node may or may not have information about how to contact a builder.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-03-11-nix-team-meeting-132/42960/1

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

Successfully merging this pull request may close these issues.

3 participants