Skip to content

rpc: remove the by-name RpcRecipe.getRecipeList() fallback#8139

Open
shanman190 wants to merge 3 commits into
mainfrom
remove-rpc-by-name-fallback
Open

rpc: remove the by-name RpcRecipe.getRecipeList() fallback#8139
shanman190 wants to merge 3 commits into
mainfrom
remove-rpc-by-name-fallback

Conversation

@shanman190

Copy link
Copy Markdown
Contributor

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.toMap imports) is deleted; a missing child tree now fails loudly via requireNonNull instead 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 on main until those land. Rebase onto main once 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 consumes descriptor.recipeList rather than the prepared recipeList. Converting the JS host to consume recipeList is a separate, optional cleanup.

Testing

RewriteRpcTest (Java↔Java, whole-tree) passes its prepare/recipe-list tests (prepareRecipe, runRecipeWithRecipeList, …) — it never used the fallback.

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.
@shanman190 shanman190 self-assigned this Jun 29, 2026
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant