Skip to content
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

Fix AbstractManagedChannelImplBuilder#maxInboundMessageSize(int) ABI #8607

Merged
merged 1 commit into from
Oct 15, 2021

Conversation

sergiitk
Copy link
Member

@sergiitk sergiitk commented Oct 14, 2021

In refactoring described in #7211, the implementation of #maxInboundMessageSize(int)
(and its corresponding field) was pulled down from internal AbstractManagedChannelImplBuilder
to concrete classes that actually enforce this setting. For the same reason, it wasn't ported
to ManagedChannelImplBuilder (the #delegate()).

Then AbstractManagedChannelImplBuilder was brought back to fix ABI backward compatibility,
and temporarily turned into a ForwardingChannelBuilder, ref PR #7564. Eventually it will
be deleted, after a period with "bridge" ABI solution introduced in #7834.

However, restoring AbstractManagedChannelImplBuilder unintentionally made ABI of
#maxInboundMessageSize(int) implemented by the concrete classes backward incompatible:
pre-refactoring builds expect it to be a method of AbstractManagedChannelImplBuilder,
and not concrete classes, ref #8313.

The end goal is to keep #maxInboundMessageSize(int) only in concrete classes that enforce it.
To fix method's ABI, we temporary reintroduce it to the original layer it was removed from:
AbstractManagedChannelImplBuilder. This class' only intention is to provide short-term
ABI compatibility. Once we move forward with dropping the ABI, both fixes are no longer
necessary, and both will perish with removing AbstractManagedChannelImplBuilder.


Tested manually by reproducing #8313, then confirming this PR fixes it.

This is an alternative to #8597
Fixes #8313

@sergiitk sergiitk force-pushed the builders-abi-maxinboundmessagesize branch 2 times, most recently from d23206a to a3e3051 Compare October 15, 2021 00:05
In refactoring described in grpc#7211, the implementation of #maxInboundMessageSize(int)
(and its corresponding field) were pulled down from internal AbstractManagedChannelImplBuilder
to concrete classes that actually enforce this setting. For the same reason, it wasn't ported
to ManagedChannelImplBuilder (the #delegate()).

Then AbstractManagedChannelImplBuilder was brought back to fix ABI backward compatibility,
and temporarily turned into a ForwardingChannelBuilder, ref PR grpc#7564. Eventually it will
be deleted, after a period with "bridge" ABI solution introduced in grpc#7834.

However, restoring AbstractManagedChannelImplBuilder unintentionally made ABI of
pre-refactoring builds expect it to be a method of AbstractManagedChannelImplBuilder,
and not concrete classes, ref grpc#8313.

The end goal is to keep #maxInboundMessageSize(int) only in concrete classes that enforce it.
To fix method's ABI, we temporary reintroduce it to the original layer it was removed from:
AbstractManagedChannelImplBuilder. This class' only intention is to provide short-term
ABI compatibility. Once we move forward with dropping the ABI, both fixes are no longer
necessary, and both will perish with removing AbstractManagedChannelImplBuilder.
@sergiitk sergiitk force-pushed the builders-abi-maxinboundmessagesize branch from a3e3051 to 06e81fa Compare October 15, 2021 00:07
@sergiitk sergiitk requested a review from ejona86 October 15, 2021 00:09
Copy link
Member

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

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

Ah, yes. This is definitely better than my #8597. It just converts back to the way it was, but still with the new way of doing things.

@sergiitk sergiitk enabled auto-merge (squash) October 15, 2021 00:18
@sergiitk sergiitk merged commit 0376de1 into grpc:master Oct 15, 2021
@sergiitk sergiitk deleted the builders-abi-maxinboundmessagesize branch October 19, 2021 21:24
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 18, 2022
@grpc grpc unlocked this conversation Oct 3, 2023
@grpc grpc locked and limited conversation to collaborators Oct 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

maxInboundMessageSize is not applied when app code has newer gRPC version than used in library
2 participants