-
Notifications
You must be signed in to change notification settings - Fork 217
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
Set -j 1 in macOS nix unit tests #2727
Conversation
c5f60ca
to
34cf86c
Compare
872e765
to
735dd30
Compare
bors try |
tryBuild succeeded: |
I believe that the main reason why tests were getting stuck on macos more is the problem fixed by #2734. |
The entire To me it seems like marking it pending had little to no effect.
From 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.
OK Thanks @Anviking
nix/haskell.nix
Outdated
# | ||
# Setting -j 1 should hopefully focus the resource we have in one place. It | ||
# should go silent less often, at the expense of the full run getting slower. | ||
unit.testFlags = if pkgs.stdenv.hostPlatform.isDarwin then ["-j" "1"] else []; |
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 is very very minor, but just so you know, there's a handy lib.optionals
function which does the same thing.
unit.testFlags = if pkgs.stdenv.hostPlatform.isDarwin then ["-j" "1"] else []; | |
unit.testFlags = lib.optionals pkgs.stdenv.hostPlatform.isDarwin ["-j" "1"]; |
Either way is perfectly fine though.
Attempt to ensure visible progress in the macOS hydra job. An hypothesis is that #2472 is caused by heavy load and unfocused resources from running the tests concurrently, risking that the slowest hspec runner - and thererefore the stdout - being silent for 900s causing hydra to timeout. Setting -j 1 should hopefully focus the resource we have in one place. It should go silent less often, at the expense of the full run getting slower.
735dd30
to
6c23f5d
Compare
Fair enough. bors r+ |
Build succeeded: |
Issue Number
#2472 / ADP-970
Overview
-j 1
for hydra Mac builds, in hope this alleviates unit timeoutsComments
A hypothesis is that #2472 is caused by heavy load and unfocused
resources from running the tests concurrently, risking that the slowest
hspec runner - and thererefore the stdout - being silent for 900s causing
hydra to timeout.
Setting -j 1 should hopefully focus the resource we have in one place. It
should go silent less often, at the expense of the full run getting slower.
Testing locally
Tested locally with
nix-build -A checks.cardano-wallet-core
. Seems to work.It now takes 399s instead of 299.7877 on my machine (Not that dramatic slowdown).
We have a
-with-rtsopts=-N4
in the .cabal file. I'm not sure if that's good or not, but I suspect it doesn't matter as much as the-j
option.