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

notebook: fix tests on darwin, 6.1.3 -> 6.1.4 #98486

Merged
merged 2 commits into from Sep 23, 2020

Conversation

tricktron
Copy link
Member

Motivation for this change

The last commit c379aa9 removed two excluded tests on darwin. Unfortunately they still fail on darwin:

File "/nix/store/hzvpbjbpschymag875hjzpsy2vrvrd9l-python3.8-tornado-6.0.4/lib/python3.8/site-packages/tornado/web.py", line 1703, in _execute
    result = await result
  File "/nix/store/hzvpbjbpschymag875hjzpsy2vrvrd9l-python3.8-tornado-6.0.4/lib/python3.8/site-packages/tornado/gen.py", line 209, in wrapper
    yielded = next(result)
  File "/private/tmp/nix-build-python3.8-notebook-6.1.4.drv-0/notebook-6.1.4/notebook/services/contents/handlers.py", line 237, in delete
    yield maybe_future(cm.delete(path))
  File "/private/tmp/nix-build-python3.8-notebook-6.1.4.drv-0/notebook-6.1.4/notebook/services/contents/manager.py", line 279, in delete
    self.delete_file(path)
  File "/private/tmp/nix-build-python3.8-notebook-6.1.4.drv-0/notebook-6.1.4/notebook/services/contents/filemanager.py", line 546, in delete_file
    send2trash(os_path)
  File "/nix/store/jf45dbr7f1z7n01k1snqljlfbqw21sm8-python3.8-Send2Trash-1.5.0/lib/python3.8/site-packages/send2trash/plat_osx.py", line 48, in send2trash
    check_op_result(op_result)
  File "/nix/store/jf45dbr7f1z7n01k1snqljlfbqw21sm8-python3.8-Send2Trash-1.5.0/lib/python3.8/site-packages/send2trash/plat_osx.py", line 37, in check_op_result
    raise OSError(msg)
OSError: Insufficient access privileges for operation

I don't know what is causing it. It looks like nix cannot delete a file in /private/tmp on darwin due to permission issues. These permission issues seem to pop up since MacOs 10.15 Catalina.

@NixOS/nixos-release-managers For now I just excluded the tests again but if anyone has a better idea I am open for suggestions.

ZHF: #97479

System info
- system: `"x86_64-darwin"`
 - host os: `Darwin 19.6.0, macOS 10.15.6`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.6`
 - channels(tricktron): `""`
 - channels(root): `"nixpkgs-20.03pre197736.91d5b3f07d2"`
 - nixpkgs: `/Users/tricktron/github/my-forks/nixpkgs`
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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@tricktron
Copy link
Member Author

@jonringer What is the difference between pytestCheckHook and just pytest?

@risicle
Copy link
Contributor

risicle commented Sep 22, 2020

Fixes the build for me on macos 10.14

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

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

editorconfig test fails, can this be fixed?

@jonringer
Copy link
Contributor

@jonringer What is the difference between pytestCheckHook and just pytest?

https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/python.section.md#using-pytestcheckhook

@tricktron
Copy link
Member Author

@jonringer Thanks for the link.

@tricktron
Copy link
Member Author

@worldofpeace I fixed the editorconfig test

@jonringer jonringer merged commit cf7dd8c into NixOS:master Sep 23, 2020
@tricktron tricktron deleted the fix-notebook-darwin branch September 23, 2020 16:30
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.

None yet

4 participants