-
Notifications
You must be signed in to change notification settings - Fork 85
Add flag to build package passthru.tests
#397
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
base: master
Are you sure you want to change the base?
Conversation
Until now, failed tests would not be reported separately and simply shown in the "tests build" list.
| build_passthru_tests=build_passthru_tests, | ||
| ) | ||
| changed_packages = set( | ||
| changed_attrs[path].name for path in changed_attrs.keys() |
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.
Sorry for the late reply. I think because of the potential large memory consumption of nixos tests, we need to evaluate them isolation as they will otherwise make the build potentially go out of memory, i.e. if you try to have a large package set rebuild.
Therefore I would suggest to evaluate those packages ahead of time i.e. using nix-instantiate and add them to the final nix build. Of course a better design would be some sort of pipe-lining where already evaluated packages gets build as the rest of the evaluation is still in progress. But this probably requires bigger refactorings and could implemented at a later point similar to nix-fast-build. When using nix-instantiate also add a gcroot with --add-root to make sure that derivations are not garbage collected before hand.
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 at first we could do this way but warn about this possible problem and then address it in a follow up PR
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 don't think it's a good idea to just merge it like that as going out of memory can also causes the users system to crash in some cases i.e. crashing their wayland compositor.
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.
Sorry for the late reply. I think because of the potential large memory consumption of nixos tests, we need to evaluate them isolation as they will otherwise make the build potentially go out of memory, i.e. if you try to have a large package set rebuild. Therefore I would suggest to evaluate those packages ahead of time i.e. using
nix-instantiateand add them to the finalnix build. Of course a better design would be some sort of pipe-lining where already evaluated packages gets build as the rest of the evaluation is still in progress. But this probably requires bigger refactorings and could implemented at a later point similar to nix-fast-build. When using nix-instantiate also add a gcroot with--add-rootto make sure that derivations are not garbage collected before hand.
Maybe at first we could do this way but warn about this possible problem and then address it in a follow up PR
I don't think it's a good idea to just merge it like that as going out of memory can also causes the users system to crash in some cases i.e. crashing their wayland compositor.
I 100% agree with this because if someone for example goes to review using nixpkgs-review and then go wtf happened to my wayland compositor they will think it's their compositor being shit so they will try to switch and it could still cause issues then nixpkgs-review will have to be fixed in a timely manner.
So I would suggest doing what mic92 has suggested, I personally will be putting a block on this pr until this is solved.
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.
As indicated in suggestion comment, please fix the memory corruption bugs via mic92 suggestion and additionally solve the conflicts.
This comment was marked as off-topic.
This comment was marked as off-topic.
I agree with this. I've been locally running something similar to this PR for quite a while, and I've had more problems with packages than with tests. I just use |
|
Personally, I never had any problems with memory consumption while evaluating packages/tests, because I only run But I get that most people probably only review PR's with ofborg evaluation, so the memory consumption in this case is (usually) much lower. When performing local evaluation, I currently observe the following memory consumption:
Afterwards the numbers heavily depend on the number of changed packages:
To make the memory consumption a bit more manageable, I tried to implement local valuation with Based on my experience from that PR, I reworked this PR to only use master...B4dM4n:nixpkgs-review:build-passthru-tests-v2 It also removes the potential huge and permanent memory consumption of I could also try to rewrite the current PR, to invoke one Which route would you prefer? |
|
This is exactly what the new branch does.
|
Yes, you could use |
|
There is nothing blocking master...B4dM4n:nixpkgs-review:build-passthru-tests-v2 from merging. It's a rewrite of this PR, implementing the requested memory limit. It has nothing todo with #473 and is totally independent. It's just using |
This PR adds a
--testsflag to buildpassthru.testsfor all packages, as discussed in #77.The tests to be build can be filtered with
-p,-Pand similar, like all other packages.Since they are classified as tests, they can also be enabled individually with
-p, without specifying--tests:Fixes: #77