Closed gepbird closed 8 months ago
The extremely long build time that seems like it never finishes can be fixed by clearing nixpkgs-review caches.
Before clearing caches I waited 20 minutes, nix-build command allocated 6G of memory and I had to interrupt it, here's a timelapse as proof:
https://github.com/Mic92/nixpkgs-review/assets/29818440/5143c02f-72db-496a-b20f-2f3986d60ed5
After clearing caches it was done under a minute, only allocating 200-300M of memory:
https://github.com/Mic92/nixpkgs-review/assets/29818440/c215fa35-9119-404f-b0e2-5e73b8db56d5
However this doesn't solve my issue, the error: cannot find flake 'flake:None' in the flake registries
issue still persists.
This is a bit confusing because I don't think we use flakes at all, but None
also makes it almost certain that it's nixpkgs-review and not nix or nixpkgs
Can you post the content of build.nix in those cases?
Can you post the content of build.nix in those cases?
@Mic92 Of course! Here you go: build.nix.txt
Github didn't let me upload it with a nix extension so I added .txt.
Debugging with
python -m trace --ignore-dir "$(python -c 'import os, sys; print(os.pathsep.join(sys.path[1:]))')" -t $NIXGITS/nixpkgs-review/result/bin/.nixpkgs-review-wrapped pr 261631
from a comment here https://stackoverflow.com/a/33449763
added print(f"HERE {path}")
above the nix_log
HERE /nix/store/58mj37hgqg7lm5gixjba3x50285idxcx-brise-unstable-2017-09-16.drv^*
HERE /nix/store/1cfdr8p8fq97gmddp12xr1jfnrph9p0l-emacs-rime-20230212.1425.drv^*
HERE /nix/store/jkbf33fimig0qba2xbgqh5k298ggiqf2-fcitx5-chinese-addons-5.1.1.drv^*
HERE /nix/store/pwhwzxyyh6frf5wby3isx53abswrw9fb-fcitx5-rime-5.1.2.drv^*
HERE /nix/store/mz9gynnnax52pyslkxs4m94c11cw1889-goldendict-ng-23.09.10.drv^*
HERE /nix/store/2d93awdkb7qm9ixfkzlkn9v3x7cbrc0c-ibus-libpinyin-1.15.3.drv^*
HERE /nix/store/c15ygkw94z098qhzba2rki5hjq93m266-ibus-rime-1.5.0.drv^*
HERE /nix/store/wdxilqmkgqjhidj21cijf3rj4kdyk1sn-librime-1.9.0.drv^*
HERE /nix/store/mf1rhlszvpij47llh24wkvnvhpi6lk2z-opencc-1.1.7.drv^*
HERE /nix/store/4ad82nrj0n88xabzp3zjw233g73bdgja-rime-data-0.38.20211002.drv^*
HERE None^*
error: cannot find flake 'flake:None' in the flake registries
build.nix
{ pkgs ? import ./nixpkgs { system = "x86_64-linux"; config = import /tmp/tmpu07h9sh7.nix; } }:
with pkgs;
let
paths = [
brise
emacsPackages."rime"
fcitx5-chinese-addons
fcitx5-rime
goldendict-ng
ibus-engines."libpinyin"
ibus-engines."rime"
librime
opencc
rime-data
];
env = buildEnv {
name = "env";
inherit paths;
ignoreCollisions = true;
};
in (import ./nixpkgs { }).mkShell {
name = "review-shell";
preferLocalBuild = true;
allowSubstitutes = false;
dontWrapQtApps = true;
packages = if builtins.length paths > 50 then [ env ] else paths;
}
Added a print(f"HERE {attr}")
and
HERE None^*
HERE Attr(name='goldendict', exists=True, broken=True, blacklisted=False, path=None, drv_path=None, aliases=[], _path_verified=None)
error: cannot find flake 'flake:None' in the flake registries
I usually see this kind of error about 1 out of 5 pull request reviews. The common thing I noticed in them is some packages are marked as broken and skipped and at the end I get the 'flake:None' error.
Once I pressed
Ctrl+Z
to pause the review, and after ~10 minutes I runfg
to resume it. This caused some curl requests to time out. Another event that might be relevant is I ran out of memory during a big rebuild, so that might have messed up my nix store? I'm not sure. After force restarting due to the out of memory incident, I wanted to review another package that is very small and just a 1 rebuilt. I run nixpkgs-review, I see git stuff printed out, fetching the remote was done, but it didn't get to thenix build part
, because it was using ~7G of memory and I got OOM again. After another force restart build the small package built pretty quickly and didn't use nearly as much memory.I successfully reproduced this bug every time on the same machine (with the PRs that have already failed due to thib bug). If I recall correctly it happened before any pausing or OOM incidents. I tried re-cloning the nixpkgs repo. I tried cleaning the nix store with
nix-collect-garbage --older-than 30d
to remove packages generated by reviewing PRs. I tried restarting my machine after a review then run the same review again but nothing worked. Keep in mind I tried all of these potential fixes after having the unpause and OOM incidents and I still got this error.This is not a problem with the package, since other people can build it.
Here's the full log of a PR review: