[fix/UiSettings] ignore certain errors#13079
Merged
spalger merged 27 commits intoelastic:masterfrom Aug 9, 2017
Merged
Conversation
03e2e31 to
a5892fc
Compare
Member
|
Getting |
8618519 to
e9ce550
Compare
e9ce550 to
304fd9e
Compare
tylersmalley
approved these changes
Jul 25, 2017
Member
tylersmalley
left a comment
There was a problem hiding this comment.
LGTM - I like the file layout you ended up with in client/lib/errors.js
tylersmalley
requested changes
Jul 26, 2017
Member
tylersmalley
left a comment
There was a problem hiding this comment.
Came back to my instance this morning and the logs were flooded with the following:
server log [07:56:57.158] [warning][process] Error: Cannot provide statusCode or message with boom error
at Object.exports.assert (/Users/tyler/elastic/kibana/node_modules/hoek/lib/index.js:736:11)
at Object.exports.wrap (/Users/tyler/elastic/kibana/node_modules/boom/lib/index.js:96:10)
at uiSettings.set.then.catch.err (/Users/tyler/elastic/kibana/src/core_plugins/kibana/server/routes/api/settings/register_set.js:18:34)
…gs/ignoreable-errors
dcd46d8 to
256a0b2
Compare
Contributor
Author
|
@tylersmalley fixed the tests |
tylersmalley
approved these changes
Aug 9, 2017
Member
tylersmalley
left a comment
There was a problem hiding this comment.
LGTM. Also verified errors are now bubbling up for invalid login attempts.
spalger
added a commit
that referenced
this pull request
Aug 9, 2017
* [SavedObjectClient] emit detectable errors * [uiSettingsService] consume new SavedObjectsClient errors * [SavedObjectsClient] expose errorTypeHelpers as such * [elasticsearch/tests] recreate error for each test * [http] wait for elasticsearch plugin to be ready * [shortUrl/tests] ensure that create request responds with 200 * [shortUrl] use errorTypeHelpers to filter errors * [uiSettings/savedObjectsClientStub] stub errorTypeHelpers * [SavedObjectsClient/errors] expose error module so tests can make errors * [shortUrl/tests] use actual SavedObjectsClient errors * [uiSettings/savedObjectsClientStub] use actual errors lib * [SavedObjectsClient] use decorate instead of "wrap" * [server/routes/uiSettings] refactor routes to forward Boom errors from uiSettings * [uiSettings] colocate routes and service * [testUtils/esTestCluster] use more standard api style * [testUtils/es] add createCallCluster util * [testUtils/esTestCluster] add getters for client/callCluster * [es/healthcheck] ensure that healtcheck stops when server is stopped * [uiSettings/routes] add param/payload validation * [uiSettings/routes] add tests that verify error behaviors (cherry picked from commit 8a64872)
spalger
added a commit
that referenced
this pull request
Aug 9, 2017
* [SavedObjectClient] emit detectable errors * [uiSettingsService] consume new SavedObjectsClient errors * [SavedObjectsClient] expose errorTypeHelpers as such * [elasticsearch/tests] recreate error for each test * [http] wait for elasticsearch plugin to be ready * [shortUrl/tests] ensure that create request responds with 200 * [shortUrl] use errorTypeHelpers to filter errors * [uiSettings/savedObjectsClientStub] stub errorTypeHelpers * [SavedObjectsClient/errors] expose error module so tests can make errors * [shortUrl/tests] use actual SavedObjectsClient errors * [uiSettings/savedObjectsClientStub] use actual errors lib * [SavedObjectsClient] use decorate instead of "wrap" * [server/routes/uiSettings] refactor routes to forward Boom errors from uiSettings * [uiSettings] colocate routes and service * [testUtils/esTestCluster] use more standard api style * [testUtils/es] add createCallCluster util * [testUtils/esTestCluster] add getters for client/callCluster * [es/healthcheck] ensure that healtcheck stops when server is stopped * [uiSettings/routes] add param/payload validation * [uiSettings/routes] add tests that verify error behaviors (cherry picked from commit 8a64872)
Contributor
Author
spalger
added a commit
to spalger/kibana
that referenced
this pull request
Aug 9, 2017
spalger
added a commit
that referenced
this pull request
Aug 22, 2017
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #9214 we started ignoring certain elasticsearch errors in the
UiSettingsservice. In #12747 we moved to using the SavedObjectsClient for communication with elasticsearch, which meant that we were getting different errors back and this broke the error ignoring characteristics of theUiSettingsservice.The majority of the code is ready to go, but I need to write some tests that will fail in case this type of change happens again.