rpc: remove the by-name RpcRecipe.getRecipeList() fallback#8139
Open
shanman190 wants to merge 3 commits into
Open
rpc: remove the by-name RpcRecipe.getRecipeList() fallback#8139shanman190 wants to merge 3 commits into
shanman190 wants to merge 3 commits into
Conversation
Every RPC server (C#, npm, Python, Go) now returns the whole prepared tree (recipeList), so the host always builds the child tree locally from the prepared child responses. The by-name fallback — which re-prepared each child by name for servers that returned only the root — is no longer reachable, so it is deleted. A missing child tree now fails loudly via requireNonNull rather than silently re-preparing by name. The now-unused OptionDescriptor and Collectors.toMap imports are dropped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Removes the by-name fallback branch in
RpcRecipe.getRecipeList()(rewrite-core). With every RPC server now returning the whole prepared tree (recipeList), the host always builds the child tree locally from the prepared child responses — no server returns only the root and needs the host to re-prepare each child by name.The fallback branch (and its now-unused
OptionDescriptor/Collectors.toMapimports) is deleted; a missing child tree now fails loudly viarequireNonNullinstead of silently re-preparing by name.Depends on
Only safe to merge once every RPC server returns
recipeList— deleting the fallback before then would NPE for any server that still returns only the root. Merge after all of:This PR is cut from
main, so its CI will fail against the still-by-name npm/Python/Go servers onmainuntil those land. Rebase ontomainonce the four are merged.Not included
The per-server child registrations (npm/Python/Go) and the JS host's by-name
RpcRecipe.getRecipeList()stay — those serve the JS-host test, which consumesdescriptor.recipeListrather than the preparedrecipeList. Converting the JS host to consumerecipeListis a separate, optional cleanup.Testing
RewriteRpcTest(Java↔Java, whole-tree) passes its prepare/recipe-list tests (prepareRecipe,runRecipeWithRecipeList, …) — it never used the fallback.