-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate performing update operation with default pipeline or final …
…pipeline (#16712) * Deprecate performing update operation with default pipeline or final pipeline Signed-off-by: Gao Binlong <[email protected]> * Modify the warning message Signed-off-by: Gao Binlong <[email protected]> * Modify changelog Signed-off-by: Gao Binlong <[email protected]> * Fix test issue Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]>
- Loading branch information
1 parent
b75f27a
commit d2a1477
Showing
3 changed files
with
116 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
102 changes: 102 additions & 0 deletions
102
modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/75_update.yml
This file contains 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 |
---|---|---|
@@ -0,0 +1,102 @@ | ||
setup: | ||
- do: | ||
ingest.put_pipeline: | ||
id: "pipeline1" | ||
body: > | ||
{ | ||
"description": "_description", | ||
"processors": [ | ||
{ | ||
"set" : { | ||
"field" : "field1", | ||
"value": "value1" | ||
} | ||
} | ||
] | ||
} | ||
- do: | ||
indices.create: | ||
index: test_1 | ||
body: | ||
settings: | ||
index.default_pipeline: "pipeline1" | ||
- do: | ||
indices.create: | ||
index: test_2 | ||
body: | ||
settings: | ||
index.final_pipeline: "pipeline1" | ||
--- | ||
teardown: | ||
- do: | ||
ingest.delete_pipeline: | ||
id: "pipeline1" | ||
ignore: 404 | ||
|
||
- do: | ||
indices.delete: | ||
index: test_1 | ||
- do: | ||
indices.delete: | ||
index: test_2 | ||
--- | ||
"update operation with predefined default or final pipeline returns warning header": | ||
- skip: | ||
version: " - 2.99.99" | ||
reason: "this change is added in 3.0.0" | ||
features: allowed_warnings | ||
- do: | ||
index: | ||
index: test_1 | ||
id: 1 | ||
body: { foo: bar } | ||
|
||
- match: { _seq_no: 0 } | ||
- match: { _version: 1 } | ||
- match: { _primary_term: 1 } | ||
- match: { result: created } | ||
|
||
- do: | ||
allowed_warnings: | ||
- "the index [test_1] has a default ingest pipeline or a final ingest pipeline, the support of the ingest pipelines for update operation causes unexpected result and will be removed in 3.0.0" | ||
update: | ||
index: test_1 | ||
id: 1 | ||
_source: true | ||
body: | ||
doc: { foo: bar1 } | ||
|
||
- match: { _seq_no: 1 } | ||
- match: { _primary_term: 1 } | ||
- match: { _version: 2 } | ||
- match: { result: updated } | ||
- match: { get._source.foo: bar1 } | ||
- match: { get._source.field1: value1 } | ||
|
||
- do: | ||
index: | ||
index: test_2 | ||
id: 1 | ||
body: { foo: bar } | ||
|
||
- match: { _seq_no: 0 } | ||
- match: { _version: 1 } | ||
- match: { _primary_term: 1 } | ||
- match: { result: created } | ||
|
||
- do: | ||
allowed_warnings: | ||
- "the index [test_2] has a default ingest pipeline or a final ingest pipeline, the support of the ingest pipelines for update operation causes unexpected result and will be removed in 3.0.0" | ||
update: | ||
index: test_2 | ||
id: 1 | ||
_source: true | ||
body: | ||
doc: { foo: bar1 } | ||
|
||
- match: { _seq_no: 1 } | ||
- match: { _primary_term: 1 } | ||
- match: { _version: 2 } | ||
- match: { result: updated } | ||
- match: { get._source.foo: bar1 } | ||
- match: { get._source.field1: value1 } |
This file contains 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