summary refs log tree commit diff
path: root/nixos/lib/testing
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2023-11-06 12:30:28 +0100
committerRobert Hensing <robert@roberthensing.nl>2023-11-06 12:30:28 +0100
commitae5cb919f50ca93d9ecdb6b92d67627fecc2ccad (patch)
treeeec2f5204501c5f895b0aa61391671e81b691f51 /nixos/lib/testing
parentf9ef870ccf6003b2f75f2b1ae38a5cb4aab32d80 (diff)
downloadnixpkgs-ae5cb919f50ca93d9ecdb6b92d67627fecc2ccad.tar
nixpkgs-ae5cb919f50ca93d9ecdb6b92d67627fecc2ccad.tar.gz
nixpkgs-ae5cb919f50ca93d9ecdb6b92d67627fecc2ccad.tar.bz2
nixpkgs-ae5cb919f50ca93d9ecdb6b92d67627fecc2ccad.tar.lz
nixpkgs-ae5cb919f50ca93d9ecdb6b92d67627fecc2ccad.tar.xz
nixpkgs-ae5cb919f50ca93d9ecdb6b92d67627fecc2ccad.tar.zst
nixpkgs-ae5cb919f50ca93d9ecdb6b92d67627fecc2ccad.zip
nixos/testing/nodes: Do allow aliases
Aliases exist for a reason. Sure it is nice to make sure that
some aliases aren't used within Nixpkgs, but this creates two problems
which are far worse than your failing to meet your neatness compulsions.

- Users encounter missing attributes, https://github.com/NixOS/nixpkgs/issues/264577
  wasting their time, stalling their progress, and even occupying others
  time that would be better spent on fixing *real* issues.

- Hydra doesn't treat evaluation errors seriously enough, with the
  effect that actual relevant test failures are masked by evaluation
  failures such as those caused by this no aliases business.

- We don't even have the infrastructure to get rid of aliases, because
  all warnings in package attributes are disallowed by Nixpkgs CI
  tooling, last I checked.

Before re-disabling this, make sure that

- An actually helpful deprecation process is in place.

- Aliases are still allowed when `nixos-lib.runTests` and
  `pkgs.testers.runNixOSTest` are invoked by external projects.
  For instance, `all-tests.nix` could provide such an
  override (e.g. with `newScope`).
Diffstat (limited to 'nixos/lib/testing')
-rw-r--r--nixos/lib/testing/nodes.nix3
1 files changed, 0 insertions, 3 deletions
diff --git a/nixos/lib/testing/nodes.nix b/nixos/lib/testing/nodes.nix
index a47d1c98ece..73e6d386fd1 100644
--- a/nixos/lib/testing/nodes.nix
+++ b/nixos/lib/testing/nodes.nix
@@ -32,9 +32,6 @@ let
             key = "nodes.nix-pkgs";
             config = optionalAttrs (!config.node.pkgsReadOnly) (
               mkIf (!options.nixpkgs.pkgs.isDefined) {
-                # Ensure we do not use aliases. Ideally this is only set
-                # when the test framework is used by Nixpkgs NixOS tests.
-                nixpkgs.config.allowAliases = false;
                 # TODO: switch to nixpkgs.hostPlatform and make sure containers-imperative test still evaluates.
                 nixpkgs.system = hostPkgs.stdenv.hostPlatform.system;
               }