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

treewide/nixos: remove with lib; part 6 #337780

Open
wants to merge 56 commits into
base: master
Choose a base branch
from

Conversation

Stunkymonkey
Copy link
Contributor

@Stunkymonkey Stunkymonkey commented Aug 27, 2024

Description of changes

part of #208242

the CI forces me to make nixfmt commits as well.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Aug 27, 2024
@Stunkymonkey Stunkymonkey force-pushed the treewide-nixos-remove-with-lib-6 branch from db6e797 to 3d22935 Compare August 27, 2024 20:36
@Stunkymonkey Stunkymonkey force-pushed the treewide-nixos-remove-with-lib-6 branch 6 times, most recently from 783f722 to b347d5a Compare August 27, 2024 22:12
@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Aug 27, 2024
@Stunkymonkey Stunkymonkey force-pushed the treewide-nixos-remove-with-lib-6 branch 2 times, most recently from 0c4511e to 411d02b Compare August 28, 2024 21:08
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 and removed 2.status: merge conflict This PR has merge conflicts with the target branch labels Aug 28, 2024
@philiptaron philiptaron self-requested a review September 3, 2024 16:15
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 10, 2024
@Stunkymonkey Stunkymonkey force-pushed the treewide-nixos-remove-with-lib-6 branch from 411d02b to 3b37d76 Compare September 11, 2024 18:33
@Stunkymonkey Stunkymonkey force-pushed the treewide-nixos-remove-with-lib-6 branch from 3b37d76 to 5a5aeac Compare November 24, 2024 08:54
@Stunkymonkey Stunkymonkey force-pushed the treewide-nixos-remove-with-lib-6 branch from 5a5aeac to e71df6f Compare November 24, 2024 09:03
@Stunkymonkey Stunkymonkey removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Nov 24, 2024
@Stunkymonkey Stunkymonkey force-pushed the treewide-nixos-remove-with-lib-6 branch 4 times, most recently from 847e7c8 to 3aaf8ff Compare November 24, 2024 11:17
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 10, 2024
Copy link
Contributor

@philiptaron philiptaron left a comment

Choose a reason for hiding this comment

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

Two commits to drop. I didn't find any defects in the code itself. The new script is substantially higher quality.

@Stunkymonkey, when you drop them, please rebase on to master to so that we can try to find issues like #363775 / #363768.

Do you have a root cause for why that issue occurred? Was it a time-of-script-run-to-time-of-merge problem?

nixos/modules/services/networking/yggdrasil.nix Outdated Show resolved Hide resolved
nixos/modules/services/security/aesmd.nix Outdated Show resolved Hide resolved
@philiptaron
Copy link
Contributor

In fact, the script just needs to run from scratch considering the set of merge conflicts. I'm assuming this is due to a tree-wide format happening.

150 commits is too much for me to review. Let's drop it to 50.

@Stunkymonkey Stunkymonkey force-pushed the treewide-nixos-remove-with-lib-6 branch from e661f86 to 83c8c6b Compare December 29, 2024 21:18
@Stunkymonkey Stunkymonkey marked this pull request as ready for review December 29, 2024 21:20
@Stunkymonkey Stunkymonkey removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 29, 2024
@philiptaron
Copy link
Contributor

Based on my experience merging the other PRs, Felix (@Stunkymonkey), I'm going to sit it out for a while. I don't have enough confidence there are zero defects here, and I know with the new script, I'd need to actually run tests against all the modules here -- which I don't have the computing power to do, and I don't think you do either.

@Stunkymonkey
Copy link
Contributor Author

@philiptaron i guess we should then close the remaining MRs. We will not use exactly this in the future.

@philiptaron
Copy link
Contributor

@philiptaron i guess we should then close the remaining MRs. We will not use exactly this in the future.

Hold tight for one moment. I'm trying out the suggestion to use nix-eval-jobs. I don't understand its output (especially error output) yet.

@philiptaron
Copy link
Contributor

So I found out a couple things:

  1. Evaluating all the NixOS tests is pretty effective at finding errors the new script makes.

Here's how that works.

On master:

time NIXPKGS_ALLOW_UNFREE=1 NIXPKGS_ALLOW_INSECURE=1 NIXPKGS_ALLOW_BROKEN=1 nix-eval-jobs --workers 20 --force-recurse --impure --flake .#legacyPackages.x86_64-linux.nixosTests > ../baseline.json

Then, on the branch, rebase to the same master, then run the command, redirecting to a different file.

Then you diff them.

  1. Every error has been an error of omission (the script should have changed something, but did not.)

For me as a reviewer of changes, this is pretty bad, since the failures won't show up in the diff -- they're elsewhere and have to be guessed at.

  1. Every error has been under a with. This means the script is being way-laid by the same reason that we're removing these things in the first place -- they delay undefined variable errors until whatever that branch is gets evaluated, if it ever does.

Since not every module has a NixOS test, that means errors are likely to show up to real users and be quite inopportune.

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: printing 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants