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

python311Packages.nbmake: disable parallelism #369950

Merged
merged 1 commit into from
Jan 5, 2025

Conversation

gepbird
Copy link
Contributor

@gepbird gepbird commented Jan 1, 2025

Fixes #369767

I intentionally kept the test related dependencies and workaround after disabling tests, in case we can enable them later.

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

@gepbird gepbird marked this pull request as draft January 1, 2025 13:18
@gepbird gepbird changed the base branch from master to staging January 1, 2025 13:19
@gepbird gepbird marked this pull request as ready for review January 1, 2025 13:19
@mweinelt
Copy link
Member

mweinelt commented Jan 1, 2025

The nbmake build looks fairly stable on hydra, so I'd be opposed to disabling its test suite completely. And even the python311 package is cached for me right now.

image

@gepbird
Copy link
Contributor Author

gepbird commented Jan 1, 2025

@mweinelt Now the python311 version is cached for me too, but when rebuilding on nixos-unstable 1-2 days ago, it attempted to build locally:

2025-01-01_15-29

If this failure is so rare it shouldn't happen in the future (or at least the package will be cached), then I'm fine without disabling the tests as they can be useful to catch other failures. I think we should keep c8cc094 for local builds, it would only cost us about an extra minute of build time.

(by the way where do you see that table with eval columns and package rows? What I did before is go on hydra.nixos.org -> nixpkgs -> trunk -> choose an eval -> search for package)

@mweinelt
Copy link
Member

mweinelt commented Jan 1, 2025

(by the way where do you see that table with eval columns and package rows? What I did before is go on hydra.nixos.org -> nixpkgs -> trunk -> choose an eval -> search for package)

Instead of choosing an eval, select the jobs tab and search there across multiple evals.

I think we should keep c8cc094 for local builds, it would only cost us about an extra minute of build time.

Can we drop the pytest-xdist dependency instead?

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jan 1, 2025
@gepbird
Copy link
Contributor Author

gepbird commented Jan 1, 2025

Can we drop the pytest-xdist dependency instead?

Sure, then we need to disable only one test which consistently fails without ptytest-xdist

Build log
nbmake> =================================== FAILURES ===================================                                                                                                                          
nbmake> ____________________ test_when_parallel_passing_nbs_then_ok ____________________                                                                                                                          
nbmake>                                                                                                                                                                                                           
nbmake> pytester = <Pytester PosixPath('/build/pytest-of-nixbld/pytest-0/test_when_parallel_passing_nbs_then_ok0')>                                                                                               
nbmake> testdir2 = None                                                                                                                                                                                           
nbmake>                                                                                                                                                                                                           
nbmake>     def test_when_parallel_passing_nbs_then_ok(pytester: Pytester, testdir2: Never):                                                                                                                      
nbmake>         [write_nb(passing_nb, Path(f"{i}.ipynb")) for i in range(20)]                                                                                                                                     
nbmake>                                                                                                                                                                                                           
nbmake>         hook_recorder = pytester.inline_run("--nbmake", "-n=auto")                                                                                                                                        
nbmake>                                                                                                                                                                                                           
nbmake> >       assert hook_recorder.ret == ExitCode.OK                                                                                                                                                           
nbmake> E       AssertionError: assert <ExitCode.USAGE_ERROR: 4> == <ExitCode.OK: 0>                                                                                                                              
nbmake> E        +  where <ExitCode.USAGE_ERROR: 4> = <class '_pytest.pytester.Pytester.inline_run.<locals>.reprec'>.ret                                                                                          
nbmake> E        +  and   <ExitCode.OK: 0> = ExitCode.OK                                                                                                                                                          
nbmake>                                                                                                                                                                                                           
nbmake> /build/source/tests/test_pytest_plugin.py:61: AssertionError                                                                                                                                              
nbmake> ----------------------------- Captured stderr call -----------------------------                                                                                                                          
nbmake> ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]                                                                                                                                          
nbmake> pytest: error: unrecognized arguments: -n=auto                                                                                                                                                            
nbmake>   inifile: None                                                                                                                                                                                           
nbmake>   rootdir: /build/pytest-of-nixbld/pytest-0/test_when_parallel_passing_nbs_then_ok0                                                                                                                       
nbmake>                                                                                                                                                                                                           
nbmake> =========================== short test summary info ============================                                                                                                                          
nbmake> FAILED tests/test_pytest_plugin.py::test_when_parallel_passing_nbs_then_ok - AssertionError: assert <ExitCode.USAGE_ERROR: 4> == <ExitCode.OK: 0>                                                         

Instead of choosing an eval, select the jobs tab and search there across multiple evals.

Thanks!

@gepbird
Copy link
Contributor Author

gepbird commented Jan 1, 2025

Rebasing to fix merge conflict

@gepbird gepbird changed the title python311Packages.nbmake: disable flaky tests python311Packages.nbmake: disable parallelism Jan 1, 2025
@wegank wegank removed the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jan 1, 2025
@emilazy emilazy merged commit 6aba813 into NixOS:staging Jan 5, 2025
31 of 32 checks passed
@gepbird gepbird deleted the nbmake-fixes branch January 5, 2025 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failure: python311Packages.nbmake
5 participants