-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
nixos/tests: fix flaky cntr test #162582
nixos/tests: fix flaky cntr test #162582
Conversation
Force-pushed since I left some debugging tools in !ofborg test cntr |
The cntr sometimes hangs until the 10-hour hydra limit. This behaviour appears to be an edge-case related to the type of TTY in which the cntr command runs during test execution. We can work around this by running the command as a background job. I additionally added a wait_for_open_port to fix nondeterministic test failures I observed after fixing the hanging issue.
… and again with the trailing whitespace removed :) !ofborg test cntr |
|
Needs to be @ofborg test cntr |
Ah I guess not by the standard definition. It "blocks" the channel from advancing for 10 hours while we wait for it to time out, but it no, it's not a blocker blocker. |
@ofborg test cntr.docker cntr.nixos-container cntr.podman |
"cntr attach -t ${backend} nginx sh -- -c 'curl localhost | grep Hello'" | ||
${backend}.wait_for_open_port(8181) | ||
# For some reason, the cntr command hangs when run without the &. | ||
# As such, we have to do some messy things to ensure we check the exitcode and output in a race-condition-safe manner |
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 seems weird. Maybe something with the terminal changed in our nixos tests?
Can you also open up an issue in cntr itself? Should be fine to merge this though in the meantime.
tested locally. |
Motivation for this change
The cntr test sometimes hangs until the 10-hour hydra limit – this is currently the sole thing stopping trunk-combined from advancing.
Things done
This behaviour appears to be an edge-case related to the type of TTY in which the cntr command runs during test execution. We can work around this by running the command as a background job.
I additionally added a wait_for_open_port to fix nondeterministic test failures I observed after fixing the hanging issue.
!ofborg test cntr