-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Optional requiredFeatures
: suggestedFeatures
that only improve remote scheduling
#8316
Comments
Tl;dr Currently nix-install-action's repo recommends telling nix that the system supports kvm when it does not in order to get nixos tests to work on hosts like GitHub actions. I personally had to learn a lot more about GitHub actions, system features and nix configuration, then I wanted to understand why custom nixos tests were not building on GitHub when they did on my machine. After I figured all of this out, it seemed like this is a known paper cut that everyone has been dealing with (according to my interpretation of the situation) I think this change could help make the NixOS testing infra inside nixpkgs a lot more usable outside of nixpkgs for a common set of users (people using GitHub actions). Also I worry that the current solution to this problem (recommending users tell nix that the system supports features it does not support) could lead to other errors when it is actually needed. |
NixOS test currently requires the "kvm" system feature flag, but the GitHub actions runners don't enable kvm support. Interestingly the nixos tests still run on systems without kvm support, but they do run slower. As this kvm support is not necessary and saying that it is available when it is not does not seem to cause any adverse effects, this is a tolerable solution at this time. For more context see: NixOS/nix#8316
NixOS test currently requires the "kvm" system feature flag, but the GitHub actions runners don't enable kvm support. Interestingly the nixos tests still run on systems without kvm support, but they do run slower. As this kvm support is not necessary and saying that it is available when it is not does not seem to cause any adverse effects, this is a tolerable solution at this time. For more context see: NixOS/nix#8316
Discussed during the Nix team meeting. Approved the idea, contributions welcome :) Discussion log
|
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2023-07-24-nix-team-meeting-minutes-75/31112/1 |
Is your feature request related to a problem? Please describe.
Some features are not technically required, but should be scheduled on a machine with the feature for performance or other reasons.
For instance
kvm
speeds up the construction of images with a file system on it, but the build process also works whenkvm
is not available.This does add entropy to the assumed build environment, which is not great.
Describe the solution you'd like
A new attribute
suggestedFeatures
that only improves remote scheduling.If a machine with the listed features is available, schedule it there.
If such a machine is not available, build it wherever.
Describe alternatives you've considered
Remove the
kvm
flag from such builds.This will likely slow down builds on build farms with mixed features. For instance, it may consist of bare metal machines with
kvm
that handle VM stuff and base load, plus autoscaled VMs to handle regular builds and peak load. VMs generally don't support nested virtualization, sokvm
builds should not be scheduled onto them.Additional context
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: