NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.21k stars 14.21k forks source link

Build failure: jrnl #306399

Closed antonmosich closed 6 months ago

antonmosich commented 6 months ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. build jrnl on the master branch

Build log

https://gist.github.com/antonmosich/691cf26d978e00c312bdfc56ffe86353

Additional context

I could't figure out what caused this build failure by myself.

Notify maintainers

@bryanasdev000 @umazalakain

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.5-1-MANJARO, Manjaro Linux, noversion, rolling`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.17.0`
 - channels(root): `"nixpkgs"`
 - channels(anton): `"home-manager"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Add a :+1: reaction to issues you find important.

bryanasdev000 commented 6 months ago

On mobile now, but from a quick look, seems that tests are failing.

khaneliman commented 6 months ago

Yeah, i saw 243 test failures.

bryanasdev000 commented 6 months ago

Curious, upstream reported something similar on https://github.com/jrnl-org/jrnl/pull/1878 and a quick grep really show similar outputs on https://github.com/jrnl-org/jrnl/actions/runs/8467752655/job/23199200513.

But, our pytest-bdd is on 7.1.2 (https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/pytest-bdd/default.nix#L17) a bit strange.

bryanasdev000 commented 6 months ago

@fabaff added a patch for it on https://github.com/NixOS/nixpkgs/commit/fc41b1abe251ec00151bb6301b5390e8e6b62f77

bryanasdev000 commented 6 months ago

Git bisect was taking too much time (and disk space), but on https://github.com/NixOS/nixpkgs/commit/419620998d8d4e101ff9545520448179751c23a8 it builds.

So, it is probably related to pytest bump to 8.x, made on https://github.com/NixOS/nixpkgs/commit/92c34d01035c9bca16ad8d5b6c2babdad24bb87a.

I added a override based on https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/gns3/server.nix#L69 and it worked.

Diff:

diff --git a/pkgs/applications/misc/jrnl/default.nix b/pkgs/applications/misc/jrnl/default.nix
index 1e8113765f12..787a8c46374a 100644
--- a/pkgs/applications/misc/jrnl/default.nix
+++ b/pkgs/applications/misc/jrnl/default.nix
@@ -44,7 +44,7 @@ python3.pkgs.buildPythonApplication rec {
   nativeCheckInputs = with python3.pkgs; [
     pytest-bdd
     pytest-xdist
-    pytestCheckHook
+    (pytestCheckHook.override { pytest = pytest_7; })
     toml
   ];
bryanasdev000 commented 6 months ago

Created PR https://github.com/NixOS/nixpkgs/pull/307578 to fix this.