Skip to content

Conversation

@hendrikmakait
Copy link
Member

@hendrikmakait hendrikmakait commented Aug 1, 2022

Partially addresses pre-commit failures in #6809

  • Tests added / passed
  • Passes pre-commit run --all-files

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2022

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

       15 files  ±0         15 suites  ±0   6h 38m 32s ⏱️ + 11m 14s
  2 983 tests ±0    2 890 ✔️ +1       87 💤 ±0  5 ±0  1 🔥  - 1 
22 114 runs  ±0  21 075 ✔️ ±0  1 030 💤 +2  8  - 1  1 🔥  - 1 

For more details on these failures and errors, see this check.

Results for commit 724ba00. ± Comparison against base commit 9267a21.

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hendrikmakait! Just one small question

bad_thread = bad_threads[0]
call_stacks = profile.call_stack(sys._current_frames()[bad_thread.ident])
assert False, (bad_thread, call_stacks)
assert False, (bad_thread, call_stacks) # noqa: B011
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ignore here instead of raising an error?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I don't mind raising an error either. My line of thinking was as follows: From my understanding, the rule is targeted toward production code that should always throw, not tests. Therefore, in #6809, I propose to ignore B011 for all tests since assert statements are perfectly fine in there. (I'm happy to iterate on that.) As check_thread_leak is a helper function for tests, it felt like the same rules applied to it as to all other tests for which we ignore B011.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the additional context. I don't have strong feelings either way. Let's go with what you have here -- it's easy enough to follow-up and remove the ignore if other have different thoughts on the topic

@jrbourbeau jrbourbeau merged commit df28343 into dask:main Aug 1, 2022
gjoseph92 pushed a commit to gjoseph92/distributed that referenced this pull request Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants