spike refactor of logstashbridge stable API#1
Merged
mashhurs merged 1 commit intomashhurs:move-to-bridge-stable-api-investigationfrom Jul 22, 2025
Conversation
- transitions terminology from wrap/unwrap to toInternal/fromInternal - adds abstract base class for ProcessorBridge, since we are expecting external implementations, which includes an internal-shaped proxy to the external definition. - adds copious commentary for the classes that were previously shipped
mashhurs
approved these changes
Jul 22, 2025
Owner
mashhurs
left a comment
There was a problem hiding this comment.
I don't see big change here. The conceptual modification makes sense to me that any external class usages go through the proxy interface to the bridge and when it needs it can point to internal (ES classes) without importing them.
| * the details of maintaining a singular internal-form implementation of {@link Processor} | ||
| * that proxies calls through the external implementation. | ||
| */ | ||
| abstract class AbstractExternal implements ProcessorBridge { |
Owner
There was a problem hiding this comment.
It looks any processors who is going to align on ProcessorBridge needs to extend this abstract class. Sounds reasonable!
Owner
|
FYI: I have compiled the bridge ( |
ba80d06
into
mashhurs:move-to-bridge-stable-api-investigation
4 checks passed
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.
This is a spike that does a few things on top of your adoption spike in response to the LS-filter PR. I can go back and make smaller commits if it helps.
Internal & External vs Unwrap & Wrap
It is easy to get lost as to what wrap and unwrap mean, especially since we are actually implementing some of these bridge interfaces over in the LS-filer.
Uses "internal" and "external" terminology throughout.
StableBridgeAPI<T>becomesStableBridgeAPI<INTERNAL>to make it clear that the type we mirroring is the elasticsearch-internal typewraptofromInternalunwraptotoInternalStableBridgeAPI.Proxy<T>class—which implementsStableBridgeAPI<T>becomesStableBridgeAPI.ProxyInternal<INTERNAL>to make it clearer that we are proxying an elasticsearch-internal objectTo accommodate this change in your your stable bridge adoption spike:
/s/unwrap/toInternal/g/s/wrap/fromInternal/gAbstract Base Class of ProcessorBridge for external implementations
Adds an abstract base class for external implementations called
ProcessorBridge.AbstractExternaltoInternalby providing anProxyExternalthat satisfies the elasticsearch-internalProcessorby proxying through to the external implementation of thePipelineBridgeProcessorBridge.fromInternal(Processor)intercepts these external-proxies and returns their wrapped external bridge implementation directly instead of double-wrapping themTo accommodate this:
PipelineProcessorwill need to extendProcessorBridge.AbstractExternalinstead of implementingProcessorBridge.Better commentary for classes and interfaces.
Resolved a lot of code-style warnings by describing the function of classes