Repository navigation
python3Packages.paho-mqtt: backport fix for flaky tests - #545193
Conversation
f585b8c to
edcc359
Compare
|
In the meantime, @JamieMagee has fixed this issue upstream eclipse-paho/paho.mqtt.python#934. Unfortunately, I had to manually create a patch file since the changes do not cleanly apply after applying the other patch related to ssl certificates. |
There was a problem hiding this comment.
The PR's base branch is set to master, but 171 commits from the staging branch are included. Make sure you know the right base branch for your changes, then:
- If the changes should go to the
stagingbranch, change the base branch. - If the changes should go to the
masterbranch, rebase your PR onto the correct merge-base:# git rebase --onto $(git merge-base upstream/master HEAD) $(git merge-base upstream/staging HEAD) git rebase --onto ac1872b9b2927bf24d648290f73f026cd0cb054a 7a0b03740a1ca30d640da4526a9229dda5833efd git push --force-with-lease
We merge to master because it fails to build there.
|
Please rebase on |
edcc359 to
8a076c9
Compare
Review dismissed automatically
There was a problem hiding this comment.
The PR's base branch is set to master, but this PR causes 1287 rebuilds.
It is therefore considered a mass rebuild.
Please change the base branch to the right base branch for your changes (probably staging).
|
I don't understand why it's so hard to follow my instructions. Do the rebase I asked for and don't change the target branch. |
During testing, MQTT clients are spawned as subprocesses and then stopped via SIGINT. Whether or not the SIGINT signal arrives before or after the client has completed the initial setup and reached its `loop_forever()` or `wait_for_keyboard_input()` call is timing-dependent. This limitaiton is known by the upstream developers (as witnessed by the comment in the custom implementation of `wait_for_keyboard_interrupt`). As a consequence, people are getting failures during teardown for different tests depending on the machine as the timing is slightly different, see NixOS#542586. This has been fixed upstream in eclipse-paho/paho.mqtt.python#934 by introducing a signaling mechanism. This PR backports the fix. Assited-by: Claude Sonnet 5
|
Successfully created backport PR for |
|
It might be tough for people not experienced with this 🤷🏽 I'm really looking forward to this package not flaking anymore. |
During testing, MQTT clients are spawned as subprocesses and then
stopped via SIGINT. Whether or not the SIGINT signal arrives before or
after the client has completed the initial setup and reached its
loop_forever()orwait_for_keyboard_input()call is timing-dependent. This limitaiton seems to be known by the upstream developers as witnessed by this comment in the custom implementation ofwait_for_keyboard_interrupt. As a consequence of it, people are getting failures during teardown for different tests depending on the machine asthe timing is slightly different, see #542586.
Fixing via a static set of disabled tests seems to not be the right
approach. This PR instead uses pytest-rerunfailures to allow multiple
retries which (hopefully) makes failures much more unlikely. This may
increase the runtime of checkPhase, but for me it reliably prevents the
test from failing.
Assisted by: Claude Sonnet 5, which helped me understand the issue and suggested simply rerunning the flaky tests.
Sorry for opening this twice, its my first time contributing here. Please let me know if I should do something else.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.