-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
Watcher: POST _xpack/watcher/watch/any_watch with any returns an NPE #30057
Comments
@dakrone, @spinscale I'm pinging you directly because I noticed that you edited this file most recently (in march, and february) & I believe you may have the most context about the issue. Also, I'd like to contribute a patch here and wanted to make sure I'm reaching out to the relevant people to give me the go-ahead 😄 Root causeThe root cause is a Should the fix just be a matter of a
Repro stepsI reproduced this by running a couple of
|
I think we should check in the If you want to give it a try, feel free and go ahead! |
Hi @spinscale
But the tests I didn't see any specific tests for Also, I opened a pull request of what I have so far just so that I can get a sense of if I'm doing it correctly or not. Looking forward to your feedback. Thanks for all your help! :) |
Unfortunaltely running the whole test suite takes quiet long now. It is possible to run the tests for only part of the project though, in your case the changes are in the "x-pack" module, so running
I think you are correct, I couldn't find any tests yet. Would be great to start with one then, I will comment on the PR. |
Hey @cbuescher , I'm having trouble with the integ tests. How can I intentionally break an integ test to understand how the integration tests work? |
I would have thought so, but the change that you mentioned doesn't fail, so I guess you either need to run all x-pack tests (" ./gradlew :x-pack:plugin:integTest"), but I think you can also filter out only the watcher tests, but then the incantation gets slightly more verbose. Try:
That seems to work on my machine to run only the watcher tests and will fail with the modification you described above. You can find a little bit more information about the structure of the test files in a somewhat hidden README in |
This closes elastic#30057. Trying to post a new watch by executing `POST _xpack/watcher/watch/my_watch` without any body will result in a NullPointerException. This change fixes that by validating that POST & PUT requests always have a non-null body.
Trying to post a new watch without any body currently results in a NullPointerException. This change fixes that by validating that Post and Put requests always have a body. Closes #30057
Trying to post a new watch without any body currently results in a NullPointerException. This change fixes that by validating that Post and Put requests always have a body. Closes #30057
Original comment by @spinscale:
Trying to post a new watch without any body results in an NPE.
Happens in 6.1.3
returns
stack trace in the logs
The text was updated successfully, but these errors were encountered: