Validation of the _source to reject contradicting and ambiguous requests - #20742
Validation of the _source to reject contradicting and ambiguous requests#20742urmichm wants to merge 5 commits into
_source to reject contradicting and ambiguous requests#20742Conversation
PR Reviewer Guide 🔍(Review updated until commit 884af1c)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 884af1c Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 19b9aa7
Suggestions up to commit 2a92628
Suggestions up to commit ea4f7b1
Suggestions up to commit 959c5ef
Suggestions up to commit 58a7b18
|
|
❌ Gradle check result for c2718e8: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
Persistent review updated to latest commit 418c9b7 |
|
Persistent review updated to latest commit 8f222c4 |
|
Persistent review updated to latest commit 49d359c |
|
Persistent review updated to latest commit ea4f7b1 |
|
❌ Gradle check result for ea4f7b1: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
ea4f7b1 to
2a92628
Compare
|
Persistent review updated to latest commit 2a92628 |
|
❌ Gradle check result for 2a92628: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
2a92628 to
19b9aa7
Compare
|
Persistent review updated to latest commit 19b9aa7 |
include and exclude collections must not contain the same entries Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> Signed-off-by: Mikhail Urmich <m.urmich@jobware.de>
The same entry MUST NOT be present in both inludes AND excludes arrays. This leads to ambiguity. Signed-off-by: Mikhail Urmich <m.urmich@jobware.de>
Signed-off-by: Mikhail Urmich <m.urmich@jobware.de>
Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> Signed-off-by: Mikhail Urmich <m.urmich@jobware.de>
19b9aa7 to
884af1c
Compare
|
Persistent review updated to latest commit 884af1c |
|
closed in favour of #21203 cc: @bowenlan-amzn |
|
❌ Gradle check result for 884af1c: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Description
Validation of the
_sourceobject added to avoid confusion and reject contradicting requests:"_source": { "includes": "text", "excludes": ["title", "text"] }Thetextfield is defined in bothincludesandexcludes. Contradiction. 🚫Deprecation logs added for ambiguous requests:
"_source": {}At lease one ofincludesorexcludesshall be defined."_source": []Explicitly defined empty array ofincludesis ambiguous."_source": { "includes": [], "excludes": ["title"] }or_source: { "includes": ["title"], "excludes": [] }Explicitly defined empty array ofexcludesorincludesis ambiguous.To include the whole
_sourceobject or to exclude it completely, the existingbooleanlogic is encouraged."_source": trueand"_source": falseUnit tests and yml tests added to test behaviour of parsing implementation.
Existing tests have been extended.
Follow-up to Pull Request #21086
Related Issues
Resolves #20612
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.