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

path collision between .pytest_cache #40259

Closed
f--t opened this issue May 9, 2018 · 4 comments
Closed

path collision between .pytest_cache #40259

f--t opened this issue May 9, 2018 · 4 comments
Assignees
Labels

Comments

@f--t
Copy link
Contributor

f--t commented May 9, 2018

Issue description

pytest artifacts cause path collision, which perhaps don't need to be in the store at all such as .pytest_cache
e.g.

collision between `/nix/store/h01wwkl5ljqkj9yh2gjchr82a8ghm6zq-python3.6-traitlets-4.3.2/.pytest_cache/v/cache/nodeids' and `/nix/store/xxzn78g3wcml73zf3y588v4ln51xcz52-python3.6-et_xmlfile-1.0.1/.pytest_cache/v/cache/nodeids'

Steps to reproduce

Technical details

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

 - system: `"x86_64-linux"`
 - host os: `Linux 4.16.7, NixOS, 18.09pre139319.1d9330d63a5 (Jellyfish)`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.0.2`
 - channels(root): `"nixos"`
...
@matthewbauer
Copy link
Member

It looks like they are both doing manual checkPhase scripts:

https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/python-packages.nix#L5276
&

LC_ALL="en_US.UTF-8" py.test $out

I wonder if they aren't needed any more?

/cc @FRidh

@FRidh FRidh self-assigned this May 10, 2018
@FRidh FRidh added 6.topic: python 0.kind: bug Something is broken labels May 10, 2018
@FRidh
Copy link
Member

FRidh commented May 10, 2018

Interesting, I did not know about the .pytest_cache files. It seems they are created when we use pytest $out.

I've fixed the build of traitlets on master and the issue specifically to that package in 3390592.

I wonder if they aren't needed any more?

These are needed because the default checkPhase does python setup.py test which fewer and fewer packages use.

@FRidh FRidh closed this as completed May 10, 2018
FRidh added a commit that referenced this issue May 10, 2018
Fixes build and prevents including `.pytest_cache` file (#40259).
@averelld
Copy link
Contributor

Just adding for searchability/reference: et_xmlfile still includes this, and pytest could alternatively be called like py.test -p no:cacheprovider $out if we don't want this cache dir created at all.

@FRidh
Copy link
Member

FRidh commented Sep 1, 2018

pytest could alternatively be called like py.test -p no:cacheprovider $out if we don't want this cache dir created at all.

This approach was attempted as well, however, it would break tests that require the cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants