-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Enhance the ingest node simulate verbose output #60433
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
Merged
Merged
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
a8a9d87
Per processor description for verbose simulate
jakelandis 6078c45
wip
jakelandis aacbf21
Merge branch 'master' into show_conditional
jakelandis c5498e0
Merge remote-tracking branch 'upstream/master' into show_conditional
jakelandis 12979f6
tests pass
jakelandis 0e991b4
Merge branch 'master' into show_conditional
jakelandis cf599ee
serialization fixes
jakelandis fbfc566
test status
jakelandis 4441ff3
minor clean up
jakelandis 5a58161
minor testing
jakelandis db354e4
fix showing of pipeline processor
jakelandis c97e5ab
precomit
jakelandis e1a65e5
handle non-existant pipeline
jakelandis 2b1f3da
fix existing yaml tests
jakelandis 79bb3fb
add no pipeline test
jakelandis a829e38
add a bit of coverage
jakelandis 374b7ae
Merge remote-tracking branch 'upstream/master' into show_conditional
jakelandis cb3d4a0
fix doc test
jakelandis 5c26a6b
use local variable
jakelandis dc93ec3
Merge remote-tracking branch 'upstream/master' into show_conditional
jakelandis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -546,11 +546,15 @@ teardown: | |
| - match: { docs.0.processor_results.0.tag: "setstatus-1" } | ||
| - match: { docs.0.processor_results.0.doc._source.field1: "123.42 400 <foo>" } | ||
| - match: { docs.0.processor_results.0.doc._source.status: 200 } | ||
| - match: { docs.0.processor_results.0.status: "success" } | ||
| - match: { docs.0.processor_results.0.processor_type: "set" } | ||
| - match: { docs.0.processor_results.1.tag: "rename-1" } | ||
| - match: { docs.0.processor_results.1.ignored_error.error.type: "illegal_argument_exception" } | ||
| - match: { docs.0.processor_results.1.ignored_error.error.reason: "field [foofield] doesn't exist" } | ||
| - match: { docs.0.processor_results.1.doc._source.field1: "123.42 400 <foo>" } | ||
| - match: { docs.0.processor_results.1.doc._source.status: 200 } | ||
| - match: { docs.0.processor_results.1.status: "error_ignored" } | ||
| - match: { docs.0.processor_results.1.processor_type: "rename" } | ||
|
|
||
| --- | ||
| "Test verbose simulate with ignore_failure and no exception thrown": | ||
|
|
@@ -591,11 +595,16 @@ teardown: | |
| } | ||
| - length: { docs: 1 } | ||
| - length: { docs.0.processor_results: 2 } | ||
| - length: { docs.0.processor_results.0: 4 } | ||
| - match: { docs.0.processor_results.0.tag: "setstatus-1" } | ||
| - match: { docs.0.processor_results.0.status: "success" } | ||
| - match: { docs.0.processor_results.0.processor_type: "set" } | ||
| - match: { docs.0.processor_results.0.doc._source.field1: "123.42 400 <foo>" } | ||
| - match: { docs.0.processor_results.0.doc._source.status: 200 } | ||
| - length: { docs.0.processor_results.1: 2 } | ||
| - length: { docs.0.processor_results.1: 4 } | ||
| - match: { docs.0.processor_results.1.tag: "rename-1" } | ||
| - match: { docs.0.processor_results.1.status: "success" } | ||
| - match: { docs.0.processor_results.1.processor_type: "rename" } | ||
| - match: { docs.0.processor_results.1.doc._source.new_status: 200 } | ||
|
|
||
| --- | ||
|
|
@@ -710,7 +719,8 @@ teardown: | |
| { | ||
| "set": { | ||
| "field": "pipeline0", | ||
| "value": true | ||
| "value": true, | ||
| "description" : "first_set" | ||
| } | ||
| }, | ||
| { | ||
|
|
@@ -731,16 +741,25 @@ teardown: | |
| ] | ||
| } | ||
| - length: { docs: 1 } | ||
| - length: { docs.0.processor_results: 3 } | ||
| - length: { docs.0.processor_results: 5 } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because we now show the pipeline processor in the results |
||
| - match: { docs.0.processor_results.0.doc._source.pipeline0: true } | ||
| - match: { docs.0.processor_results.0.status: "success" } | ||
| - match: { docs.0.processor_results.0.processor_type: "set" } | ||
| - match: { docs.0.processor_results.0.description: "first_set" } | ||
| - is_false: docs.0.processor_results.0.doc._source.pipeline1 | ||
| - is_false: docs.0.processor_results.0.doc._source.pipeline2 | ||
| - match: { docs.0.processor_results.1.doc._source.pipeline0: true } | ||
| - match: { docs.0.processor_results.1.doc._source.pipeline1: true } | ||
| - is_false: docs.0.processor_results.1.doc._source.pipeline2 | ||
| - match: { docs.0.processor_results.1.doc: null } | ||
| - match: { docs.0.processor_results.1.status: "success" } | ||
| - match: { docs.0.processor_results.1.processor_type: "pipeline" } | ||
| - match: { docs.0.processor_results.2.doc._source.pipeline0: true } | ||
| - match: { docs.0.processor_results.2.doc._source.pipeline1: true } | ||
| - match: { docs.0.processor_results.2.doc._source.pipeline2: true } | ||
| - is_false: docs.0.processor_results.2.doc._source.pipeline2 | ||
| - match: { docs.0.processor_results.3.doc: null } | ||
| - match: { docs.0.processor_results.3.status: "success" } | ||
| - match: { docs.0.processor_results.3.processor_type: "pipeline" } | ||
| - match: { docs.0.processor_results.4.doc._source.pipeline0: true } | ||
| - match: { docs.0.processor_results.4.doc._source.pipeline1: true } | ||
| - match: { docs.0.processor_results.4.doc._source.pipeline2: true } | ||
|
|
||
| --- | ||
| "Test verbose simulate with true conditional and on failure": | ||
|
|
@@ -801,19 +820,27 @@ teardown: | |
| - length: { docs.0.processor_results: 4 } | ||
| - match: { docs.0.processor_results.0.tag: "gunna_fail" } | ||
| - match: { docs.0.processor_results.0.error.reason: "field [foo1] doesn't exist" } | ||
| - match: { docs.0.processor_results.0.status: "error" } | ||
| - match: { docs.0.processor_results.0.processor_type: "rename" } | ||
| - match: { docs.0.processor_results.1.tag: "failed1" } | ||
| - match: { docs.0.processor_results.1.doc._source.failed1: "failed1" } | ||
| - match: { docs.0.processor_results.1.doc._ingest.on_failure_processor_tag: "gunna_fail" } | ||
| - match: { docs.0.processor_results.1.status: "success" } | ||
| - match: { docs.0.processor_results.1.processor_type: "set" } | ||
| - match: { docs.0.processor_results.2.tag: "gunna_fail_again" } | ||
| - match: { docs.0.processor_results.2.error.reason: "field [foo2] doesn't exist" } | ||
| - match: { docs.0.processor_results.2.status: "error" } | ||
| - match: { docs.0.processor_results.2.processor_type: "rename" } | ||
| - match: { docs.0.processor_results.3.tag: "failed2" } | ||
| - match: { docs.0.processor_results.3.doc._source.failed1: "failed1" } | ||
| - match: { docs.0.processor_results.3.doc._source.failed2: "failed2" } | ||
| - match: { docs.0.processor_results.3.doc._ingest.on_failure_processor_tag: "gunna_fail_again" } | ||
| - match: { docs.0.processor_results.3.status: "success" } | ||
| - match: { docs.0.processor_results.3.processor_type: "set" } | ||
|
|
||
|
|
||
| --- | ||
| "Test simulate with provided pipeline definition with tag and description in processors": | ||
| "Test simulate with pipeline with conditional and skipped and dropped": | ||
| - do: | ||
| ingest.simulate: | ||
| verbose: true | ||
|
|
@@ -829,6 +856,16 @@ teardown: | |
| "field" : "field2", | ||
| "value" : "_value" | ||
| } | ||
| }, | ||
| { | ||
| "drop" : { | ||
| "if": "false" | ||
| } | ||
| }, | ||
| { | ||
| "drop" : { | ||
| "if": "true" | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
|
|
@@ -843,7 +880,43 @@ teardown: | |
| ] | ||
| } | ||
| - length: { docs: 1 } | ||
| - length: { docs.0.processor_results: 1 } | ||
| - length: { docs.0.processor_results: 3 } | ||
| - match: { docs.0.processor_results.0.doc._source.field2: "_value" } | ||
| - match: { docs.0.processor_results.0.description: "processor_description" } | ||
| - match: { docs.0.processor_results.0.tag: "processor_tag" } | ||
| - match: { docs.0.processor_results.0.status: "success" } | ||
| - match: { docs.0.processor_results.0.processor_type: "set" } | ||
| - match: { docs.0.processor_results.1.status: "skipped" } | ||
| - match: { docs.0.processor_results.1.processor_type: "drop" } | ||
| - match: { docs.0.processor_results.1.if.condition: "false" } | ||
| - match: { docs.0.processor_results.1.if.result: false } | ||
| - match: { docs.0.processor_results.2.status: "dropped" } | ||
| - match: { docs.0.processor_results.2.processor_type: "drop" } | ||
| - match: { docs.0.processor_results.2.if.condition: "true" } | ||
| - match: { docs.0.processor_results.2.if.result: true } | ||
| --- | ||
| "Test simulate with provided pipeline that does not exist": | ||
| - do: | ||
| catch: bad_request | ||
| ingest.simulate: | ||
| verbose: true | ||
| body: > | ||
| { | ||
| "pipeline": { | ||
| "description": "_description", | ||
| "processors": [ | ||
| { | ||
| "pipeline": { | ||
| "name": "____pipeline_doesnot_exist___" | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| "docs": [ | ||
| { | ||
| "_source": {} | ||
| } | ||
| ] | ||
| } | ||
| - match: { error.root_cause.0.type: "illegal_argument_exception" } | ||
| - match: { error.root_cause.0.reason: "Pipeline processor configured for non-existent pipeline [____pipeline_doesnot_exist___]" } | ||
Oops, something went wrong.
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.
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.
because we now always return
statusandprocessor_type