Skip to content
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

Handle Null in FetchSourceContext#fetchSource #36839

Merged
merged 4 commits into from Dec 21, 2018

Conversation

jkakavas
Copy link
Member

This change ensures that when null is passed as the value to one of
UpdateRequest#fetchSource @Nullable parameters, it is not wrapped in a
String array. That would in turn cause a NPE when attempting to serialize
FetchSourceContext as its constructor checks explicitly for Null and not for
arrays of Null objects.

In master, the problematic behavior was corrected as part of #29293

This change ensures that when null is passed as the value to one of
its Nullable parameters, it is not wrapped in a String array. That
would in turn cause a NPE when attempting to serialize FetchSourceContext
as its constructor checks for null values only.

In master, the problematic behavior was corrected as part of elastic#29293
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

Copy link
Contributor

@jakelandis jakelandis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jkakavas
Copy link
Member Author

jkakavas commented Dec 20, 2018

@elasticmachine please run the gradle build tests 2 once more as the first time the worker ran out of memory 🐼

@jkakavas
Copy link
Member Author

@elasticmachine please run the gradle build tests 2, hopefully for the last time

@jkakavas
Copy link
Member Author

Unstable network is unstable

 [6.5.5] 
 [6.5.5] FAILURE: Build failed with an exception.
 [6.5.5] 
 [6.5.5] * What went wrong:
 [6.5.5] A problem occurred configuring project ':distribution:packages'.
 [6.5.5] > Could not resolve all artifacts for configuration ':distribution:packages:classpath'.
 [6.5.5]    > Could not download xz.jar (org.tukaani:xz:1.5)
 [6.5.5]       > Could not get resource 'https://plugins.gradle.org/m2/org/tukaani/xz/1.5/xz-1.5.jar'.
 [6.5.5]          > Could not HEAD 'https://plugins.gradle.org/m2/org/tukaani/xz/1.5/xz-1.5.jar'. Received status code 504 from server: Gateway Time-out
 [6.5.5] 
 [6.5.5] * Try:
 [6.5.5] Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
 [6.5.5] 
 [6.5.5] * Get more help at https://help.gradle.org
 [6.5.5] 
 [6.5.5] BUILD FAILED in 2m 54s

@elasticmachine please run the gradle build tests 2

@jkakavas jkakavas merged commit 8cd6424 into elastic:6.x Dec 21, 2018
jkakavas added a commit that referenced this pull request Dec 21, 2018
This change ensures that when null is passed as the value to one of
UpdateRequest#fetchSource @nullable parameters, it is not wrapped in a
String array. That would in turn cause a NPE when attempting to serialize
FetchSourceContext as its constructor checks explicitly for Null and not for
arrays of Null objects.

In master, the problematic behavior was corrected as part of #29293
jkakavas added a commit that referenced this pull request Dec 21, 2018
This change ensures that when null is passed as the value to one of
UpdateRequest#fetchSource @nullable parameters, it is not wrapped in a
String array. That would in turn cause a NPE when attempting to serialize
FetchSourceContext as its constructor checks explicitly for Null and not for
arrays of Null objects.

In master, the problematic behavior was corrected as part of #29293
@jkakavas jkakavas deleted the fix-fetch-source branch December 21, 2018 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants