-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Introduce local-only action utils #100112
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
Introduce local-only action utils #100112
Conversation
Introduces some never-called `localOnly()` placeholders to clearly mark the dead code in actions that never run on remote nodes. Relates elastic#100111
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
ldematte
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I have some questions.
I suspect this covers only a couple of example usages, and we would need to follow up with some other PRs to convert other existing usages, correct?
These replacements look safe as behaviour is unchanged, and probably other direct usages of TransportAction will too (as their implementation is already empty/throwing). But what about HandledTransportAction? Is there a way we can see which ones are local only, and introduce this pattern/a similar pattern?
Not easily, the bulk of the work for #100111 is going to be looking at all the other actions one-by-one and separating them out into local-only and remote-cluster actions. |
Introduces some never-called `localOnly()` placeholders to clearly mark the dead code in actions that never run on remote nodes. Relates elastic#100111
I had a suspect that was the case :/ |
|
I think I'd approach it by separating the remote-cluster actions from the local-cluster ones first, using the type system to catch any mistakes. However I would expect this all to be fairly well-covered by tests (particularly REST tests) so as long as the tests pass we're probably ok. |
Introduces some never-called `localOnly()` placeholders to clearly mark the dead code in actions that never run on remote nodes. Relates elastic#100111
Introduces some never-called
localOnly()placeholders to clearly markthe dead code in actions that never run on remote nodes.
Relates #100111