Repository navigation
nixos: Fix modules meta.maintainers issues - #484155
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
3d8dac9 to
7884fca
Compare
|
We will be hitting previously uncaught issues. EDIT: Well, no, because this is running as a workflow call so my changes aren't picked-up. Since this became non-trivial, this will be split into at least three PRs:
Not sure where I'll be adding the new check, but I suppose it'll be in "fixing the GitHub action"... Might even make sense to just remove the parallelism form the GitHub action and not be left responsible for whatever future issues crop-up |
These evaluation errors were introduced in NixOS#470576: - e60e3f9 - 0de2873
Two different PRs, two different issues. The first PR, chronologically-merged-in, NixOS#426687 introduced a new module, and while reviewers “reviewed” the `meta.maintainers` entry, they did not notice the maintainer was not in the maintainers list file. - NixOS#426687 (comment) Then, in NixOS#437310, merged a few days later, another new module was added with M0ustach3 as a maintainer. At the very least, an attempt was made in de66c73 to add the maintainer to the list, but an unfortunate typo (or two?) in the maintainers list entry means the two intended usage of the new entry still don't work. The issue here is not from the contributors. The reviewers and committers could have done better, but it's not even truly their fault. The issue is the meta information in NixOS modules was never checked. In any way AFAICT. Otherwise this would have been caught immediately, and not four months later. Anyway, the intent clearly is that the entry should matche the GitHub username.
7884fca to
43eca5c
Compare
LuckShiba
left a comment
There was a problem hiding this comment.
My bad for using maintainers instead of members ^^', though I expected this to have been caught by any other CI
Exactly. The fact this is never checked in any form is quite surprising. |
As observed in NixOS#484155, it was possible for broken meta information to slip its way into the NixOS modules system. It looks like that data was never checked. At this point I wonder if it ever was *used* in a programmatic manner, given how long it took for it to get noticed. This simple check causes the results to be evaluated in a format that isn't "Nix-brained". Not using `--json` *could* allow `<LAMBDA>` to be in the output, which is AFAICT undesirable. ``` $ nix-instantiate --strict --eval --expr '{ x = a: a; }' { x = <LAMBDA>; } $ nix-instantiate --strict --eval --expr --json '{ x = a: a; }' error: … while evaluating attribute 'x' at «string»:1:3: 1| { x = a: a; } | ^ error: cannot convert a function to JSON at «string»:1:3: 1| { x = a: a; } | ^ ```
As observed in NixOS#484155, it was possible for broken meta information to slip its way into the NixOS modules system. It looks like that data was never checked. At this point I wonder if it ever was *used* in a programmatic manner, given how long it took for it to get noticed. This simple check causes the results to be evaluated in a format that isn't "Nix-brained". Not using `--json` *could* allow `<LAMBDA>` to be in the output, which is AFAICT undesirable. ``` $ nix-instantiate --strict --eval --expr '{ x = a: a; }' { x = <LAMBDA>; } $ nix-instantiate --strict --eval --expr --json '{ x = a: a; }' error: … while evaluating attribute 'x' at «string»:1:3: 1| { x = a: a; } | ^ error: cannot convert a function to JSON at «string»:1:3: 1| { x = a: a; } | ^ ```
As observed in NixOS#484155, it was possible for broken meta information to slip its way into the NixOS modules system. It looks like that data was never checked. At this point I wonder if it ever was *used* in a programmatic manner, given how long it took for it to get noticed. This simple check causes the results to be evaluated in a format that isn't "Nix-brained". Not using `--json` *could* allow `<LAMBDA>` to be in the output, which is AFAICT undesirable. ``` $ nix-instantiate --strict --eval --expr '{ x = a: a; }' { x = <LAMBDA>; } $ nix-instantiate --strict --eval --expr --json '{ x = a: a; }' error: … while evaluating attribute 'x' at «string»:1:3: 1| { x = a: a; } | ^ error: cannot convert a function to JSON at «string»:1:3: 1| { x = a: a; } | ^ ```
|
Awesome, thanks for the update on my name, I tried updating the typo on multiple occasions but no PR made it through unfortunately. I hope this will fix my username soon ! Thanks again. Cheers, |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-25.11
git worktree add -d .worktree/backport-484155-to-release-25.11 origin/release-25.11
cd .worktree/backport-484155-to-release-25.11
git switch --create backport-484155-to-release-25.11
git cherry-pick -x 5bb6317349abfe7569cc5a3831e63a5f6c054787 43eca5c08d72437a4caf90fdc89dc509f6621981 |
As observed in NixOS#484155, it was possible for broken meta information to slip its way into the NixOS modules system. It looks like that data was never checked. At this point I wonder if it ever was *used* in a programmatic manner, given how long it took for it to get noticed. This simple check causes the results to be evaluated in a format that isn't "Nix-brained". Not using `--json` *could* allow `<LAMBDA>` to be in the output, which is AFAICT undesirable. ``` $ nix-instantiate --strict --eval --expr '{ x = a: a; }' { x = <LAMBDA>; } $ nix-instantiate --strict --eval --expr --json '{ x = a: a; }' error: … while evaluating attribute 'x' at «string»:1:3: 1| { x = a: a; } | ^ error: cannot convert a function to JSON at «string»:1:3: 1| { x = a: a; } | ^ ```
As observed in #484155, it was possible for broken meta information to slip its way into the NixOS modules system. It looks like that data was never checked. At this point I wonder if it ever was *used* in a programmatic manner, given how long it took for it to get noticed. This simple check causes the results to be evaluated in a format that isn't "Nix-brained". Not using `--json` *could* allow `<LAMBDA>` to be in the output, which is AFAICT undesirable. ``` $ nix-instantiate --strict --eval --expr '{ x = a: a; }' { x = <LAMBDA>; } $ nix-instantiate --strict --eval --expr --json '{ x = a: a; }' error: … while evaluating attribute 'x' at «string»:1:3: 1| { x = a: a; } | ^ error: cannot convert a function to JSON at «string»:1:3: 1| { x = a: a; } | ^ ``` (cherry picked from commit f58b11e)
As observed in NixOS#484155, it was possible for broken meta information to slip its way into the NixOS modules system. It looks like that data was never checked. At this point I wonder if it ever was *used* in a programmatic manner, given how long it took for it to get noticed. This simple check causes the results to be evaluated in a format that isn't "Nix-brained". Not using `--json` *could* allow `<LAMBDA>` to be in the output, which is AFAICT undesirable. ``` $ nix-instantiate --strict --eval --expr '{ x = a: a; }' { x = <LAMBDA>; } $ nix-instantiate --strict --eval --expr --json '{ x = a: a; }' error: … while evaluating attribute 'x' at «string»:1:3: 1| { x = a: a; } | ^ error: cannot convert a function to JSON at «string»:1:3: 1| { x = a: a; } | ^ ```
The rationale is simple: this should work:
It does not.
The first commit adds a check to prevent this from happening again.This became non-trivial, so this is pushed aside for a future PR.The commits are fixing the issues encountered. The danklinux entries are self-evident, so no need to ping @LuckShiba about it I guess.
As for @M0ustach3, I took the liberty of using the casing from your GitHub username for your fixed maintainers-list entry, since
handle == githubis preferred. If that's not desirable, please tell me what to use instead.Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.