Skip to content

Conversation

@LincolnPuzey
Copy link
Collaborator

@LincolnPuzey LincolnPuzey commented Aug 13, 2025

When fail_fast=True (now the default) and any message gets dead-lettered during the join, then an exception will be raised.

Resolves #739

@LincolnPuzey LincolnPuzey marked this pull request as draft August 20, 2025 03:12
@LincolnPuzey LincolnPuzey added this to the v2.0.0 milestone Sep 1, 2025
@LincolnPuzey LincolnPuzey force-pushed the fail_fast_default_true branch from a06f1e3 to 068efe0 Compare September 1, 2025 12:08
@LincolnPuzey
Copy link
Collaborator Author

@Bogdanp @synweap15 @karolinepauls This change causes causes 26 of our tests to fail.
I'll need to fix them by setting fail_fast=False or catching the exceptions being raised.

But I want to double check we think the developer experience improvement here is worth the similar disruption that is likely in downstream projects.

@synweap15
Copy link
Collaborator

@LincolnPuzey it's a good direction given we're aiming at a major version bump. We'd be consistent, I'd say it's worth it.

It would be a good reference for developers if the tests caught the exception + at least one test that shows how fail_fast=False behaves.

@LincolnPuzey LincolnPuzey force-pushed the fail_fast_default_true branch 2 times, most recently from 0b8b886 to df4dd3a Compare October 7, 2025 11:47
@LincolnPuzey
Copy link
Collaborator Author

@synweap15 I'm thinking about projects with a large test suite that might find changing to the new behavior difficult.

How about we add a StubBroker option that controls the fail_fast default?
I've added commit a700ba7 to show what I mean.

That way large projects can do StubBroker(fail_fast_default=False) (presumably in a small number of places (e.g. pytest fixture)), if they want to upgrade to v2, but updating all their tests straight away is too much work.

@Bogdanp
Copy link
Owner

Bogdanp commented Oct 10, 2025

How about we add a StubBroker option that controls the fail_fast default?

Sounds like a good idea to me.

@LincolnPuzey LincolnPuzey force-pushed the fail_fast_default_true branch from df4dd3a to 8a72e73 Compare October 20, 2025 12:34
@LincolnPuzey LincolnPuzey marked this pull request as ready for review October 20, 2025 12:40
@LincolnPuzey LincolnPuzey merged commit 2293a55 into Bogdanp:master Oct 20, 2025
11 checks passed
@LincolnPuzey LincolnPuzey deleted the fail_fast_default_true branch October 20, 2025 12:41
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.

Change fail_fast default to True for the StubBroker join() method

3 participants