Skip to content
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

Harden cluster tests #344

Merged
merged 7 commits into from
Dec 12, 2022
Merged

Harden cluster tests #344

merged 7 commits into from
Dec 12, 2022

Conversation

goodboy
Copy link
Owner

@goodboy goodboy commented Dec 12, 2022

In response to a weird issue discovered by @guilledk where if you pass in a mngrs=(<generator comprehension>), you end up with an empty sequence in the loop inside trionics.gather_contexts() and then a hang due to waiting on the all_entered: trio.Event just after the loop.

This solves the issue by greedly converting the mngrs sequence to a list and ensuring its size and otherwise raising a ValueError.


Further TODO for this to land:

  • demonstrate issue through hanging test no commit for the fix yet pushed
  • push the actual fix (b5192cc)
  • add tests for both the generator and empty list input cases there's no real reason for this, and further trying to jam in the logic in a pytest parametrization is janky..
  • nooz snippet

Other additions part of this patch:

  • we now passthrough all runtime kwargs to the open_actor_cluster() helper such that any kwarg to open_root_actor() can be used

@goodboy goodboy requested a review from guilledk December 12, 2022 03:27
@goodboy
Copy link
Owner Author

goodboy commented Dec 12, 2022

interesting i think 38326e8 makes the debugger tests pass that were failing on last run. I did a little local manual testing and it seems there can be transient failures on teardown..

I'm not sure if we should write an independent test to catch this since it's more of an auxillary teardown error that shouldn't (often) be a direct issue?

@goodboy goodboy added the bug Something isn't working label Dec 12, 2022
@goodboy goodboy merged commit 588b7ca into master Dec 12, 2022
@goodboy goodboy deleted the harden_cluster_tests branch December 12, 2022 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants