Skip to content

refactor(stack/switch_ready): use Either<A, B> future#3739

Merged
cratelyn merged 1 commit intomainfrom
kate/linkerd-stack.replace-tower-either-with-futures-either
Mar 11, 2025
Merged

refactor(stack/switch_ready): use Either<A, B> future#3739
cratelyn merged 1 commit intomainfrom
kate/linkerd-stack.replace-tower-either-with-futures-either

Conversation

@cratelyn
Copy link
Member

this commit makes a noöp change to the SwitchReady<A, B> machinery provided by our linkerd-stack library.

this commit is a small refactor that is intended to pave the way for an impending upgrade to tower v0.5, which notably includes breaking changes to the tower::util::Either<A, B> service.

as of tower v0.5, by way of tower-rs/tower#637, the Either<A, B> service is no longer itself a Future. so, we can instead use the future provided by futures.

for more information, see:

this commit makes a noöp change to the `SwitchReady<A, B>` machinery
provided by our `linkerd-stack` library.

this commit is a small refactor that is intended to pave the way for an
impending upgrade to tower v0.5, which notably includes breaking changes
to the `tower::util::Either<A, B>` service.

as of tower v0.5, by way of tower-rs/tower#637,
the `Either<A, B>` service is no longer itself a `Future`. so, we can
instead use the future provided by `futures`.

for more information, see:
* linkerd/linkerd2#8733
* #3504
* https://github.com/linkerd/linkerd2-proxy/pull/3504/files#r1988082658
* tower-rs/tower#637

Signed-off-by: katelyn martin <[email protected]>
@cratelyn cratelyn marked this pull request as ready for review March 11, 2025 18:49
@cratelyn cratelyn requested a review from a team as a code owner March 11, 2025 18:49
@cratelyn cratelyn enabled auto-merge (squash) March 11, 2025 18:50
@cratelyn cratelyn merged commit 13a7916 into main Mar 11, 2025
15 checks passed
@cratelyn cratelyn deleted the kate/linkerd-stack.replace-tower-either-with-futures-either branch March 11, 2025 18:50
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