Refactor and simplify the _source parsing in FetchSourceContext - #21086
Conversation
PR Reviewer Guide 🔍(Review updated until commit e5ba3ae)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to e5ba3ae Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 1fa538d
Suggestions up to commit 87c4954
Suggestions up to commit dbd0800
Suggestions up to commit 3e8dee0
|
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 25438a8.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
The error message has been reverted to its original form |
Signed-off-by: Mikhail Urmich <m.urmich@jobware.de>
Signed-off-by: Mikhail Urmich <m.urmich@jobware.de>
extract array parsing as its own function 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 <urmich.m@gmail.com>
Signed-off-by: Mikhail Urmich <urmich.m@gmail.com>
Signed-off-by: Mikhail Urmich <urmich.m@gmail.com>
Signed-off-by: Andrew Ross <andrross@amazon.com>
856a0a7 to
1fa538d
Compare
|
Persistent review updated to latest commit 1fa538d |
|
❌ Gradle check result for 1fa538d: null 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 e5ba3ae |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #21086 +/- ##
============================================
+ Coverage 73.10% 73.16% +0.05%
- Complexity 73213 73259 +46
============================================
Files 5968 5968
Lines 334539 334530 -9
Branches 48174 48170 -4
============================================
+ Hits 244572 244765 +193
+ Misses 70421 70178 -243
- Partials 19546 19587 +41 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@urmichm the codecov is not that good, but definitely not because your refactor. |
|
Hi @bowenlan-amzn |
…ensearch-project#21086) * Init marks for ISSUE-20612 Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> * simplification i Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> * switch case in favour of if-else-if Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> * minor refactor extract array parsing as its own function Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> * Refactor parseSourceObject: split key-value process into different code-blocks Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> * Refactoring only Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> * changelog and spotless Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> * error message revert to original Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> * parsing array had no validation Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> * minor revert, to simplify the PR Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> * Rebase and remove changelog entry Signed-off-by: Andrew Ross <andrross@amazon.com> --------- Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> Signed-off-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Sandesh Kumar <sandeshkr419@gmail.com> Signed-off-by: Aparajita Pandey <aparajita31pandey@gmail.com>
…ensearch-project#21086) * Init marks for ISSUE-20612 Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> * simplification i Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> * switch case in favour of if-else-if Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> * minor refactor extract array parsing as its own function Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> * Refactor parseSourceObject: split key-value process into different code-blocks Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> * Refactoring only Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> * changelog and spotless Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> * error message revert to original Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> * parsing array had no validation Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> * minor revert, to simplify the PR Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> * Rebase and remove changelog entry Signed-off-by: Andrew Ross <andrross@amazon.com> --------- Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> Signed-off-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Sandesh Kumar <sandeshkr419@gmail.com>
…ensearch-project#21086) * Init marks for ISSUE-20612 Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> * simplification i Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> * switch case in favour of if-else-if Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> * minor refactor extract array parsing as its own function Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> * Refactor parseSourceObject: split key-value process into different code-blocks Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> * Refactoring only Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> * changelog and spotless Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> * error message revert to original Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> * parsing array had no validation Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> * minor revert, to simplify the PR Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> * Rebase and remove changelog entry Signed-off-by: Andrew Ross <andrross@amazon.com> --------- Signed-off-by: Mikhail Urmich <m.urmich@jobware.de> Signed-off-by: Mikhail Urmich <urmich.m@gmail.com> Signed-off-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Sandesh Kumar <sandeshkr419@gmail.com>
Description
Refactoring and simplification of
FetchSourceContext.javato better align with current Java best practices.The first part of resolving the #20612 issue.
To keep this PR focused and easier to understand, the remaining work will be addressed in follow-up PRs.
Related Issues
Partially 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.