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

[5.6] [fix/UiSettings] ignore certain errors (#13079) #13409

Merged
merged 5 commits into from
Aug 22, 2017

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Aug 9, 2017

5.6 specific changes:

9facf4d: Since SavedObjectClient in 5.6 has _withKibanaIndexAndMappingFallback, which checks for specific error types and uses a fallback request when they are found. This PR changes the error handling to stop overwriting the es errors and instead decorate them with SavedObjectClient specific details. This means that the error objects no longer have data.type attached to them. Thankfully, it also means that they have the entire elasticsearch response available so we can just check body.error.type instead.


  • [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

@spalger spalger force-pushed the backport/5.6/13079 branch from e613924 to 1a999c4 Compare August 9, 2017 07:58
@spalger
Copy link
Contributor Author

spalger commented Aug 17, 2017

jenkins, test this

@spalger
Copy link
Contributor Author

spalger commented Aug 18, 2017

@tylersmalley @jbudz I talked with one of you while working on it, but this needed to update _withKibanaIndexAndMappingFallback to check for body.error.type rather than data.type since SavedObjectClient is now decorating es errors rather than replacing them

Mind taking a look?

@spalger spalger requested review from tylersmalley and jbudz August 18, 2017 20:39
@spalger spalger removed the blocked label Aug 18, 2017
Copy link
Contributor

@tylersmalley tylersmalley left a comment

Choose a reason for hiding this comment

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

LGTM - also tested with x-pack

@spalger spalger merged commit 2655237 into elastic:5.6 Aug 22, 2017
@spalger spalger deleted the backport/5.6/13079 branch August 22, 2017 22:36
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.

2 participants