-
Notifications
You must be signed in to change notification settings - Fork 32
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
Transformer configuration UX changes #421
Transformer configuration UX changes #421
Conversation
I've added all of the transformer jars to the runtime closure of the replayer since it's going to be a challenge for users using a cloud-deployment shrink-wrap solution to add addition jarfiles. Change the syntax/rules for Transformer configs. * If no argument was specified for the transformer config, no transformer used, regardless of what's in the classpath. * To use multiple transformers, you’ll need to specify the transformer-config as a json array (of json transformer configs) * To use one transformer with default settings, you can JUST put the name of the transformer in the arg. e.g. --transformer-config JsonTransformerForOpenSearch23PlusTargetTransformerProvider. I've also updated the key name to only use the short, simple name of a class rather than the fully qualified one with the namespace. Add a NoopTransformer, which makes unit and sanity testing a lot simpler. Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
# Conflicts: # TrafficCapture/trafficReplayer/build.gradle
(repeated) I've added all of the transformer jars to the runtime closure of the replayer since it's going to be a challenge for users using a cloud-deployment shrink-wrap solution to add addition jarfiles. Change the syntax/rules for Transformer configs. * If no argument was specified for the transformer config, no transformer used, regardless of what's in the classpath. * To use multiple transformers, you’ll need to specify the transformer-config as a json array (of json transformer configs) * To use one transformer with default settings, you can JUST put the name of the transformer in the arg. e.g. --transformer-config JsonTransformerForOpenSearch23PlusTargetTransformerProvider. I've also updated the key name to only use the short, simple name of a class rather than the fully qualified one with the namespace. Add a NoopTransformer, which makes unit and sanity testing a lot simpler. Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
13eb329
to
f0dcc00
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #421 +/- ##
============================================
+ Coverage 62.67% 62.86% +0.19%
- Complexity 869 871 +2
============================================
Files 100 100
Lines 4343 4341 -2
Branches 412 410 -2
============================================
+ Hits 2722 2729 +7
+ Misses 1348 1341 -7
+ Partials 273 271 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@Test | ||
public void testThatSimpleNoopTransformerLoads() throws Exception { | ||
var noopTransformer = new TransformationLoader() | ||
.getTransformerFactoryLoader("localhost", "NoopTransformerProvider"); |
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.
Do we currently have any other existing transformation providers besides "NoopTransformerProvider" ?
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.
In the base package, no. In TrafficReplayer, there's a HostTransformer & soon a UserAgentTransformer. Transformers exist for Jolt and JMESPath in separate packages.
Description
Transformation improvements.
I've added all of the transformer jars to the runtime closure of the replayer since it's going to be a challenge for users using a cloud-deployment shrink-wrap solution to add addition jarfiles.
Change the syntax/rules for Transformer configs.
I've also updated the key name to only use the short, simple name of a class rather than the fully qualified one with the namespace.
Add a NoopTransformer, which makes unit and sanity testing a lot simpler.
Issues Resolved
https://opensearch.atlassian.net/browse/MIGRATIONS-1429
Testing
gradle build
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.