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
pythonPackages.distributed: 1.15.1 -> 1.22.1 #44657
Conversation
Requires myself to be added to maintainers (pull request #44655) list before this pull request |
@GrahamcOfBorg eval |
|
||
# py.test not picking up local config file, even when running | ||
# manually: E ValueError: no option named '--runslow' | ||
doCheck = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you need to add pytest-repeat or pytest-faulthandler to checkInputs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2211599
to
44e44ed
Compare
@dotlambda I would really like to thank you for how detailed you have been in your code reviews. I have learned a lot on how to properly package with nix and several git techniques I didn't know how to do (squash, reset --soft, etc.) really helped me with learning how to create good looking commits. There are a lot of packages updated in the following commit. It was necessary in order to make all the tests run and ensure that it also worked on python 2.7. Looks like 2.7 was neglected in some of the packages that I have refactored along with tests. Some questions I have about style.
|
Yes, and I think more than 2/3 have already been moved.
Fetching from GitHub has the disadvantage that our batch upgrade script won't work until #41149 is done. I sometimes open upstream PRs to add tests to the tarball, e.g. ethereum/eth-hash#20. |
# remove patch after version 1.3.1 | ||
# assuming they fix installation on python 2.7 and 3.6 | ||
# they have encoding issue | ||
patches = [ ./0001-open-encoding.patch ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's best to use fetchpatch
with https://bitbucket.org/pytest-dev/pytest-timeout/commits/9de81d3fc57a71a36d418d4aa181c241a7c5350f/raw.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, import io
and io.open()
don't work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out that I was not including io
in open
yes that patch works I will add this. Very cool to see that you can do patches with urls. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A big advantage of using fetchpatch
is that it saves disk space on every checkout/download of Nixpkgs, i.e. on every computer of a Nix user.
@GrahamcOfBorg build python2.pkgs.pytest-timeout python3.pkgs.pytest-timeout python2.pkgs.pytest-faulthandler python3.pkgs.pytest-faulthandler |
# get full repository inorder to run tests | ||
src = fetchFromGitHub { | ||
owner = "python-lz4"; | ||
repo = "${pname}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repo = pname
|
||
buildInputs = [ setuptools_scm pkgconfig ]; | ||
checkInputs = [ pytest psutil ]; | ||
propagatedBuildInputs = [] ++ lib.optional (pythonOlder "3.0") future; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
propagatedBuildInputs = lib.optionals (!isPy3k) future;
No attempt on x86_64-linux (full log) The following builds were skipped because they don't evaluate on x86_64-linux: python2.pkgs.pytest-timeout, python3.pkgs.pytest-timeout, python2.pkgs.pytest-faulthandler, python3.pkgs.pytest-faulthandler Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: python2.pkgs.pytest-timeout, python3.pkgs.pytest-timeout, python2.pkgs.pytest-faulthandler, python3.pkgs.pytest-faulthandler Partial log (click to expand)
|
''; | ||
|
||
meta = { | ||
description = "pytest plugin for repeating tests"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# ignore 5 cli tests out of 1000 total tests that fail due to subprocesses | ||
# these tests are not critical to the library (only the cli) | ||
checkPhase = '' | ||
py.test distributed -m "not avoid-travis" -r s --timeout-method=thread --timeout=300 --durations=20 --ignore="distributed/cli/tests" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if there's a way to set the timeout to infinity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. I have been following the test instructions that is used on travis.
https://github.com/dask/distributed/blob/master/continuous_integration/travis/run_tests.sh#L1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From https://bitbucket.org/pytest-dev/pytest-timeout/:
Setting a timeout to 0 seconds disables the timeout, so if you have a global timeout set you can still disable the timeout by using the mark.
However, I'd prefer to just get rid of pytest-timeout
if that's possible. Otherwise, just set --timeout=0
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw you should also try leaving out the other options if possible, especially --durations
sounds like something we'd want to avoid. Hydra is usually under heavy load, so tests will run slower than usual.
@GrahamcOfBorg build python2.pkgs.distributed python3.pkgs.distributed |
@costrouc These commits all look very nice. Thank you for your thorough work! |
Failure on x86_64-linux (full log) Attempted: python2.pkgs.distributed, python3.pkgs.distributed Partial log (click to expand)
|
sha256 = "1vjfplj37jcw1mf8l810dv76dx0raia3ylgyfy7sfsb3g17brjq6"; | ||
}; | ||
|
||
buildInputs = [ setuptools_scm pkgconfig ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think pytestrunner
is missing here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you didn't encounter distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pytest-runner')
because you have sandboxing turned off? You can turn it on with nix build --option sandbox true
I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for showing --option sandbox true
yes I can reproduce the issue.
Failure on aarch64-linux (full log) Attempted: python2.pkgs.pytest-timeout, python3.pkgs.pytest-timeout, python2.pkgs.pytest-faulthandler, python3.pkgs.pytest-faulthandler Partial log (click to expand)
|
|
||
checkPhase = '' | ||
py.test | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you add pytestrunner
above, this can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, looks like this was a lot of hard work! Please fix the merge conflict.
@ryantm ready for merge. Thanks for the reminder! |
@GrahamcOfBorg build python2.pkgs.distributed python3.pkgs.distributed |
No attempt on x86_64-linux (full log) The following builds were skipped because they don't evaluate on x86_64-linux: python2.pkgs.distributed, python3.pkgs.distributed Partial log (click to expand)
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: python2.pkgs.distributed, python3.pkgs.distributed Partial log (click to expand)
|
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: python2.pkgs.distributed, python3.pkgs.distributed Partial log (click to expand)
|
license = lib.licenses.bsd3; | ||
maintainers = with lib.maintainers; [ costrouc ]; | ||
}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bracket is extra.
- pytest-timeout: no longer requires patch - joblib: was improperly merged with the github merge tool (never using again)
5b9dfe3
to
dac171d
Compare
@ryantm I will never use the github merge editor for a quick fix again. That's why the builds failed. I have fixed the issue and tested that the builds succeed now for both joblib and distributed. |
@GrahamcOfBorg build python2.pkgs.distributed python3.pkgs.distributed python2.pkgs.joblib python3.pkgs.joblib |
Failure on x86_64-darwin (full log) Attempted: python2.pkgs.distributed, python3.pkgs.distributed, python2.pkgs.joblib, python3.pkgs.joblib Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: python2.pkgs.distributed, python3.pkgs.distributed, python2.pkgs.joblib, python3.pkgs.joblib Partial log (click to expand)
|
Timed out, unknown build status on aarch64-linux (full log) Attempted: python2.pkgs.distributed, python3.pkgs.distributed, python2.pkgs.joblib, python3.pkgs.joblib Partial log (click to expand)
|
I have been trying to reproduce the failed tests and everytime I ignore a test another magically seems to fail. I think that turning off the tests is fine. There are 800 tests and only 1 or 2 seem to fail each time. @ryantm is this acceptable? I am sorry that this has taken so long. |
@costrouc There are a lot of python packages with the tests disabled. Obviously it is preferred to have them enabled, but if they can't be made reliable, it is better to not have them. Hopefully the package maintainer runs their own tests as part of the release process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix test reliability
Fixed. I set |
@GrahamcOfBorg build python2.pkgs.distributed python3.pkgs.distributed python2.pkgs.joblib python3.pkgs.joblib |
Success on x86_64-linux (full log) Attempted: python2.pkgs.distributed, python3.pkgs.distributed, python2.pkgs.joblib, python3.pkgs.joblib Partial log (click to expand)
|
Woo! 🎉 |
Failure on x86_64-darwin (full log) Attempted: python2.pkgs.distributed, python3.pkgs.distributed, python2.pkgs.joblib, python3.pkgs.joblib Partial log (click to expand)
|
Timed out, unknown build status on aarch64-linux (full log) Attempted: python2.pkgs.distributed, python3.pkgs.distributed, python2.pkgs.joblib, python3.pkgs.joblib Partial log (click to expand)
|
@costrouc It looks like the tests of |
Motivation for this change
Wanted to run dask distributed on python 2.7 and 3+. Additionally wanted all tests to pass. A lot of work had to be put into adding testing frameworks and ensuring that all the underlying libraries were also compatible.
Things done
For all the following all tests pass and run on python 2.7, 3+ now.
pythonPackages.distributed: 1.15.1 -> 1.22.1 and refactor
pythonPackages.pytest-repeat: init at 0.6.0
pythonPackages.joblib: 0.21.1 -> 0.21.2 and refactor
pythonPackages.python-lz4: init at 2.1.0
pythonPackages.pytest-faulthandler: init at 1.5.0
pythonPackages.pytest-timeout: refactor
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)