WIP: build-remote: dumb hack for setting cores #27

Draft
lheckemann wants to merge 1 commit from cores-setting into main
Member

This allows us to specify the number of cores to build on in hydra's
config rather than in nix.conf on the builders, which allows our
"multiple entries per builder" thing to work, so both big-parallel and
non-big-parallel builds can be scheduled on the same node.

This isn't the ideal solution, but is better than the hacks we
considered (ForceCommand on the server side, which would require
multiple client keypairs, and RemoteCommand, which is incompatible
with passing a remote command on the command line).

A more principled solution would be to support setting options via the
daemon protocol, and making use of this functionality. This is
mentioned as a TODO in ssh-store.cc currently, but we want our hydra
to build things now :)

This allows us to specify the number of cores to build on in hydra's config rather than in nix.conf on the builders, which allows our "multiple entries per builder" thing to work, so both big-parallel and non-big-parallel builds can be scheduled on the same node. This isn't the ideal solution, but is better than the hacks we considered (ForceCommand on the server side, which would require multiple client keypairs, and RemoteCommand, which is incompatible with passing a remote command on the command line). A more principled solution would be to support setting options via the daemon protocol, and making use of this functionality. This is mentioned as a TODO in ssh-store.cc currently, but we want our hydra to build things _now_ :)
This allows us to specify the number of cores to build on in hydra's
config rather than in nix.conf on the builders, which allows our
"multiple entries per builder" thing to work, so both big-parallel and
non-big-parallel builds can be scheduled on the same node.

This isn't the ideal solution, but is better than the hacks we
considered (ForceCommand on the server side, which would require
multiple client keypairs, and RemoteCommand, which is incompatible
with passing a remote command on the command line).

A more principled solution would be to support setting options via the
daemon protocol, and making use of this functionality. This is
mentioned as a TODO in ssh-store.cc currently, but we want our hydra
to build things _now_ :)
Member

A more principled solution would be to support setting options via the
daemon protocol, and making use of this functionality

For that, we'd have to stop using the serve protocol first ;)

Anyways, I have a different question: if we ever get to it (I hope so!), would we pass options to remote builders the same way, i.e. via query params in the machine URL or do you have a different idea for that? If not, I'd be fine with implementing the ad-hoc switch for cores given that it'd just continue to work then.

If we do this, I'd have another request though: I'd appreciate if this would be documented. There's sadly no documentation about builder files at all, so just a very short not about this is sufficient. Otherwise, we'd just introduce another more or less obscure feature nobody knows about.

> A more principled solution would be to support setting options via the daemon protocol, and making use of this functionality For that, we'd have to stop using the serve protocol first ;) Anyways, I have a different question: if we ever get to it (I hope so!), would we pass options to remote builders the same way, i.e. via query params in the machine URL or do you have a different idea for that? If not, I'd be fine with implementing the ad-hoc switch for `cores` given that it'd just continue to work then. If we do this, I'd have another request though: I'd appreciate if this would be documented. There's sadly no documentation about builder files at all, so just a very short not about this is sufficient. Otherwise, we'd just introduce another more or less obscure feature nobody knows about.
ma27 force-pushed cores-setting from 817995e538 to ac05f8a215 2025-04-07 15:03:55 +00:00 Compare
raito force-pushed cores-setting from ac05f8a215 to 706267caaa 2025-06-11 21:18:54 +00:00 Compare
ma27 force-pushed cores-setting from 706267caaa to 77f933e7b8 2025-06-21 17:29:13 +00:00 Compare
ma27 force-pushed cores-setting from 77f933e7b8 to 41d5efaff2 2025-06-24 15:52:24 +00:00 Compare
ma27 force-pushed cores-setting from 41d5efaff2 to 54d8ce782a 2025-06-28 15:48:34 +00:00 Compare
ma27 force-pushed cores-setting from 54d8ce782a to 2a590b5a3e 2025-08-01 14:14:14 +00:00 Compare
ma27 force-pushed cores-setting from 2a590b5a3e to a1dd868feb 2025-08-02 12:24:55 +00:00 Compare
ma27 force-pushed cores-setting from a1dd868feb to 3924f6f972 2025-08-12 10:46:03 +00:00 Compare
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin cores-setting:cores-setting
git switch cores-setting

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff cores-setting
git switch cores-setting
git rebase main
git switch main
git merge --ff-only cores-setting
git switch cores-setting
git rebase main
git switch main
git merge --no-ff cores-setting
git switch main
git merge --squash cores-setting
git switch main
git merge --ff-only cores-setting
git switch main
git merge cores-setting
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
3 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: lix-project/hydra#27
No description provided.