Skip to content

Return a failed future on deadline expiration #2604

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

Merged
merged 4 commits into from
Jul 15, 2025
Merged

Conversation

kunalrkak
Copy link
Contributor

Before this PR

From the Channel Javadoc:

Behavior

Implementations of {@link Channel#execute(Endpoint, Request)} must never throw. A failed {@link ListenableFuture} must be returned instead.

The DeadlineExpiredException is logged when we handle throwables here, so we should just be able to return a failed future.

After this PR

==COMMIT_MSG==
Makes DeadlineAdvertisementChannel adhere to the Channel spec by not throwing an exception.
==COMMIT_MSG==

Possible downsides?

@changelog-app
Copy link

changelog-app bot commented Jul 10, 2025

Generate changelog in changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

Makes DeadlineAdvertisementChannel adhere to the Channel spec by not throwing an exception.

Check the box to generate changelog(s)

  • Generate changelog entry

aldexis
aldexis previously approved these changes Jul 15, 2025
@policy-bot policy-bot bot dismissed aldexis’s stale review July 15, 2025 14:13

Invalidated by push of 3e85783

@kunalrkak kunalrkak merged commit 2e210ca into develop Jul 15, 2025
6 checks passed
@autorelease3
Copy link

autorelease3 bot commented Jul 15, 2025

Released 6.2.0

@kunalrkak kunalrkak deleted the kkak/patch-1 branch July 15, 2025 17:41
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