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

fix jupyterlab on darwin #124101

Merged
merged 3 commits into from
May 27, 2021
Merged

Conversation

nbren12
Copy link
Contributor

@nbren12 nbren12 commented May 23, 2021

Motivation for this change

The jupyterlab stack was broken on mac: https://hydra.nixos.org/build/143189378

ZHF: #122042

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Added a release notes entry if the change is major or breaking
  • Fits CONTRIBUTING.md.

@nbren12 nbren12 requested review from FRidh and jonringer as code owners May 23, 2021 04:42
@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label May 23, 2021
@nbren12 nbren12 changed the title fix jupterhub server on darwin fix jupyterlab on darwin May 23, 2021
@nbren12 nbren12 force-pushed the fix-jupterhub_server branch from c15e980 to f1096cd Compare May 23, 2021 04:46
@ofborg ofborg bot requested review from elohmeier and costrouc May 23, 2021 04:57
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels May 23, 2021
@risicle
Copy link
Contributor

risicle commented May 23, 2021

Hmm... all of these packages are reported as working from 1672185 https://hydra.nixos.org/eval/1672185?filter=jupyterlab_server&compare=1672118&full=

@nbren12
Copy link
Contributor Author

nbren12 commented May 23, 2021

Those are all for Linux. The darwin builds are broken.

@risicle
Copy link
Contributor

risicle commented May 23, 2021

Sorry, the darwin ones are all still under the "Queued" tab, but I definitely had at least jupyter_server working as of #124027

Edit: just successfully built all three on master (77efb5b) on macos 10.15

@nbren12
Copy link
Contributor Author

nbren12 commented May 24, 2021

Are you doing sandboxed builds? I'm on Mac 10.15 too and it is failing for me even on the latest master: bd24952

Here is an portion of the error log:

successfully installed jupyter-server-1.5.0
/private/tmp/nix-build-python3.9-jupyter_server-1.5.0.drv-0/jupyter_server-1.5.0
Finished executing pipInstallPhase
post-installation fixup
strip is /nix/store/9xawf09c90761xkxv8r1b55ja46x4wr3-cctools-binutils-darwin-949.0.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/2rcq8wzjgkgfvb3zcqxfwkg7dyi8wn76-python3.9-jupyter_server-1.5.0/lib  /nix/store/2rcq8wzjgkgfvb3zcqxfwkg7dyi8wn76-python3.9-jupyter_server-1.5.0/bin
patching script interpreter paths in /nix/store/2rcq8wzjgkgfvb3zcqxfwkg7dyi8wn76-python3.9-jupyter_server-1.5.0
Rewriting #!/nix/store/dv0p8j60nqh7riq7fk9v5vf8kvbb2s90-python3-3.9.4/bin/python3.9 to #!/nix/store/dv0p8j60nqh7riq7fk9v5vf8kvbb2s90-python3-3.9.4
wrapping `/nix/store/2rcq8wzjgkgfvb3zcqxfwkg7dyi8wn76-python3.9-jupyter_server-1.5.0/bin/jupyter-server'...
Executing pythonRemoveTestsDir
Finished executing pythonRemoveTestsDir
running install tests
no Makefile or custom installCheckPhase, doing nothing
pythonCatchConflictsPhase
pythonRemoveBinBytecodePhase
pythonImportsCheckPhase
Executing pythonImportsCheckPhase
pytestCheckPhase
Executing pytestCheckPhase
============================= test session starts ==============================
platform darwin -- Python 3.9.4, pytest-6.2.3, py-1.10.0, pluggy-0.13.1
rootdir: /private/tmp/nix-build-python3.9-jupyter_server-1.5.0.drv-0/jupyter_server-1.5.0
plugins: tornasync-0.6.0.post2, anyio-0.0.0
collected 487 items / 47 deselected / 440 selected

jupyter_server/tests/test_config_manager.py .                            [  0%]
jupyter_server/tests/test_files.py EEEEEEE                               [  1%]
jupyter_server/tests/test_gateway.py EEEEEEE                             [  3%]
jupyter_server/tests/test_paths.py ..EEEE                                [  4%]
jupyter_server/tests/test_serialize.py ..                                [  5%]

@nbren12
Copy link
Contributor Author

nbren12 commented May 24, 2021

I tried setting sandbox=false in my nix config, and the build passed, so I bet this is the issue.

@risicle
Copy link
Contributor

risicle commented May 24, 2021

I am doing sandboxed builds. I wish hydra would hurry up and settle this.

@nbren12
Copy link
Contributor Author

nbren12 commented May 24, 2021

Would the version of nix matter? I don't really understand how these tests could pass in a darwin sandbox. They spin-up an HTTP server and then try to connect to it, a pattern which for me always fails in packages that don't use __darwinAllowLocalNetworking=true.

Maybe someone else can settle this for us if Hydra is too slow.

@risicle
Copy link
Contributor

risicle commented May 24, 2021

I'm seeing very strange sandbox behaviour on my darwin machine now, this suggest something could well be up with it...

@risicle
Copy link
Contributor

risicle commented May 24, 2021

Ok - I've got to the bottom of my issue - turns out I need to restart my nix daemon one last time at the end of my macos bringup script to get the sandbox-enabling setting to take effect. It does indeed fail now. Let me run a proper test for this now...

Copy link
Contributor

@risicle risicle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WFM macos 10.15

@nbren12
Copy link
Contributor Author

nbren12 commented May 27, 2021

bump @jonringer

@SuperSandro2000 SuperSandro2000 merged commit 058b981 into NixOS:master May 27, 2021
@nbren12 nbren12 deleted the fix-jupterhub_server branch May 27, 2021 02:24
@nbren12 nbren12 mentioned this pull request May 27, 2021
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin 6.topic: python 10.rebuild-darwin: 1-10 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants