-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[Streams] Add new ingest pipeline field access flag #129096
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
[Streams] Add new ingest pipeline field access flag #129096
Conversation
Use the new java syntax they say. It'll be fine they say. COMPILER ERROR
|
Pinging @elastic/es-data-management (Team:Data Management) |
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.
Pull Request Overview
This PR adds a new field_access_pattern option to ingest pipeline configs, introduces the corresponding enum and node feature, and propagates the flag through pipeline creation and execution.
- Extend
Pipeline.createand constructors to accept ahasFeaturepredicate and the newfieldAccessPattern - Introduce
IngestPipelineFieldAccessPatternenum and register it viaIngestFeatures/FeatureSpecification - Update all call sites, transport actions, and tests to pass the feature predicate and handle the new flag
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/common/validation/SourceDestValidatorTests.java | Updated Pipeline.create invocation to include the new feature predicate. |
| server/src/test/java/org/elasticsearch/ingest/PipelineProcessorTests.java | Adjusted test pipelines to include IngestPipelineFieldAccessPattern.CLASSIC. |
| server/src/test/java/org/elasticsearch/ingest/PipelineFactoryTests.java | Expanded Pipeline.create calls and added tests for unsupported patterns. |
| server/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineRequestParsingTests.java | Updated parse calls to accept a feature predicate lambda. |
| server/src/main/resources/META-INF/services/org.elasticsearch.features.FeatureSpecification | Registered the new IngestFeatures spec to expose the node feature. |
| server/src/main/java/org/elasticsearch/ingest/TrackingResultProcessor.java | Propagated fieldAccessPattern into the pipeline decoration. |
| server/src/main/java/org/elasticsearch/ingest/SimulateIngestService.java | Passed the feature‐checking lambda into substitution pipeline creation. |
| server/src/main/java/org/elasticsearch/ingest/Pipeline.java | Added FIELD_ACCESS_PATTERN constant, field, enum handling in create(), and a getter. |
| server/src/main/java/org/elasticsearch/ingest/IngestService.java | Declared the FIELD_ACCESS_PATTERN node feature and local support check. |
| server/src/main/java/org/elasticsearch/ingest/IngestPipelineFieldAccessPattern.java | Introduced enum to represent classic vs. flexible access patterns. |
| server/src/main/java/org/elasticsearch/ingest/IngestFeatures.java | Implemented FeatureSpecification to advertise the feature. |
| server/src/main/java/org/elasticsearch/action/ingest/SimulatePipelineTransportAction.java | Updated transport action to supply the feature predicate to parsing. |
| server/src/main/java/org/elasticsearch/action/ingest/SimulatePipelineRequest.java | Modified parse() signature to take a Predicate<NodeFeature>. |
| server/src/main/java/org/elasticsearch/action/ingest/SimulateExecutionService.java | Propagated fieldAccessPattern into simulated pipeline execution. |
| server/src/main/java/module-info.java | Added org.elasticsearch.ingest.IngestFeatures to the module declarations. |
Comments suppressed due to low confidence (2)
server/src/main/java/org/elasticsearch/ingest/Pipeline.java:30
- [nitpick] Update the class-level Javadoc for
Pipelineto mention the newfield_access_patternconfiguration option and its effect, and document thegetFieldAccessPattern()method so that users understand its purpose.
public final class Pipeline {
server/src/main/java/org/elasticsearch/ingest/TrackingResultProcessor.java:219
- Add a unit test for
TrackingResultProcessorverifying that the injectedfieldAccessPatternis correctly passed through and applied during pipeline execution.
pipeline.getFieldAccessPattern(),
lukewhiting
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.
Clean, tidy & super easy to follow. LGTM 👍🏻
| String fieldAccessPatternRaw = ConfigurationUtils.readOptionalStringProperty(null, null, config, FIELD_ACCESS_PATTERN); | ||
| if (fieldAccessPatternRaw != null && hasFeature.test(IngestService.FIELD_ACCESS_PATTERN) == false) { | ||
| throw new ElasticsearchParseException( | ||
| "pipeline [" + id + "] doesn't support one or more provided configuration parameters [field_access_pattern]" |
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.
Very minor thing, but it's the node that doesn't support the parameter, not the pipeline, right? Also, it's always one, never "or more" since it's a hard-coded list of one right?
|
Looks good to me. I assume rest tests, documentation, and rest-spec changes (and probably other things I'm forgetting) are all coming once the new field does what it's supposed to do. |
|
Oh, and it needs the 8.19.0 label, right? |
This PR introduces a new flag to ingest pipeline configurations which will be used to control how fields are accessed from within that pipeline.
This PR introduces a new flag to ingest pipeline configurations which will be used to control how fields are accessed from within that pipeline.
This PR introduces a new flag to ingest pipeline configurations which will be used to control how fields are accessed from within that pipeline.
The
field_access_patternconfig option is used to denote which strategy to use for resolving field names in ingest pipelines:This config accepts two values currently:
classic- the default value and current behaviorflexible- defines the new field access behavior that will allow for dotted field name accessThe configuration requires a new node feature to be present on all nodes in the cluster in order to be accepted. This node feature is only added to the cluster if the streams feature flag is enabled.