Skip to content

[Console][Messenger] Fix: Allow UnrecoverableExceptionInterface to bypass retry in RunCommandMessageHandler #60507

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

Open
wants to merge 1 commit into
base: 6.4
Choose a base branch
from

Conversation

santysisi
Copy link
Contributor

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #60427
License MIT

This PR ensures that UnrecoverableExceptionInterface exceptions thrown during the execution of a command via RunCommandMessage are no longer retried.

@santysisi santysisi requested a review from chalasr as a code owner May 22, 2025 02:29
@carsonbot carsonbot added this to the 6.4 milestone May 22, 2025
@OskarStark OskarStark changed the title [Console][Messenger] Fix: Allow UnrecoverableExceptionInterface to bypass retry in RunCommandMessageHandler [Console][Messenger] Fix: Allow UnrecoverableExceptionInterface to bypass retry in RunCommandMessageHandler May 22, 2025
@valtzu
Copy link
Contributor

valtzu commented May 24, 2025

Shouldn't we do the same for RecoverableExceptionInterface also?

@kbond
Copy link
Member

kbond commented May 24, 2025

Shouldn't we do the same for RecoverableExceptionInterface also?

Indeed, I forgot about that one.

@santysisi
Copy link
Contributor Author

I don't think we need to do the same for RecoverableExceptionInterface, because when an exception implements that interface, it signals that the operation should be retried. With this new behavior, we're explicitly avoiding retries for exceptions that implement UnrecoverableExceptionInterface, so the distinction remains meaningful.

@valtzu
Copy link
Contributor

valtzu commented May 24, 2025

@santysisi RecoverableExceptionInterface enforces the retry regardless of what retry strategy says – f.e. max_retries may be reached, but if recoverable exception was thrown, the message must still be retried.

RecoverableExceptionInterface can also override the retry delay set by retry strategy – so ignoring it here would mean always using retry delay from the retry strategy, which would again be unintended/unexpected behavior.

@santysisi
Copy link
Contributor Author

Got it, thanks for the explanation! I'll make that change. 🙌

…pass retry in RunCommandMessageHandler

Co-authored-by: Kevin Bond <kevinbond@gmail.com>
@santysisi santysisi force-pushed the fix/unrecoverable-exception-bypass-retry branch from c726fc0 to 6d550d8 Compare May 24, 2025 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants